public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: wuyonggang001@208suo.com
To: perex@perex.cz, tiwai@suse.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] ASoC: SOF: ipc4-topology: Fix application of sizeof to pointer
Date: Wed, 19 Jul 2023 10:10:05 +0800	[thread overview]
Message-ID: <ff40e45ed02be9e1a7144af259509689@208suo.com> (raw)
In-Reply-To: <20230719015525.48613-1-zhanglibing@cdjrlc.com>

Sizeof is being applied to the pointer ptr, not the integer it points 
to.

Eliminate the following error(s):
./sound/soc/sof/ipc4-topology.c:221:29-35: ERROR: application of sizeof 
to pointer

Signed-off-by: Yonggang Wu <wuyonggang001@208suo.com>
---
  sound/soc/sof/ipc4-topology.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/sof/ipc4-topology.c 
b/sound/soc/sof/ipc4-topology.c
index a4e1a70b607d..2dbe87dbd239 100644
--- a/sound/soc/sof/ipc4-topology.c
+++ b/sound/soc/sof/ipc4-topology.c
@@ -218,7 +218,7 @@ static int sof_ipc4_get_audio_fmt(struct 
snd_soc_component *scomp,

      ret = sof_update_ipc_object(scomp, available_fmt,
                      SOF_AUDIO_FMT_NUM_TOKENS, swidget->tuples,
-                    swidget->num_tuples, sizeof(available_fmt), 1);
+                    swidget->num_tuples, sizeof(*available_fmt), 1);
      if (ret) {
          dev_err(scomp->dev, "Failed to parse audio format token 
count\n");
          return ret;

       reply	other threads:[~2023-07-19  3:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230719015525.48613-1-zhanglibing@cdjrlc.com>
2023-07-19  2:10 ` wuyonggang001 [this message]
     [not found] <20230720073836.3285-1-xujianghui@cdjrlc.com>
2023-07-20  8:43 ` [PATCH] ASoC: SOF: ipc4-topology: fix application of sizeof to pointer sunran001
2023-07-24  9:11   ` Pierre-Louis Bossart
2023-07-25  8:16   ` Péter Ujfalusi
2023-07-25 11:11   ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ff40e45ed02be9e1a7144af259509689@208suo.com \
    --to=wuyonggang001@208suo.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox