All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Joe Perches <joe@perches.com>
Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org,
	Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Subject: Re: [PATCH 1/4] iwlwifi: Add __printf argument checking to __iwl_dbg
Date: Thu, 10 May 2012 18:50:34 +0200	[thread overview]
Message-ID: <1336668634.4334.23.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <1336667905.22495.18.camel@joe2Laptop>

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@perches.com>
> ---
>  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)
>  
>  #if defined(CONFIG_IWLWIFI_DEBUG) || defined(CONFIG_IWLWIFI_DEVICE_TRACING)
> +__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?

johannes


  reply	other threads:[~2012-05-10 16:50 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-10 16:05 [PATCH 0/4] iwlwifi fixes Johannes Berg
2012-05-10 16:05 ` [PATCH 1/4] iwlwifi: fix prints in iwl_rx_handle Johannes Berg
2012-05-10 16:38   ` [PATCH 1/4] iwlwifi: Add __printf argument checking to __iwl_dbg Joe Perches
2012-05-10 16:50     ` Johannes Berg [this message]
2012-05-10 16:56       ` Johannes Berg
2012-05-10 17:34       ` Joe Perches
2012-05-10 17:40         ` Johannes Berg
2012-05-10 18:01           ` Joe Perches
2012-05-11 10:59   ` [PATCH 1/4 v2] iwlwifi: fix prints in iwl_rx_handle Johannes Berg
2012-05-11 16:49     ` Sedat Dilek
2012-05-10 16:05 ` [PATCH 2/4] iwlwifi: fix the Transmit Frame Descriptor rings Johannes Berg
2012-05-11 12:50   ` [PATCH 2/4 v2] " Johannes Berg
2012-05-11 16:50     ` Sedat Dilek
2012-05-16 15:16   ` [PATCH 2/4] " Johannes Berg
2012-05-10 16:05 ` [PATCH 3/4] iwlwifi: fix debug print in iwl_sta_calc_ht_flags Johannes Berg
2012-05-11 16:52   ` Sedat Dilek
2012-05-10 16:05 ` [PATCH 4/4] iwlwifi: do not send lq cmd when station add fails Johannes Berg
2012-05-11 16:53   ` Sedat Dilek
2012-05-16 17:05 ` [PATCH 0/4] iwlwifi fixes John W. Linville

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1336668634.4334.23.camel@jlt3.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=emmanuel.grumbach@intel.com \
    --cc=joe@perches.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.