Re: [PATCH] Staging: vme: devices: vme_user: fix coding style issues

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

 



On Mon, May 28, 2012 at 02:22:14PM +0100, Adnan Ali wrote:
> This commit fixes coding style issues including long lines
> and string across multiple lines for driver
> 

You've sent this three times now.  It should have been 
[patch v3] Staging: vme: devices: vme_user: fix coding style issues

> Signed-off-by: Adnan Ali <adnan.ali@xxxxxxxxxxxxxxx>
> ---

Here, below the "---" line then put.

v2:  (I have no idea what changed).
v3:  Fixed a typo in the signed-off-by line.

>  drivers/staging/vme/devices/vme_user.c |   38 ++++++++++++++++----------------
>  1 files changed, 19 insertions(+), 19 deletions(-)
> 
> diff --git a/drivers/staging/vme/devices/vme_user.c b/drivers/staging/vme/devices/vme_user.c
> index e24a6f9..3a55621 100644
> --- a/drivers/staging/vme/devices/vme_user.c
> +++ b/drivers/staging/vme/devices/vme_user.c
> @@ -397,7 +397,6 @@ static ssize_t vme_user_write(struct file *file, const char __user *buf,
>  	default:
>  		retval = -EINVAL;
>  	}
> -	

Remove the spaces, but leave the blank line.  Locks are important so
the original author wanted it to stand out.

>  	mutex_unlock(&image[minor].mutex);
>  
>  	if (retval > 0)
> @@ -504,8 +503,8 @@ static int vme_user_ioctl(struct inode *inode, struct file *file,
>  			copied = copy_to_user(argp, &master,
>  				sizeof(struct vme_master));
>  			if (copied != 0) {
> -				printk(KERN_WARNING "Partial copy to "
> -					"userspace\n");
> +				printk(KERN_WARNING
> +					"Partial copy to userspace\n");

Could you make it so the 'K' and the '"' line up?

				printk(KERN_WARNING
				       "Partial copy to userspace\n");
Actually these days we prefer dev_warn() to printk() but I'm not
sure which device struct you can use here.  Or you could use
pr_warn().

But actually these messages are for debugging.  Normally we don't
want to print an error when copy_to_user() fails...  Eventually
we're just going to delete them.

Btw, you are rushing too much.  Wait for overnight before sending
patches.  The next day you can review it and re-read the changelog
with fresh eyes.  Otherwise, you make silly mistakes like typos in
your email address.

regards,
dan carpenter


_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/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