Re: [PATCH 2/3] MMC: Fix checkpatch warnings

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

 



On Sat, Jun 18, 2011 at 07:50:32PM +0200, Sebastian Rasmussen wrote:

Description of what was done is missing. How it was tested might be interesting
for such patches, too.

> Signed-off-by: Sebastian Rasmussen <sebras@xxxxxxxxx>
> ---
>  drivers/mmc/card/block.c     |   10 +++++-----
>  drivers/mmc/card/queue.c     |   15 +++++----------
>  drivers/mmc/card/sdio_uart.c |    2 +-
>  drivers/mmc/core/bus.c       |    5 +----
>  drivers/mmc/core/bus.h       |    2 +-
>  drivers/mmc/core/core.c      |    7 -------
>  drivers/mmc/core/debugfs.c   |    2 +-
>  drivers/mmc/core/host.c      |    4 ----
>  drivers/mmc/core/sd_ops.c    |    1 -
>  drivers/mmc/core/sdio_bus.c  |    9 ++++-----
>  drivers/mmc/core/sdio_irq.c  |   10 +++++-----
>  11 files changed, 23 insertions(+), 44 deletions(-)
> 
> diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
> index 1c7049a..48cf063 100644
> --- a/drivers/mmc/card/block.c
> +++ b/drivers/mmc/card/block.c
> @@ -34,6 +34,7 @@
>  #include <linux/delay.h>
>  #include <linux/capability.h>
>  #include <linux/compat.h>
> +#include <linux/uaccess.h>
>  
>  #include <linux/mmc/ioctl.h>
>  #include <linux/mmc/card.h>
> @@ -42,7 +43,6 @@
>  #include <linux/mmc/sd.h>
>  
>  #include <asm/system.h>
> -#include <asm/uaccess.h>
>  
>  #include "queue.h"
>  
> @@ -169,11 +169,11 @@ static ssize_t force_ro_store(struct device *dev, struct device_attribute *attr,
>  	int ret;
>  	char *end;
>  	struct mmc_blk_data *md = mmc_blk_get(dev_to_disk(dev));
> -	unsigned long set = simple_strtoul(buf, &end, 0);
> -	if (end == buf) {
> -		ret = -EINVAL;
> +	unsigned long set
> +
> +	ret = kstrtoul(buf, 10, &set)
> +	if (ret < 0)
>  		goto out;
> -	}

You change code here, while other changes are whitespace related. I think this
patch needs to be split up. If each patch does one thing, it will make
reviewing a lot easier, too.

Regards,

   Wolfram

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux