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.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to