Re: [PATCH v2 05/20] staging: rtl8188eu: ternary operator (?:) replaced by min_t kernel macro

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

 



On Tue, Oct 27, 2015 at 10:19:50PM +0700, Ivan Safonov wrote:
> min_t macro better conveys the meaning of the code.
> 
> Signed-off-by: Ivan Safonov <insafonov@xxxxxxxxx>
> ---
> Changes in v2:
>   - min replaced by mit_t.
> 
>  drivers/staging/rtl8188eu/core/rtw_efuse.c     | 2 +-
>  drivers/staging/rtl8188eu/core/rtw_mlme_ext.c  | 2 +-
>  drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/rtl8188eu/core/rtw_efuse.c b/drivers/staging/rtl8188eu/core/rtw_efuse.c
> index 685ce98..eb89423 100644
> --- a/drivers/staging/rtl8188eu/core/rtw_efuse.c
> +++ b/drivers/staging/rtl8188eu/core/rtw_efuse.c
> @@ -268,7 +268,7 @@ static void efuse_read_phymap_from_txpktbuf(
>  			aaa = le16_to_cpup((__le16 *)&lo32);
>  			len = le16_to_cpu(*((__le16 *)&lo32));
>  
> -			limit = (len-2 < limit) ? len-2 : limit;
> +			limit = min_t(u16, len-2, limit);

you could have fixed the spacing around '-' like the way you have done
for other '+' later in the patch.

regards
sudip
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [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