Re: [PATCH] staging: wlan-ng: formatting cleanup

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

 



On Sat, Mar 02, 2019 at 06:32:13PM +0000, Mikhail Gusarov wrote:
> Wrap overlong lines in cfg80211.c
> 
> Signed-off-by: Mikhail Gusarov <dottedmag@xxxxxxxxxxxxx>
> ---
>  drivers/staging/wlan-ng/cfg80211.c | 31 ++++++++++++++++---------------
>  1 file changed, 16 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/staging/wlan-ng/cfg80211.c b/drivers/staging/wlan-ng/cfg80211.c
> index 8a862f718d5c..bdaa8fc4b55f 100644
> --- a/drivers/staging/wlan-ng/cfg80211.c
> +++ b/drivers/staging/wlan-ng/cfg80211.c
> @@ -374,7 +374,8 @@ static int prism2_scan(struct wiphy *wiphy,
>  			msg2.beaconperiod.data,
>  			ie_buf,
>  			ie_len,
> -			(msg2.signal.data - 65536) * 100, /* Conversion to signed type */
> +			/* Conversion to signed type */
> +			(msg2.signal.data - 65536) * 100,

That really doesn't make sense now, does it?

>  			GFP_KERNEL
>  		);
>  
> @@ -411,8 +412,8 @@ static int prism2_set_wiphy_params(struct wiphy *wiphy, u32 changed)
>  			data = wiphy->rts_threshold;
>  
>  		result = prism2_domibset_uint32(wlandev,
> -						DIDMIB_DOT11MAC_OPERATIONTABLE_RTSTHRESHOLD,
> -						data);
> +			DIDMIB_DOT11MAC_OPERATIONTABLE_RTSTHRESHOLD,
> +			data);

Ick, no, this is now harder to read.

Remember, checkpatch is a _hint_, you still have to use your brain when
using it.  Sometimes what it says to do is not always the best thing to
do for the code.

As an example here, those #defines are _HUGE_, perhaps make them
smaller, or use the ones in the "real" part of the kernel instead?  That
would fix the line length issue, right?

thanks,

greg k-h
_______________________________________________
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