Message ID | 20240901134524.27107-1-tiwai@suse.de (mailing list archive) |
---|---|
State | Accepted |
Commit | 43b42ed438bfff6bb5a51cc27a1658c03cd223fd |
Headers | show |
Series | ALSA: pcm: Fix the previous conversion to kstrtoul() | expand |
On 2024/9/1 21:45, Takashi Iwai wrote: > The previous replacement from simple_strtoul() to kstrtoul() forgot > that the passed pointer must be an unsigned long int pointer, while > the value used there is a sized_t pointer. Fix it. > > Fixes: 61bc4deff033 ("ALSA: pcm: replace simple_strtoul to kstrtoul") > Reported-by: kernel test robot <lkp@intel.com> > Closes: https://lore.kernel.org/oe-kbuild-all/202409010425.YPS7cWeJ-lkp@intel.com/ > Signed-off-by: Takashi Iwai <tiwai@suse.de> > --- > sound/core/pcm_memory.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sound/core/pcm_memory.c b/sound/core/pcm_memory.c > index 73d4fc49a0ca..5001181208df 100644 > --- a/sound/core/pcm_memory.c > +++ b/sound/core/pcm_memory.c > @@ -183,7 +183,7 @@ static void snd_pcm_lib_preallocate_proc_write(struct snd_info_entry *entry, > struct snd_pcm_substream *substream = entry->private_data; > struct snd_card *card = substream->pcm->card; > char line[64], str[64]; > - size_t size; > + unsigned long size; Sorry, I haven't noticed this. Reviewed-by: Hongbo Li <lihongbo22@huawei.com> > struct snd_dma_buffer new_dmab; > > guard(mutex)(&substream->pcm->open_mutex);
diff --git a/sound/core/pcm_memory.c b/sound/core/pcm_memory.c index 73d4fc49a0ca..5001181208df 100644 --- a/sound/core/pcm_memory.c +++ b/sound/core/pcm_memory.c @@ -183,7 +183,7 @@ static void snd_pcm_lib_preallocate_proc_write(struct snd_info_entry *entry, struct snd_pcm_substream *substream = entry->private_data; struct snd_card *card = substream->pcm->card; char line[64], str[64]; - size_t size; + unsigned long size; struct snd_dma_buffer new_dmab; guard(mutex)(&substream->pcm->open_mutex);
The previous replacement from simple_strtoul() to kstrtoul() forgot that the passed pointer must be an unsigned long int pointer, while the value used there is a sized_t pointer. Fix it. Fixes: 61bc4deff033 ("ALSA: pcm: replace simple_strtoul to kstrtoul") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202409010425.YPS7cWeJ-lkp@intel.com/ Signed-off-by: Takashi Iwai <tiwai@suse.de> --- sound/core/pcm_memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)