* [PATCH] ASoC: hdac_hdmi: tidy up a memset()
@ 2020-08-25 10:46 ` Dan Carpenter
0 siblings, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2020-08-25 10:46 UTC (permalink / raw)
To: Liam Girdwood
Cc: Guennadi Liakhovetski, alsa-devel, Kai Vehmanen, kernel-janitors,
Pierre-Louis Bossart, Takashi Iwai, Mark Brown,
Amadeusz Sławiński, Brent Lu
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] ASoC: hdac_hdmi: tidy up a memset()
@ 2020-08-25 10:46 ` Dan Carpenter
0 siblings, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2020-08-25 10:46 UTC (permalink / raw)
To: Liam Girdwood
Cc: Guennadi Liakhovetski, alsa-devel, Kai Vehmanen, kernel-janitors,
Pierre-Louis Bossart, Takashi Iwai, Mark Brown,
Amadeusz Sławiński, Brent Lu
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: hdac_hdmi: tidy up a memset()
2020-08-25 10:46 ` Dan Carpenter
(?)
@ 2020-08-25 20:19 ` Mark Brown
-1 siblings, 0 replies; 3+ messages in thread
From: Mark Brown @ 2020-08-25 20:19 UTC (permalink / raw)
To: Dan Carpenter, Liam Girdwood
Cc: Guennadi Liakhovetski, alsa-devel, Kai Vehmanen, kernel-janitors,
Takashi Iwai, Pierre-Louis Bossart, Amadeusz Sławiński,
Brent Lu
On Tue, 25 Aug 2020 13:46:23 +0300, Dan Carpenter wrote:
> 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.
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: hdac_hdmi: tidy up a memset()
commit: 672072976bf0db6e0aca5382bcf03bc90f439923
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-08-25 20:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-25 10:46 [PATCH] ASoC: hdac_hdmi: tidy up a memset() Dan Carpenter
2020-08-25 10:46 ` Dan Carpenter
2020-08-25 20:19 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.