From: Takashi Iwai <tiwai@suse.de>
To: liujing <liujing@cmss.chinamobile.com>
Cc: perex@perex.cz, tiwai@suse.com, ghanshyam1898@gmail.com,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ALSA: au88x0: Modify the incorrect format specifier
Date: Fri, 06 Dec 2024 13:48:52 +0100 [thread overview]
Message-ID: <87r06lrn7v.wl-tiwai@suse.de> (raw)
In-Reply-To: <20241206020543.2153-1-liujing@cmss.chinamobile.com>
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@cmss.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
>
>
>
prev parent reply other threads:[~2024-12-06 12:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-06 2:05 liujing
2024-12-06 12:48 ` Takashi Iwai [this message]
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=87r06lrn7v.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=ghanshyam1898@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=liujing@cmss.chinamobile.com \
--cc=perex@perex.cz \
--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
all inboxes | Powered by JetHome®