linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: "Christoph Böhmwalder" <christoph@boehmwalder.at>,
	johannes.berg@intel.com, emmanuel.grumbach@intel.com,
	luciano.coelho@intel.com, kvalo@codeaurora.org
Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] wireless: iwlwifi: wrap macro into braces
Date: Wed, 04 Oct 2017 09:14:24 -0700	[thread overview]
Message-ID: <1507133664.4434.7.camel@perches.com> (raw)
In-Reply-To: <20171004155700.18048-4-christoph@boehmwalder.at>

On Wed, 2017-10-04 at 17:57 +0200, Christoph Böhmwalder wrote:
> Macros should always be wrapped in braces, so fix this instance.
> 
> Signed-off-by: Christoph Böhmwalder <christoph@boehmwalder.at>
> ---
>  drivers/net/wireless/intel/iwlwifi/iwl-io.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-io.c b/drivers/net/wireless/intel/iwlwifi/iwl-io.c
> index efb1998dcabd..0211963b3e71 100644
> --- a/drivers/net/wireless/intel/iwlwifi/iwl-io.c
> +++ b/drivers/net/wireless/intel/iwlwifi/iwl-io.c
> @@ -252,7 +252,7 @@ IWL_EXPORT_SYMBOL(iwl_force_nmi);
>  
>  static const char *get_rfh_string(int cmd)
>  {
> -#define IWL_CMD(x) case x: return #x
> +#define IWL_CMD(x) { case x: return #x; }

I think this unnecessary.  Maybe:
http://lists.infradead.org/pipermail/ath10k/2017-February/009335.html

>  #define IWL_CMD_MQ(arg, reg, q) { if (arg == reg(q)) return #reg; }

But this should use do { ... } while (0)

  parent reply	other threads:[~2017-10-04 16:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-04 15:56 [PATCH 0/3] iwlwifi: cosmetic fixes Christoph Böhmwalder
2017-10-04 15:56 ` [PATCH 1/3] wireless: iwlwifi: use bool instead of int Christoph Böhmwalder
2017-10-04 16:15   ` Luciano Coelho
2017-10-04 16:26   ` Joe Perches
2017-10-04 16:39     ` Luciano Coelho
2017-10-04 17:55       ` Joe Perches
2017-10-04 19:18         ` Luciano Coelho
2017-10-04 15:56 ` [PATCH 2/3] wireless: iwlwifi: function definition cosmetic fix Christoph Böhmwalder
2017-10-04 16:13   ` Luciano Coelho
2017-10-04 15:57 ` [PATCH 3/3] wireless: iwlwifi: wrap macro into braces Christoph Böhmwalder
2017-10-04 16:08   ` Johannes Berg
2017-10-04 16:14   ` Joe Perches [this message]
2017-10-04 16:21 ` [PATCH 0/3] iwlwifi: cosmetic fixes Luciano Coelho

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=1507133664.4434.7.camel@perches.com \
    --to=joe@perches.com \
    --cc=christoph@boehmwalder.at \
    --cc=emmanuel.grumbach@intel.com \
    --cc=johannes.berg@intel.com \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=luciano.coelho@intel.com \
    --cc=netdev@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).