Re: [PATCH] Staging: bcm2048: Fix function argument alignment in radio-bcm2048.c.

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

 



On Sun, Feb 18, 2018 at 04:44:46PM -0800, Quytelda Kahja wrote:
> Fix a coding style problem.
> 
> Signed-off-by: Quytelda Kahja <quytelda@xxxxxxxxxxx>
> ---
>  drivers/staging/media/bcm2048/radio-bcm2048.c | 24 ++++++++++++------------
>  1 file changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/staging/media/bcm2048/radio-bcm2048.c b/drivers/staging/media/bcm2048/radio-bcm2048.c
> index 06d1920150da..94141a11e51b 100644
> --- a/drivers/staging/media/bcm2048/radio-bcm2048.c
> +++ b/drivers/staging/media/bcm2048/radio-bcm2048.c
> @@ -1846,6 +1846,7 @@ static int bcm2048_deinit(struct bcm2048_device *bdev)
>  static int bcm2048_probe(struct bcm2048_device *bdev)
>  {
>  	int err;
> +	u8 default_threshold = BCM2048_DEFAULT_RSSI_THRESHOLD;
>  
>  	err = bcm2048_set_power_state(bdev, BCM2048_POWER_ON);
>  	if (err < 0)
> @@ -1863,8 +1864,7 @@ static int bcm2048_probe(struct bcm2048_device *bdev)
>  	if (err < 0)
>  		goto unlock;
>  
> -	err = bcm2048_set_fm_search_rssi_threshold(bdev,
> -					BCM2048_DEFAULT_RSSI_THRESHOLD);
> +	err = bcm2048_set_fm_search_rssi_threshold(bdev, default_threshold);

Nah.  Don't do this.

There were some of your earlier patches where I thought:

	gdm->tty_dev->send_func(...

Could be shortened to:

	tty->send_func(...

So sometimes introducing shorter aliases is the right thing.  But here
it just makes it look like a variable when it's a constant.  It's makes
the code slightly less readable.

Just ignore the warning.

regards,
dan carpenter

_______________________________________________
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