Re: [PATCH] staging: rtl8712: efuse: code style - avoid macro argument precedence issues

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

 




On Mon, 11 Apr 2022, aliya-rahmani wrote:

> This patch fixes the following checkpatch.pl check:
>  CHECK: Macro argument 'offset' and 'word_en' may be better as '(offset)' and 'word_en' to avoid precedence issues

Your messages say "avoid" and "fix", but they don't explicitly say what
you do.

>
> Signed-off-by: aliya-rahmani <aliyarahmani786@xxxxxxxxx>

This could be better as:

Aliya Rahmani <aliyarahmani786@xxxxxxxxx>

julia

> ---
>  drivers/staging/rtl8712/rtl8712_efuse.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/rtl8712/rtl8712_efuse.h b/drivers/staging/rtl8712/rtl8712_efuse.h
> index 4969d307e978..2e1ea9d7a295 100644
> --- a/drivers/staging/rtl8712/rtl8712_efuse.h
> +++ b/drivers/staging/rtl8712/rtl8712_efuse.h
> @@ -15,8 +15,8 @@
>
>  #define GET_EFUSE_OFFSET(header)	((header & 0xF0) >> 4)
>  #define GET_EFUSE_WORD_EN(header)	(header & 0x0F)
> -#define MAKE_EFUSE_HEADER(offset, word_en)	(((offset & 0x0F) << 4) | \
> -						(word_en & 0x0F))
> +#define MAKE_EFUSE_HEADER(offset, word_en)	((((offset) & 0x0F) << 4) | \
> +						((word_en) & 0x0F))
>  /*--------------------------------------------------------------------------*/
>  struct PGPKT_STRUCT {
>  	u8 offset;
> --
> 2.25.1
>
>
>




[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux