diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2014-04-16 11:38:11 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-04-18 12:11:03 -0400 |
commit | 7897ab78f64008a81344af9fecec6527dbab7a31 (patch) | |
tree | ab0442d966a833d74c900ae6e1fe2c1fed396c36 | |
parent | c9eaa447e77efe77b7fa4c953bd62de8297fd6c5 (diff) |
ASoC: Intel: some incorrect sizeof() usages
The intent was to say "sizeof(*pos)" and not "sizeof(pos)".
The sizeof(*pos) is 8 bytes so the bug won't show up on 64 bit systems.
The sizeof(*dx) is 172 bytes so that will be a bugfix.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r-- | sound/soc/intel/sst-haswell-ipc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/intel/sst-haswell-ipc.c b/sound/soc/intel/sst-haswell-ipc.c index f46bb4ddde6f..4ed2d1706a83 100644 --- a/sound/soc/intel/sst-haswell-ipc.c +++ b/sound/soc/intel/sst-haswell-ipc.c | |||
@@ -617,7 +617,7 @@ static void hsw_notification_work(struct work_struct *work) | |||
617 | case IPC_POSITION_CHANGED: | 617 | case IPC_POSITION_CHANGED: |
618 | trace_ipc_notification("DSP stream position changed for", | 618 | trace_ipc_notification("DSP stream position changed for", |
619 | stream->reply.stream_hw_id); | 619 | stream->reply.stream_hw_id); |
620 | sst_dsp_inbox_read(hsw->dsp, pos, sizeof(pos)); | 620 | sst_dsp_inbox_read(hsw->dsp, pos, sizeof(*pos)); |
621 | 621 | ||
622 | if (stream->notify_position) | 622 | if (stream->notify_position) |
623 | stream->notify_position(stream, stream->pdata); | 623 | stream->notify_position(stream, stream->pdata); |
@@ -1609,7 +1609,7 @@ int sst_hsw_dx_set_state(struct sst_hsw *hsw, | |||
1609 | trace_ipc_request("PM enter Dx state", state); | 1609 | trace_ipc_request("PM enter Dx state", state); |
1610 | 1610 | ||
1611 | ret = ipc_tx_message_wait(hsw, header, &state_, sizeof(state_), | 1611 | ret = ipc_tx_message_wait(hsw, header, &state_, sizeof(state_), |
1612 | dx, sizeof(dx)); | 1612 | dx, sizeof(*dx)); |
1613 | if (ret < 0) { | 1613 | if (ret < 0) { |
1614 | dev_err(hsw->dev, "ipc: error set dx state %d failed\n", state); | 1614 | dev_err(hsw->dev, "ipc: error set dx state %d failed\n", state); |
1615 | return ret; | 1615 | return ret; |