[PATCH] staging: comedi: fix coding style issues

Ian Abbott abbotti at mev.co.uk
Mon May 18 11:37:09 UTC 2015


On 16/05/15 05:16, Geliang Tang wrote:
> 1) Fixed an error found by checkpatch.pl.
>     ERROR: space required after that ',' (ctx:VxV)
>     ./drivers/ni_mio_common.c:3764
> 2) Changed "register 0x%x" to "register=0x%x" to keep the consistency
>     of this file.
> 3) The kernel version is next-20150515, 4.1.0-rc3.

You shouldn't mention point 3 in the commit message as it will look a 
bit strange when it ends up in the commit log.  If you need to mention 
that, it should go after the commit message, separated from the patch by 
a "---" line like this:

Body of commit message goes here.

Signed off by and Cc lines go here.
---
Additional patch commentary goes here.
---
Actual patch goes here.

Git will ignore the additional commentary when the patch is applied.

>
> Signed-off-by: Geliang Tang <geliangtang at 163.com>
> ---
>   drivers/staging/comedi/drivers/ni_mio_common.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b/drivers/staging/comedi/drivers/ni_mio_common.c
> index 9dfd4e6..6cc304a 100644
> --- a/drivers/staging/comedi/drivers/ni_mio_common.c
> +++ b/drivers/staging/comedi/drivers/ni_mio_common.c
> @@ -3761,7 +3761,7 @@ static unsigned int ni_gpct_to_stc_register(struct comedi_device *dev,
>   	if (reg < ARRAY_SIZE(ni_gpct_to_stc_regmap)) {
>   		regmap = &ni_gpct_to_stc_regmap[reg];
>   	} else {
> -		dev_warn(dev->class_dev,"%s: unhandled register 0x%x\n",
> +		dev_warn(dev->class_dev, "%s: unhandled register=0x%x\n",
>   			 __func__, reg);
>   		return 0;
>   	}
>

Apart from that niggle, the patch looks good!

Reviewed-by: Ian Abbott <abbotti at mev.co.uk>

-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti at mev.co.uk> )=-
-=(                          Web: http://www.mev.co.uk/  )=-


More information about the devel mailing list