From: "Nguyen Anh Quynh" <aquynh@gmail.com>
To: "Andrew Morton" <akpm@linux-foundation.org>
Cc: "Al Viro" <viro@zeniv.linux.org.uk>,
LKML <linux-kernel@vger.kernel.org>,
"Kuniyasu Suzaki" <k.suzaki@aist.go.jp>
Subject: Re: [PATCH] fix calls to request_module()
Date: Thu, 11 Dec 2008 13:23:36 +0900 [thread overview]
Message-ID: <9cde8bff0812102023v60ce265bk394c420a29100b92@mail.gmail.com> (raw)
In-Reply-To: <20081210201455.0c611484.akpm@linux-foundation.org>
On Thu, Dec 11, 2008 at 1:14 PM, Andrew Morton
<akpm@linux-foundation.org> wrote:
> On Thu, 11 Dec 2008 04:01:18 +0000 Al Viro <viro@ZenIV.linux.org.uk> wrote:
>
>> On Thu, Dec 11, 2008 at 12:35:21PM +0900, Nguyen Anh Quynh wrote:
>> > Hi,
>> >
>> > The request_module() function should always have the 1st param as a
>> > format argument. So for example, request_module("i2c-powermac") should
>> > be called as request_module("%s", "i2c-powermac"). Otherwise, new gcc
>> > like gcc 4.3.2 on Ubuntu 8.10 would spit out a lot of warnings. This
>> > patch fixes them all in linus-git tree.
>>
>> ... and it doesn't address the underlying problems at all. A string literal
>> without a single % in it is a perfectly sane and valid format. _Why_ are
>> we getting these warning?
>
> extern int request_module(const char * name, ...) __attribute__ ((format (printf, 1, 2)));
>
Sorry that after the mail of Viro, I checked again by recover a code
and recompile, but got no warning. But actually that code should not
be compiled at all.
So I checked again by fixing the code that should be compiled
(sound/core/sound.c), and can confirm that without the patch we got
warning like below:
sound/core/sound.c: In function 'snd_request_other':
sound/core/sound.c:91: warning: format not a string literal and no
format arguments
And with the patch, the warnings are all gone.
So Andrew, please consider taking the patch.
Thanks,
Quynh
next prev parent reply other threads:[~2008-12-11 4:23 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-11 3:35 Nguyen Anh Quynh
2008-12-11 4:01 ` Al Viro
2008-12-11 4:14 ` Nguyen Anh Quynh
2008-12-11 4:14 ` Andrew Morton
2008-12-11 4:23 ` Nguyen Anh Quynh [this message]
2008-12-11 4:40 ` Jianjun Kong
2008-12-11 4:43 ` Nguyen Anh Quynh
2008-12-11 5:02 ` Jianjun Kong
2008-12-11 5:00 ` Al Viro
2008-12-11 5:42 ` Nguyen Anh Quynh
2008-12-11 6:00 ` Al Viro
2008-12-11 6:28 ` Nguyen Anh Quynh
2008-12-11 4:49 ` Al Viro
2008-12-11 5:03 ` Roland Dreier
2008-12-11 5:41 ` Andrew Morton
2008-12-11 23:25 ` Roland Dreier
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=9cde8bff0812102023v60ce265bk394c420a29100b92@mail.gmail.com \
--to=aquynh@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=k.suzaki@aist.go.jp \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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®