]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
autofs4: fix debug printk warning uncovered by cleanup
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 8 Aug 2011 18:55:20 +0000 (11:55 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 8 Aug 2011 19:02:43 +0000 (12:02 -0700)
The previous comit made the autofs4 debug printouts check types against
the printout format, and uncovered this bug:

  fs/autofs4/waitq.c:106:2: warning: format ‘%08lx’ expects type ‘long unsigned int’, but argument 4 has type ‘autofs_wqt_t’

which is due to the insane type for wait_queue_token.  That thing should
be some fixed well-defined size (preferably just 'unsigned int' or
'u32') but for unexplained reasons it is randomly either 'unsigned long'
or 'unsigned int' depending on the architecture.

For now, cast it to 'unsigned long' for printing, the way we do
elsewhere.  Somebody else can try to explain the typedef mess.

(There's a reason we don't support excessive use of typedefs in the
kernel: it's usually just a good way of confusing yourself).

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/autofs4/waitq.c

index 25435987d6ae1cdcbbcfea4e9bf4d744c55bab44..e1fbdeef85db2e4b73e78eaf6266d2784e2385b0 100644 (file)
@@ -104,7 +104,7 @@ static void autofs4_notify_daemon(struct autofs_sb_info *sbi,
        size_t pktsz;
 
        DPRINTK("wait id = 0x%08lx, name = %.*s, type=%d",
        size_t pktsz;
 
        DPRINTK("wait id = 0x%08lx, name = %.*s, type=%d",
-               wq->wait_queue_token, wq->name.len, wq->name.name, type);
+               (unsigned long) wq->wait_queue_token, wq->name.len, wq->name.name, type);
 
        memset(&pkt,0,sizeof pkt); /* For security reasons */
 
 
        memset(&pkt,0,sizeof pkt); /* For security reasons */