ASoC: Intel: Skylake: fix typo in sizeof
authorVincent Stehlé <vincent.stehle@laposte.net>
Thu, 29 Oct 2015 22:04:41 +0000 (23:04 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 16 Nov 2015 10:08:09 +0000 (10:08 +0000)
commitaaec7e9f789eff57f620f38a96d0118b2a7d71c3
tree32d5c459f1788e7c9359490ac7e968f66bce5764
parent677165f76de2c785d4874d69be10dc21a5236bfb
ASoC: Intel: Skylake: fix typo in sizeof

The size of the pointer to a data structure to send is erroneously
passed to sst_ipc_tx_message_wait() as its tx_bytes argument. It should
be given the size of the pointed skl_ipc_dxstate_info structure instead.

Coincidentally, both the pointer and the structure have the same size of
8 bytes on a 64 bit machine, which "masks" the issue. Compiling for 32
bit reveals the issue more clearly.

Fix the typo for correctness, and to make the code robust to future
evolutions of the skl_ipc_dxstate_info structure size.

This fixes the following coccicheck error:

  sound/soc/intel/skylake/skl-sst-ipc.c:641:8-14: ERROR: application of sizeof to pointer

Signed-off-by: Vincent Stehlé <vincent.stehle@laposte.net>
Cc: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Cc: Jeeja KP <jeeja.kp@intel.com>
Cc: Vinod Koul <vinod.koul@intel.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: trivial@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/skylake/skl-sst-ipc.c