Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH] ALSA: ac97: Modify the incorrect format specifier
@ 2024-12-03  6:35 liujing
  2024-12-03 10:09 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: liujing @ 2024-12-03  6:35 UTC (permalink / raw)
  To: perex, tiwai; +Cc: linux-sound, linux-kernel, liujing

Replace %d with %u in snprintf() because it is "unsigned int".

Signed-off-by: liujing <liujing@cmss.chinamobile.com>

diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c
index 25f93e56cfc7..6e710dce5c60 100644
--- a/sound/pci/ac97/ac97_codec.c
+++ b/sound/pci/ac97/ac97_codec.c
@@ -1864,7 +1864,7 @@ void snd_ac97_get_name(struct snd_ac97 *ac97, unsigned int id, char *name, int m
 		strcat(name, " ");
 		strcat(name, pid->name);
 		if (pid->mask != 0xffffffff)
-			sprintf(name + strlen(name), " rev %d", id & ~pid->mask);
+			sprintf(name + strlen(name), " rev %u", id & ~pid->mask);
 		if (ac97 && pid->patch) {
 			if ((modem && (pid->flags & AC97_MODEM_PATCH)) ||
 			    (! modem && ! (pid->flags & AC97_MODEM_PATCH)))
-- 
2.27.0




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ALSA: ac97: Modify the incorrect format specifier
  2024-12-03  6:35 [PATCH] ALSA: ac97: Modify the incorrect format specifier liujing
@ 2024-12-03 10:09 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2024-12-03 10:09 UTC (permalink / raw)
  To: liujing; +Cc: perex, tiwai, linux-sound, linux-kernel

On Tue, 03 Dec 2024 07:35:53 +0100,
liujing wrote:
> 
> Replace %d with %u in snprintf() because it is "unsigned int".
> 
> Signed-off-by: liujing <liujing@cmss.chinamobile.com>

Thanks, applied now.


Takashi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-12-03 10:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-03  6:35 [PATCH] ALSA: ac97: Modify the incorrect format specifier liujing
2024-12-03 10:09 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox