]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
include: linux: rename MSGQ_MSG_SIZE
authorAjay Nandakumar <anandakumarm@nvidia.com>
Fri, 17 Oct 2014 09:51:53 +0000 (15:21 +0530)
committerAjay Nandakumar M <anandakumarm@nvidia.com>
Wed, 22 Oct 2014 04:55:44 +0000 (21:55 -0700)
Renaming MSGQ_MSG_SIZE to MSGQ_MSG_WSIZE as this macro returns the
size in word rather in bytes.

Bug 200025742
Bug 1526538

Change-Id: I7f1dd858fa9c8fc779d80afda95b66d66d7bd554
Signed-off-by: Ajay Nandakumar <anandakumarm@nvidia.com>
Reviewed-on: http://git-master/r/558844
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
include/linux/tegra_nvadsp.h
sound/soc/tegra-alt/tegra210_adsp_alt.c

index 836438e1e1101cfd7f7c2dd4236a3162fb4d3bac..b5aef98fdfbeeeeffe189d761dc8abc0ef18e286 100644 (file)
@@ -132,7 +132,7 @@ typedef struct _msgq_t {
 #define MSGQ_HEADER_SIZE       (sizeof(msgq_t) - sizeof(((msgq_t *)0)->queue))
 #define MSGQ_HEADER_WSIZE      (MSGQ_HEADER_SIZE / sizeof(int32_t))
 #define MSGQ_MAX_QUEUE_WSIZE   (8192 - MSGQ_HEADER_WSIZE)
-#define MSGQ_MSG_SIZE(x) \
+#define MSGQ_MSG_WSIZE(x) \
        (((sizeof(x) + sizeof(int32_t) - 1) & (~(sizeof(int32_t)-1))) >> 2)
 
 void msgq_init(msgq_t *msgq, int32_t size);
index a8743ee5aae4556841cd4a767e941fbe118c5e1e..ba958ad23d897af63c85a917dc5a110b86b05d49 100644 (file)
@@ -324,7 +324,7 @@ static void tegra210_adsp_deinit(struct tegra210_adsp *adsp)
 /* ADSP-CPU message send-receive utility functions */
 static int tegra210_adsp_get_msg(apm_shared_state_t *apm, apm_msg_t *apm_msg)
 {
-       apm_msg->msgq_msg.size = MSGQ_MSG_SIZE(apm_msg_t) -
+       apm_msg->msgq_msg.size = MSGQ_MSG_WSIZE(apm_msg_t) -
                MSGQ_MESSAGE_HEADER_WSIZE;
        return msgq_dequeue_message(&apm->msgq_send.msgq,
                &apm_msg->msgq_msg);
@@ -353,7 +353,7 @@ static int tegra210_adsp_send_connect_msg(struct tegra210_adsp_app *src,
 {
        apm_msg_t apm_msg;
 
-       apm_msg.msgq_msg.size = MSGQ_MSG_SIZE(apm_fx_connect_params_t);
+       apm_msg.msgq_msg.size = MSGQ_MSG_WSIZE(apm_fx_connect_params_t);
        apm_msg.msg.call_params.size = sizeof(apm_fx_connect_params_t);
        apm_msg.msg.call_params.method = nvfx_apm_method_fx_connect;
        apm_msg.msg.fx_connect_params.plugin_src.pvoid = IS_APM_IN(src->reg) ?
@@ -372,7 +372,7 @@ static int tegra210_adsp_send_io_buffer_msg(struct tegra210_adsp_app *app,
 {
        apm_msg_t apm_msg;
 
-       apm_msg.msgq_msg.size = MSGQ_MSG_SIZE(apm_io_buffer_params_t);
+       apm_msg.msgq_msg.size = MSGQ_MSG_WSIZE(apm_io_buffer_params_t);
        apm_msg.msg.call_params.size = sizeof(apm_io_buffer_params_t);
        apm_msg.msg.call_params.method = nvfx_apm_method_set_io_buffer;
        apm_msg.msg.io_buffer_params.pin_type = IS_APM_IN(app->reg) ?
@@ -390,7 +390,7 @@ static int tegra210_adsp_send_period_size_msg(struct tegra210_adsp_app *app,
        apm_msg_t apm_msg;
 
        apm_msg.msgq_msg.size =
-               MSGQ_MSG_SIZE(apm_notification_params_t);
+               MSGQ_MSG_WSIZE(apm_notification_params_t);
        apm_msg.msg.call_params.size =
                sizeof(apm_notification_params_t);
        apm_msg.msg.call_params.method = nvfx_apm_method_set_notification_size;
@@ -408,7 +408,7 @@ static int tegra210_adsp_adma_params_msg(struct tegra210_adsp_app *app,
 {
        apm_msg_t apm_msg;
 
-       apm_msg.msgq_msg.size = MSGQ_MSG_SIZE(apm_fx_set_param_params_t);
+       apm_msg.msgq_msg.size = MSGQ_MSG_WSIZE(apm_fx_set_param_params_t);
        apm_msg.msg.call_params.size = sizeof(apm_fx_set_param_params_t);
        apm_msg.msg.call_params.method = nvfx_apm_method_fx_set_param;
        apm_msg.msg.fx_set_param_params.plugin.pvoid =
@@ -427,7 +427,7 @@ static int tegra210_adsp_send_state_msg(struct tegra210_adsp_app *app,
 {
        apm_msg_t apm_msg;
 
-       apm_msg.msgq_msg.size = MSGQ_MSG_SIZE(nvfx_set_state_params_t);
+       apm_msg.msgq_msg.size = MSGQ_MSG_WSIZE(nvfx_set_state_params_t);
        apm_msg.msg.call_params.size = sizeof(nvfx_set_state_params_t);
        apm_msg.msg.call_params.method = nvfx_method_set_state;
        apm_msg.msg.state_params.state = state;
@@ -440,7 +440,7 @@ static int tegra210_adsp_send_reset_msg(struct tegra210_adsp_app *app,
 {
        apm_msg_t apm_msg;
 
-       apm_msg.msgq_msg.size = MSGQ_MSG_SIZE(nvfx_reset_params_t);
+       apm_msg.msgq_msg.size = MSGQ_MSG_WSIZE(nvfx_reset_params_t);
        apm_msg.msg.call_params.size = sizeof(nvfx_reset_params_t);
        apm_msg.msg.call_params.method = nvfx_method_reset;
 
@@ -452,7 +452,7 @@ static int tegra210_adsp_send_eos_msg(struct tegra210_adsp_app *app,
 {
        apm_msg_t apm_msg;
 
-       apm_msg.msgq_msg.size = MSGQ_MSG_SIZE(apm_eos_params_t);
+       apm_msg.msgq_msg.size = MSGQ_MSG_WSIZE(apm_eos_params_t);
        apm_msg.msg.call_params.size = sizeof(apm_eos_params_t);
        apm_msg.msg.call_params.method = nvfx_apm_method_set_eos;
 
@@ -464,7 +464,7 @@ static int tegra210_adsp_send_pos_msg(struct tegra210_adsp_app *app,
 {
        apm_msg_t apm_msg;
 
-       apm_msg.msgq_msg.size = MSGQ_MSG_SIZE(apm_position_params_t);
+       apm_msg.msgq_msg.size = MSGQ_MSG_WSIZE(apm_position_params_t);
        apm_msg.msg.call_params.size = sizeof(apm_position_params_t);
        apm_msg.msg.call_params.method = nvfx_apm_method_set_position;
        apm_msg.msg.position_params.pin_type = IS_APM_IN(app->reg) ?