Re: [PATCH] staging: rtl8723bs: add whitespace before operator

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

 



On Sat, May 13, 2023 at 12:10:16PM +0000, Atin Bainada wrote:
> fix the following post-commit hook checkpatch error:

We have no default "post-commit hooks" :)

You can run checkpatch.pl on a file, perhaps that is what you did here?

> spaces required around that '?' (ctx:VxW)
> 2278: FILE: rtl8723b_hal_init.c:2278:
> +                       pHalData->ant_path = (tempval & BIT(6))? RF_PATH_B : RF_PATH_A;
>                                                                ^
> 
> Signed-off-by: Atin Bainada <hi@xxxxxxxx>
> ---
>  drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
> index c3c1b49674d3..abfaf1eebf5b 100644
> --- a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
> +++ b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
> @@ -2275,7 +2275,7 @@ void Hal_EfuseParseBTCoexistInfo_8723B(
>  			pHalData->EEPROMBluetoothAntNum = tempval & BIT(0);
>  			/*  EFUSE_0xC3[6] == 0, S1(Main)-RF_PATH_A; */
>  			/*  EFUSE_0xC3[6] == 1, S0(Aux)-RF_PATH_B */
> -			pHalData->ant_path = (tempval & BIT(6))? RF_PATH_B : RF_PATH_A;
> +			pHalData->ant_path = (tempval & BIT(6)) ? RF_PATH_B : RF_PATH_A;

Why not rewrite this as a real if () statement to make it more
understandable?

thanks,

greg k-h




[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