lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87r06lrn7v.wl-tiwai@suse.de>
Date: Fri, 06 Dec 2024 13:48:52 +0100
From: Takashi Iwai <tiwai@...e.de>
To: liujing <liujing@...s.chinamobile.com>
Cc: perex@...ex.cz,
	tiwai@...e.com,
	ghanshyam1898@...il.com,
	linux-sound@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ALSA: au88x0: Modify the incorrect format specifier

On Fri, 06 Dec 2024 03:05:43 +0100,
liujing wrote:
> 
> Make a minor change to eliminate a static checker warning. The type
> of chip->irq is unsigned int, so the correct format specifier should be
> %u instead of %i.
> 
> Signed-off-by: liujing <liujing@...s.chinamobile.com>

In this particular case, it's better to correct snd_vortex.irq to be
normal signed int.  The validity check is with a negative value, as
it's initialized with -1.


thanks,

Takashi

> 
> diff --git a/sound/pci/au88x0/au88x0.c b/sound/pci/au88x0/au88x0.c
> index 62b10b0e07b1..e3b1d7116110 100644
> --- a/sound/pci/au88x0/au88x0.c
> +++ b/sound/pci/au88x0/au88x0.c
> @@ -223,7 +223,7 @@ __snd_vortex_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
>  	// Card details needed in snd_vortex_midi
>  	strcpy(card->driver, CARD_NAME_SHORT);
>  	sprintf(card->shortname, "Aureal Vortex %s", CARD_NAME_SHORT);
> -	sprintf(card->longname, "%s at 0x%lx irq %i",
> +	sprintf(card->longname, "%s at 0x%lx irq %u",
>  		card->shortname, chip->io, chip->irq);
>  
>  	// (4) Alloc components.
> -- 
> 2.27.0
> 
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ