* commit 45cd8d8e -- why?
@ 2007-04-28 2:50 Roland Dreier
2007-04-28 4:49 ` Andrew Morton
0 siblings, 1 reply; 3+ messages in thread
From: Roland Dreier @ 2007-04-28 2:50 UTC (permalink / raw)
To: akpm, gregkh; +Cc: linux-kernel
The changelog says:
fs/sysfs/bin.c: In function 'read':
fs/sysfs/bin.c:77: warning: format '%zd' expects type 'signed size_t', but argument 4 has type 'int'
but the signature of the function read() is
read(struct file * file, char __user * userbuf, size_t count, loff_t * off)
and git blame seems to show it was always thus -- ie count was always size_t.
And now on x86-64 and ia64 with gcc 4.1 at least, I get:
fs/sysfs/bin.c: In function 'read':
fs/sysfs/bin.c:62: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'
Andrew, what compiler were you using to get that warning? Should we
revert commit 45cd8d8e?
- R.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: commit 45cd8d8e -- why?
2007-04-28 2:50 commit 45cd8d8e -- why? Roland Dreier
@ 2007-04-28 4:49 ` Andrew Morton
2007-04-28 4:54 ` Tejun Heo
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2007-04-28 4:49 UTC (permalink / raw)
To: Roland Dreier; +Cc: gregkh, linux-kernel, Tejun Heo
On Fri, 27 Apr 2007 19:50:19 -0700 Roland Dreier <rdreier@cisco.com> wrote:
> The changelog says:
>
> fs/sysfs/bin.c: In function 'read':
> fs/sysfs/bin.c:77: warning: format '%zd' expects type 'signed size_t', but argument 4 has type 'int'
>
> but the signature of the function read() is
>
> read(struct file * file, char __user * userbuf, size_t count, loff_t * off)
>
> and git blame seems to show it was always thus -- ie count was always size_t.
>
> And now on x86-64 and ia64 with gcc 4.1 at least, I get:
>
> fs/sysfs/bin.c: In function 'read':
> fs/sysfs/bin.c:62: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'
Some patches landed out of order. In Greg's tree (with Tejun's patches)
`count' is a local variable (not an incoming arg) of type `int'.
So this patch was against Tejun's stuff, not against mainline.
I'd have picked that up, but I went and assumed that it was a victim of the
new dev_dbg() printk arg checking stuff. Ho hum.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: commit 45cd8d8e -- why?
2007-04-28 4:49 ` Andrew Morton
@ 2007-04-28 4:54 ` Tejun Heo
0 siblings, 0 replies; 3+ messages in thread
From: Tejun Heo @ 2007-04-28 4:54 UTC (permalink / raw)
To: Andrew Morton; +Cc: Roland Dreier, gregkh, linux-kernel
Andrew Morton wrote:
> On Fri, 27 Apr 2007 19:50:19 -0700 Roland Dreier <rdreier@cisco.com> wrote:
>
>> The changelog says:
>>
>> fs/sysfs/bin.c: In function 'read':
>> fs/sysfs/bin.c:77: warning: format '%zd' expects type 'signed size_t', but argument 4 has type 'int'
>>
>> but the signature of the function read() is
>>
>> read(struct file * file, char __user * userbuf, size_t count, loff_t * off)
>>
>> and git blame seems to show it was always thus -- ie count was always size_t.
>>
>> And now on x86-64 and ia64 with gcc 4.1 at least, I get:
>>
>> fs/sysfs/bin.c: In function 'read':
>> fs/sysfs/bin.c:62: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'
>
> Some patches landed out of order. In Greg's tree (with Tejun's patches)
> `count' is a local variable (not an incoming arg) of type `int'.
>
> So this patch was against Tejun's stuff, not against mainline.
>
> I'd have picked that up, but I went and assumed that it was a victim of the
> new dev_dbg() printk arg checking stuff. Ho hum.
Ah.. I already have this fix merged in my patch series. I'm currently
testing things, so please be patient a little bit more. Thanks.
--
tejun
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-04-28 4:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-28 2:50 commit 45cd8d8e -- why? Roland Dreier
2007-04-28 4:49 ` Andrew Morton
2007-04-28 4:54 ` Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox