Re: [PATCH] Fixing coding style issues in wilc1000/wilc_debugfs.c

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

 



On Tue, May 02, 2017 at 09:49:29AM +0200, Vincent Siles wrote:
> Most of them were easily fixed. The only invasive fix was the split
> of the info string line 63 because:
> - it was too long
> - checkpath doesn't like 'quoted string split across lines'

Please fix up your subject line to look more like others for this
driver.  Use git to see them.

> 
> Signed-off-by: Vincent Siles <vincent.siles@xxxxxxxxxxxxx>
> ---
>  drivers/staging/wilc1000/wilc_debugfs.c | 28 +++++++++++++++++++---------
>  1 file changed, 19 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/staging/wilc1000/wilc_debugfs.c b/drivers/staging/wilc1000/wilc_debugfs.c
> index 7d32de9..011438e 100644
> --- a/drivers/staging/wilc1000/wilc_debugfs.c
> +++ b/drivers/staging/wilc1000/wilc_debugfs.c
> @@ -20,7 +20,7 @@
>  static struct dentry *wilc_dir;
>  
>  /*
> - * --------------------------------------------------------------------------------
> + * ----------------------------------------------------------------------------
>   */
>  #define DEBUG           BIT(0)
>  #define INFO            BIT(1)
> @@ -32,10 +32,11 @@
>  EXPORT_SYMBOL_GPL(WILC_DEBUG_LEVEL);
>  
>  /*
> - * --------------------------------------------------------------------------------
> + * ----------------------------------------------------------------------------
>   */
>  
> -static ssize_t wilc_debug_level_read(struct file *file, char __user *userbuf, size_t count, loff_t *ppos)
> +static ssize_t wilc_debug_level_read(struct file *file, char __user *userbuf,
> +				     size_t count, loff_t *ppos)
>  {
>  	char buf[128];
>  	int res = 0;
> @@ -44,13 +45,15 @@ static ssize_t wilc_debug_level_read(struct file *file, char __user *userbuf, si
>  	if (*ppos > 0)
>  		return 0;
>  
> -	res = scnprintf(buf, sizeof(buf), "Debug Level: %x\n", atomic_read(&WILC_DEBUG_LEVEL));
> +	res = scnprintf(buf, sizeof(buf), "Debug Level: %x\n",
> +			atomic_read(&WILC_DEBUG_LEVEL));
>  
>  	return simple_read_from_buffer(userbuf, count, ppos, buf, res);
>  }
>  
> -static ssize_t wilc_debug_level_write(struct file *filp, const char __user *buf,
> -				      size_t count, loff_t *ppos)
> +static ssize_t wilc_debug_level_write(struct file *filp,
> +				      const char __user *buf, size_t count,
> +				      loff_t *ppos)
>  {
>  	int flag = 0;
>  	int ret;
> @@ -60,7 +63,9 @@ static ssize_t wilc_debug_level_write(struct file *filp, const char __user *buf,
>  		return ret;
>  
>  	if (flag > DBG_LEVEL_ALL) {
> -		pr_info("%s, value (0x%08x) is out of range, stay previous flag (0x%08x)\n", __func__, flag, atomic_read(&WILC_DEBUG_LEVEL));
> +		pr_info("%s, value (0x%08x) is out of range,", __func__, flag);
> +		pr_info("stay previous flag (0x%08x)\n",
> +			atomic_read(&WILC_DEBUG_LEVEL));

No, you just changed this to two different messages, it's not the
correct fix here.  Just wrap the line after the string, checkpatch will
not complain when you do that.

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