The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Nikolay Kulikov <nikolayof23@gmail.com>
To: Pramod Maurya <pramod.nexgen@gmail.com>
Cc: gregkh@linuxfoundation.org, linux-staging@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/4] staging: rtl8723bs: Fix comparison style in IS_CCK_RATE and IS_OFDM_RATE macros
Date: Mon, 11 May 2026 06:48:51 +0300	[thread overview]
Message-ID: <agFRo7v9NZ9Ogf7i@archlinux> (raw)
In-Reply-To: <20260510175207.563378-3-pramod.nexgen@gmail.com>

On Sun, May 10, 2026 at 01:52:05PM -0400, Pramod Maurya wrote:
> Place the variable on the left side of comparisons, wrap macro
> arguments in parentheses to avoid precedence issues, and wrap the
> long macro definitions with a line continuation.
> 
> Signed-off-by: Pramod Maurya <pramod.nexgen@gmail.com>
> ---
>  drivers/staging/rtl8723bs/include/ieee80211.h | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/rtl8723bs/include/ieee80211.h b/drivers/staging/rtl8723bs/include/ieee80211.h
> index 7a3609d019aa..11825ace95a9 100644
> --- a/drivers/staging/rtl8723bs/include/ieee80211.h
> +++ b/drivers/staging/rtl8723bs/include/ieee80211.h
> @@ -394,8 +394,10 @@ enum {
>  };
>  
>  #define IS_HT_RATE(_rate)				(_rate >= MGN_MCS0 && _rate <= MGN_MCS31)
> -#define IS_CCK_RATE(_rate)				(MGN_1M == _rate || _rate == MGN_2M || _rate == MGN_5_5M || _rate == MGN_11M)
> -#define IS_OFDM_RATE(_rate)				(MGN_6M <= _rate && _rate <= MGN_54M  && _rate != MGN_11M)
> +#define IS_CCK_RATE(_rate)				\
> +	((_rate) == MGN_1M || (_rate) == MGN_2M || (_rate) == MGN_5_5M || (_rate) == MGN_11M)
> +#define IS_OFDM_RATE(_rate)				\
> +	((_rate) >= MGN_6M && (_rate) <= MGN_54M && (_rate) != MGN_11M)

The IS_OFDM_RATE() macro is also not used, peprhaps it would be better
to remove it instead of formatting dead code? Of cource, in a separate
patch to avoid mixing up different changes.


Thanks,
Nikolay

  reply	other threads:[~2026-05-11  3:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-10 17:52 [PATCH v2 0/4] staging: rtl8723bs: Fix coding style in ieee80211.h Pramod Maurya
2026-05-10 17:52 ` [PATCH v2 1/4] staging: rtl8723bs: Replace __attribute__((packed)) with __packed " Pramod Maurya
2026-05-10 17:52 ` [PATCH v2 2/4] staging: rtl8723bs: Fix comparison style in IS_CCK_RATE and IS_OFDM_RATE macros Pramod Maurya
2026-05-11  3:48   ` Nikolay Kulikov [this message]
2026-05-11  8:11   ` Greg KH
2026-05-10 17:52 ` [PATCH v2 3/4] staging: rtl8723bs: Fix block comment style in ieee80211.h Pramod Maurya
2026-05-10 17:52 ` [PATCH v2 4/4] staging: rtl8723bs: Enclose CHAN_ARG macro body in parentheses Pramod Maurya
2026-05-10 19:58   ` Nikolay Kulikov
2026-05-11  8:12   ` Greg KH

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=agFRo7v9NZ9Ogf7i@archlinux \
    --to=nikolayof23@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=pramod.nexgen@gmail.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