From: Joe Perches <joe@perches.com>
To: Matthew Tyler <matt.tyler@flashics.com>
Cc: jes.sorensen@redhat.com, linux-wireless@vger.kernel.org
Subject: Re: [PATCH] rtl8732au: Fix coding style violations in ieee80211.h
Date: Fri, 10 Oct 2014 21:31:11 -0700 [thread overview]
Message-ID: <1413001871.8770.52.camel@joe-AO725> (raw)
In-Reply-To: <20141011041923.GA9075@ZeroX.Belkin>
On Sat, 2014-10-11 at 12:19 +0800, Matthew Tyler wrote:
> Signed-off-by: Matthew Tyler <matt.tyler@flashics.com>
[]
> diff --git a/drivers/staging/rtl8723au/include/ieee80211.h b/drivers/staging/rtl8723au/include/ieee80211.h
[]
> -#define IsSupported24G(NetType) (NetType & SUPPORTED_24G_NETTYPE_MSK ? true : false)
> -#define IsSupported5G(NetType) (NetType & SUPPORTED_5G_NETTYPE_MSK ? true : false)
> +#define IsSupported24G(NetType) \
> + (NetType & SUPPORTED_24G_NETTYPE_MSK ? true : false)
A lot of these would be better as static inlines or
maybe using !! instead of ternaries.
But it doesn't seem any of these IsSupported<foo> macros
are used at all, so probably deleting is best.
> @@ -266,7 +277,9 @@ join_res:
> */
>
> #define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x"
> -#define MAC_ARG(x) ((u8*)(x))[0],((u8*)(x))[1],((u8*)(x))[2],((u8*)(x))[3],((u8*)(x))[4],((u8*)(x))[5]
> +#define MAC_ARG(x) \
> + (((u8 *)(x))[0], ((u8 *)(x))[1], ((u8 *)(x))[2], \
> + ((u8 *)(x))[3], ((u8 *)(x))[4], ((u8 *)(x))[5])
It'd be better to convert these to use %pM
prev parent reply other threads:[~2014-10-11 4:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-11 4:19 [PATCH] rtl8732au: Fix coding style violations in ieee80211.h Matthew Tyler
2014-10-11 4:31 ` Joe Perches [this message]
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=1413001871.8770.52.camel@joe-AO725 \
--to=joe@perches.com \
--cc=jes.sorensen@redhat.com \
--cc=linux-wireless@vger.kernel.org \
--cc=matt.tyler@flashics.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox