* [PATCH] cx88: fix printk arg. type
@ 2004-11-16 23:13 Randy.Dunlap
2004-11-17 17:25 ` Gerd Knorr
0 siblings, 1 reply; 8+ messages in thread
From: Randy.Dunlap @ 2004-11-16 23:13 UTC (permalink / raw)
To: kraxel, jelle, lkml, akpm
[-- Attachment #1: Type: text/plain, Size: 260 bytes --]
drivers/media/video/cx88/cx88-blackbird.c:366: warning: long int
format, size_t arg (arg 3)
diffstat:=
drivers/media/video/cx88/cx88-blackbird.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
Signed-off-by: Randy Dunlap <rddunlap@osdl.org>
[-- Attachment #2: cx88_types.patch --]
[-- Type: text/x-patch, Size: 623 bytes --]
diff -Naurp ./drivers/media/video/cx88/cx88-blackbird.c~cx88_types ./drivers/media/video/cx88/cx88-blackbird.c
--- ./drivers/media/video/cx88/cx88-blackbird.c~cx88_types 2004-11-16 13:33:31.446369688 -0800
+++ ./drivers/media/video/cx88/cx88-blackbird.c 2004-11-16 14:34:56.221198768 -0800
@@ -363,7 +363,7 @@ static int blackbird_load_firmware(struc
}
if (firmware->size != BLACKBIRD_FIRM_IMAGE_SIZE) {
- dprintk(0, "ERROR: Firmware size mismatch (have %ld, expected %d)\n",
+ dprintk(0, "ERROR: Firmware size mismatch (have %Zd, expected %d)\n",
firmware->size, BLACKBIRD_FIRM_IMAGE_SIZE);
return -1;
}
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] cx88: fix printk arg. type
2004-11-16 23:13 [PATCH] cx88: fix printk arg. type Randy.Dunlap
@ 2004-11-17 17:25 ` Gerd Knorr
2004-11-17 17:47 ` Randy.Dunlap
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Gerd Knorr @ 2004-11-17 17:25 UTC (permalink / raw)
To: Randy.Dunlap; +Cc: jelle, lkml, akpm
> - dprintk(0, "ERROR: Firmware size mismatch (have %ld, expected %d)\n",
> + dprintk(0, "ERROR: Firmware size mismatch (have %Zd, expected %d)\n",
Thanks, merged to cvs. I like that 'Z'. Or is that just a linux-kernel
printk specific thingy? Or is this standardized somewhere? So I could
use that in userspace code as well maybe?
Gerd
--
#define printk(args...) fprintf(stderr, ## args)
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] cx88: fix printk arg. type
2004-11-17 17:25 ` Gerd Knorr
@ 2004-11-17 17:47 ` Randy.Dunlap
2004-11-17 18:22 ` Gerd Knorr
2004-11-17 19:22 ` Andrew Morton
2004-11-17 17:58 ` Al Viro
2004-11-17 18:21 ` Jelle Foks
2 siblings, 2 replies; 8+ messages in thread
From: Randy.Dunlap @ 2004-11-17 17:47 UTC (permalink / raw)
To: Gerd Knorr; +Cc: jelle, lkml, akpm
Gerd Knorr wrote:
>>- dprintk(0, "ERROR: Firmware size mismatch (have %ld, expected %d)\n",
>>+ dprintk(0, "ERROR: Firmware size mismatch (have %Zd, expected %d)\n",
>
>
> Thanks, merged to cvs. I like that 'Z'. Or is that just a linux-kernel
> printk specific thingy? Or is this standardized somewhere? So I could
> use that in userspace code as well maybe?
Kernel supports/allows 'Z' or 'z'.
C99 spec defines 'z' only as a size_t format length modifier:
z Specifies that a following d, i, o, u, x, or X conversion
specifier applies to a size_t or the corresponding signed integer type
argument; or that a following n conversion specifier applies to a
pointer to a signed integer type corresponding to size_t argument.
Anyway, I agree with Al. Will you please change it to
'z' instead of 'Z'?
Thanks,
--
~Randy
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] cx88: fix printk arg. type
2004-11-17 17:47 ` Randy.Dunlap
@ 2004-11-17 18:22 ` Gerd Knorr
2004-11-17 19:22 ` Andrew Morton
1 sibling, 0 replies; 8+ messages in thread
From: Gerd Knorr @ 2004-11-17 18:22 UTC (permalink / raw)
To: Randy.Dunlap; +Cc: jelle, lkml, akpm
> C99 spec defines 'z' only as a size_t format length modifier:
Thanks.
> Anyway, I agree with Al. Will you please change it to
> 'z' instead of 'Z'?
Done.
Gerd
--
#define printk(args...) fprintf(stderr, ## args)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] cx88: fix printk arg. type
2004-11-17 17:47 ` Randy.Dunlap
2004-11-17 18:22 ` Gerd Knorr
@ 2004-11-17 19:22 ` Andrew Morton
2004-11-17 19:12 ` Randy.Dunlap
1 sibling, 1 reply; 8+ messages in thread
From: Andrew Morton @ 2004-11-17 19:22 UTC (permalink / raw)
To: Randy.Dunlap; +Cc: kraxel, jelle, linux-kernel
"Randy.Dunlap" <rddunlap@osdl.org> wrote:
>
> Gerd Knorr wrote:
> >>- dprintk(0, "ERROR: Firmware size mismatch (have %ld, expected %d)\n",
> >>+ dprintk(0, "ERROR: Firmware size mismatch (have %Zd, expected %d)\n",
> >
> >
> > Thanks, merged to cvs. I like that 'Z'. Or is that just a linux-kernel
> > printk specific thingy? Or is this standardized somewhere? So I could
> > use that in userspace code as well maybe?
>
> Kernel supports/allows 'Z' or 'z'.
> C99 spec defines 'z' only as a size_t format length modifier:
>
> z Specifies that a following d, i, o, u, x, or X conversion
> specifier applies to a size_t or the corresponding signed integer type
> argument; or that a following n conversion specifier applies to a
> pointer to a signed integer type corresponding to size_t argument.
>
> Anyway, I agree with Al. Will you please change it to
> 'z' instead of 'Z'?
gcc-2.95.x generates warnings for `z', but is happy with 'Z'.
But I seem to be the only person who uses 2.95, and I patched my version to
stop that warning anyway, so...
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] cx88: fix printk arg. type
2004-11-17 19:22 ` Andrew Morton
@ 2004-11-17 19:12 ` Randy.Dunlap
0 siblings, 0 replies; 8+ messages in thread
From: Randy.Dunlap @ 2004-11-17 19:12 UTC (permalink / raw)
To: Andrew Morton; +Cc: kraxel, jelle, linux-kernel
Andrew Morton wrote:
> "Randy.Dunlap" <rddunlap@osdl.org> wrote:
>
>>Gerd Knorr wrote:
>> Kernel supports/allows 'Z' or 'z'.
>> C99 spec defines 'z' only as a size_t format length modifier:
>>
>> z Specifies that a following d, i, o, u, x, or X conversion
>> specifier applies to a size_t or the corresponding signed integer type
>> argument; or that a following n conversion specifier applies to a
>> pointer to a signed integer type corresponding to size_t argument.
>>
>> Anyway, I agree with Al. Will you please change it to
>> 'z' instead of 'Z'?
>
>
> gcc-2.95.x generates warnings for `z', but is happy with 'Z'.
>
> But I seem to be the only person who uses 2.95, and I patched my version to
> stop that warning anyway, so...
Argh, I had forgotten that one....
--
~Randy
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] cx88: fix printk arg. type
2004-11-17 17:25 ` Gerd Knorr
2004-11-17 17:47 ` Randy.Dunlap
@ 2004-11-17 17:58 ` Al Viro
2004-11-17 18:21 ` Jelle Foks
2 siblings, 0 replies; 8+ messages in thread
From: Al Viro @ 2004-11-17 17:58 UTC (permalink / raw)
To: Gerd Knorr; +Cc: Randy.Dunlap, jelle, lkml, akpm
On Wed, Nov 17, 2004 at 06:25:19PM +0100, Gerd Knorr wrote:
> > - dprintk(0, "ERROR: Firmware size mismatch (have %ld, expected %d)\n",
> > + dprintk(0, "ERROR: Firmware size mismatch (have %Zd, expected %d)\n",
>
> Thanks, merged to cvs. I like that 'Z'. Or is that just a linux-kernel
> printk specific thingy? Or is this standardized somewhere? So I could
> use that in userspace code as well maybe?
'Z' is an obsolete equivalent of standard 'z'. That one is portable and it
is, indeed, available in userland (libc6 and anything C99-compliant). To
quote the manpage:
z A following integer conversion corresponds to a size_t or
ssize_t argument. (Linux libc5 has Z with this meaning. Don't
use it.)
t A following integer conversion corresponds to a ptrdiff_t argu-
ment.
Please, do s/Zd/zd/.
One more thing: folks, please stop using crap like "%08x", (int)pointer.
It's not only non-portable (consider 64bit boxen), it's extra work for
no good reason. "%p" is standard and will do the right thing with less
PITA.
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] cx88: fix printk arg. type
2004-11-17 17:25 ` Gerd Knorr
2004-11-17 17:47 ` Randy.Dunlap
2004-11-17 17:58 ` Al Viro
@ 2004-11-17 18:21 ` Jelle Foks
2 siblings, 0 replies; 8+ messages in thread
From: Jelle Foks @ 2004-11-17 18:21 UTC (permalink / raw)
To: Gerd Knorr; +Cc: Randy.Dunlap, lkml, akpm
On Wed, 2004-11-17 at 12:25, Gerd Knorr wrote:
> > - dprintk(0, "ERROR: Firmware size mismatch (have %ld, expected %d)\n",
> > + dprintk(0, "ERROR: Firmware size mismatch (have %Zd, expected %d)\n",
>
> Thanks, merged to cvs. I like that 'Z'. Or is that just a linux-kernel
> printk specific thingy? Or is this standardized somewhere? So I could
> use that in userspace code as well maybe?
btw Gerd, did you see the patch I sent to the video4linux mailing list
last sunday? It includes some small fixes to make things much closer to
working (some +1/-1 type fixes). After that patch, the main open issue
is syncing the video scaling and audio muting settings between the two
video devices/chips (2388 and 23416) -> The cx23416 needs to be set to
the same (/related) video scaling settings as the 2388, and the 2388
audio must be unmuted for the mpeg stream to contain audio.
And of course then it needs some ioctl for the mpeg codec settings.
Jelle.
>
> Gerd
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2004-11-17 19:29 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-16 23:13 [PATCH] cx88: fix printk arg. type Randy.Dunlap
2004-11-17 17:25 ` Gerd Knorr
2004-11-17 17:47 ` Randy.Dunlap
2004-11-17 18:22 ` Gerd Knorr
2004-11-17 19:22 ` Andrew Morton
2004-11-17 19:12 ` Randy.Dunlap
2004-11-17 17:58 ` Al Viro
2004-11-17 18:21 ` Jelle Foks
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox