[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20081021064144.GC30563@logfs.org>
Date: Tue, 21 Oct 2008 08:41:45 +0200
From: Jörn Engel <joern@...fs.org>
To: Ingo Molnar <mingo@...e.hu>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Roland Dreier <rdreier@...co.com>,
Andrew Morton <akpm@...ux-foundation.org>,
"David S. Miller" <davem@...emloft.net>,
Alan Cox <alan@...rguk.ukuu.org.uk>,
linux-kernel@...r.kernel.org,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Thomas Gleixner <tglx@...utronix.de>,
"H. Peter Anvin" <hpa@...or.com>,
David Howells <dhowells@...hat.com>
Subject: Re: [announce] new tree: "fix all build warnings, on all configs"
On Mon, 20 October 2008 21:21:10 +0200, Ingo Molnar wrote:
>
> /* Alas, no aliases. Too much hassle with bringing module.h everywhere */
> #define fops_get(fops) \
> - (((fops) && try_module_get((fops)->owner) ? (fops) : NULL))
> + (((fops != NULL) && try_module_get((fops)->owner) ? (fops) : NULL))
> #define fops_put(fops) \
> - do { if (fops) module_put((fops)->owner); } while(0)
> + do { if (fops != NULL) module_put((fops)->owner); } while(0)
This, I would argue, makes the code worse.
> diff --git a/include/linux/audit.h b/include/linux/audit.h
> index 6272a39..a3f78d0 100644
> --- a/include/linux/audit.h
> +++ b/include/linux/audit.h
> @@ -580,7 +580,8 @@ extern int audit_enabled;
> #define audit_log(c,g,t,f,...) do { ; } while (0)
> #define audit_log_start(c,g,t) ({ NULL; })
> #define audit_log_vformat(b,f,a) do { ; } while (0)
> -#define audit_log_format(b,f,...) do { ; } while (0)
> +static inline void __attribute__ ((format(printf, 2, 3)))
> +audit_log_format(struct audit_buffer *ab, const char *fmt, ...) { }
Took me a moment to notice the two lines aren't independent. A tab
would have been appreciated.
> diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h
> index 427b820..ac55b62 100644
> --- a/drivers/net/wireless/b43/b43.h
> +++ b/drivers/net/wireless/b43/b43.h
> @@ -853,7 +853,8 @@ void b43warn(struct b43_wl *wl, const char *fmt, ...)
> void b43dbg(struct b43_wl *wl, const char *fmt, ...)
> __attribute__ ((format(printf, 2, 3)));
> #else /* DEBUG */
> -# define b43dbg(wl, fmt...) do { /* nothing */ } while (0)
> +static inline void __attribute__ ((format(printf, 2, 3)))
> +b43dbg(struct b43_wl *wl, const char *fmt, ...) { }
Dito.
Jörn
--
A victorious army first wins and then seeks battle.
-- Sun Tzu
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists