From: Dan Carpenter <dan.carpenter@oracle.com>
To: Liam Girdwood <lgirdwood@gmail.com>
Cc: "Guennadi Liakhovetski" <guennadi.liakhovetski@linux.intel.com>,
alsa-devel@alsa-project.org,
"Kai Vehmanen" <kai.vehmanen@linux.intel.com>,
kernel-janitors@vger.kernel.org,
"Pierre-Louis Bossart" <pierre-louis.bossart@linux.intel.com>,
"Takashi Iwai" <tiwai@suse.com>,
"Mark Brown" <broonie@kernel.org>,
"Amadeusz Sławiński" <amadeuszx.slawinski@linux.intel.com>,
"Brent Lu" <brent.lu@intel.com>
Subject: [PATCH] ASoC: hdac_hdmi: tidy up a memset()
Date: Tue, 25 Aug 2020 10:46:23 +0000 [thread overview]
Message-ID: <20200825104623.GA278587@mwanda> (raw)
The ARRAY_SIZE() is the number of the elements but we want to use the
number of bytes. Fortunately, in this case the value is the same so it
doesn't affect runtime.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
sound/soc/codecs/hdac_hdmi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c
index 869d1547ae5d..c61cce53f513 100644
--- a/sound/soc/codecs/hdac_hdmi.c
+++ b/sound/soc/codecs/hdac_hdmi.c
@@ -1474,7 +1474,7 @@ static int hdac_hdmi_eld_ctl_get(struct snd_kcontrol *kcontrol,
struct hdac_hdmi_port *port;
struct hdac_hdmi_eld *eld;
- memset(ucontrol->value.bytes.data, 0, ARRAY_SIZE(ucontrol->value.bytes.data));
+ memset(ucontrol->value.bytes.data, 0, sizeof(ucontrol->value.bytes.data));
pcm = get_hdmi_pcm_from_id(hdmi, kcontrol->id.device);
if (!pcm) {
--
2.28.0
reply other threads:[~2020-08-25 10:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20200825104623.GA278587@mwanda \
--to=dan.carpenter@oracle.com \
--cc=alsa-devel@alsa-project.org \
--cc=amadeuszx.slawinski@linux.intel.com \
--cc=brent.lu@intel.com \
--cc=broonie@kernel.org \
--cc=guennadi.liakhovetski@linux.intel.com \
--cc=kai.vehmanen@linux.intel.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=lgirdwood@gmail.com \
--cc=pierre-louis.bossart@linux.intel.com \
--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