Search Linux Wireless

Re: [PATCH 1/4] iwlwifi: Add __printf argument checking to __iwl_dbg

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

On Thu, 2012-05-10 at 09:38 -0700, Joe Perches wrote:
> Add gcc format and argument printf checking
> to reduce future defect introduction.

Good point, I'll pick this up.

> Signed-off-by: Joe Perches <joe@xxxxxxxxxxx>
> ---
>  drivers/net/wireless/iwlwifi/iwl-debug.h |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> diff --git a/drivers/net/wireless/iwlwifi/iwl-debug.h b/drivers/net/wireless/iwlwifi/iwl-debug.h
> index 8376b84..d0c7c9e 100644
> --- a/drivers/net/wireless/iwlwifi/iwl-debug.h
> +++ b/drivers/net/wireless/iwlwifi/iwl-debug.h
> @@ -50,10 +50,12 @@ void __iwl_crit(struct device *dev, const char *fmt, ...);
>  #define IWL_CRIT(m, f, a...) __iwl_crit((m)->dev, f, ## a)
> +__printf(5, 6)
>  void __iwl_dbg(struct device *dev,
>  	       u32 level, bool limit, const char *function,
>  	       const char *fmt, ...);

But that looks a bit odd to me? It would seem more natural to me to put
the attribute after the parameter list?


To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at

[Linux Kernel]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Photo]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]     [Free Dating]     [M2M Wireless]

Add to Google Powered by Linux