lkml.org 
[lkml]   [2013]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 6/6] keucr: fix some alignment- and whitespace-problems
From
Date
On Thu, 2013-06-06 at 18:10 +0200, Johannes Schilling wrote:
> resolves checkpatch errors and warnings regarding whitespace around
> operators, line lengths and indentation.

I suggest adding --strict to your checkpatch runs to
report a few more style usage elements.

> diff --git a/drivers/staging/keucr/init.c b/drivers/staging/keucr/init.c
[]
> @@ -98,11 +98,16 @@ int ENE_SMInit(struct us_data *us)
[]
> if (us->SM_Status.Insert && us->SM_Status.Ready) {
> - dev_info(&us->pusb_dev->dev, "Insert = %x\n", us->SM_Status.Insert);
[]
> + dev_info(&us->pusb_dev->dev, "Insert = %x\n",
> + us->SM_Status.Insert);

I think this would be nicer aligning the arguments
to the open parenthesis like:

dev_info(&us->pusb_dev->dev, "Insert = %x\n",
us->SM_Status.Insert);

but using

us_info(us, "Insert = %x\n", us->SM_Status.Insert);

would be nicer still and fit 80 cols, etc...

Another option would be to use a macro like:

#define us_show_status(us, field) \
us_info(us, "%-11s= %x\n", #field, us->SM_Status.field)

And these become

us_show_status(us, "Insert");
us_show_status(us, "Ready");
us_show_status(us, "WtP");

etc...

It depends on how many of these actually exist whether
or not a macro is appropriate.




\
 
 \ /
  Last update: 2013-06-06 20:41    [W:0.136 / U:10.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site