linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Baodong Chen <chenbdchenbd@gmail.com>
Cc: dmitry.torokhov@gmail.com, linux-input@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fixed coding style issues
Date: Wed, 25 Jul 2012 00:30:06 -0700	[thread overview]
Message-ID: <1343201406.30161.10.camel@joe2Laptop> (raw)
In-Reply-To: <1343200277-14385-1-git-send-email-chenbdchenbd@gmail.com>

On Wed, 2012-07-25 at 15:11 +0800, Baodong Chen wrote:
> Fexed coding style issues from scripts/checkpatch.pl in drivers/input

Not all checkpatch messages need to be "fexed". :)

Please use some taste and judgment before submitting
patches based solely on checkpatch output.

> diff --git a/drivers/input/apm-power.c b/drivers/input/apm-power.c
[]
> @@ -33,7 +33,7 @@ static void system_power_event(unsigned int keycode)
>  }
>  
>  static void apmpower_event(struct input_handle *handle, unsigned int type,
> -		        unsigned int code, int value)
> +			unsigned int code, int value)

Perhaps prefer alignment to immediately after open parenthesis.

> diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c
[]
> @@ -547,16 +547,44 @@ static int handle_eviocgbit(struct input_dev *dev,
>  
>  	switch (type) {
>  
> -	case      0: bits = dev->evbit;  len = EV_MAX;  break;
[]
> +	case      0:
> +		bits = dev->evbit;
> +		len = EV_MAX;
> +		break;

not all that better really.

> @@ -567,8 +595,8 @@ static int handle_eviocgbit(struct input_dev *dev,
>  	if (type == EV_KEY && size == OLD_KEY_MAX) {
>  		len = OLD_KEY_MAX;
>  		if (printk_timed_ratelimit(&keymax_warn_time, 10 * 1000))
> -			pr_warning("(EVIOCGBIT): Suspicious buffer size %u, "
> -				   "limiting output to %zu bytes. See "
> +			pr_warn("(EVIOCGBIT): Suspicious buffer size %u, " \
> +				   "limiting output to %zu bytes. See "	\

The line continuations are also not necessary and I think are
really ugly.  Just coalesce the format.

>  				   "http://userweb.kernel.org/~dtor/eviocgbit-bug.html\n",

dead link I think.

> diff --git a/drivers/input/ff-core.c b/drivers/input/ff-core.c
[]
> @@ -138,8 +138,8 @@ int input_ff_upload(struct input_dev *dev, struct ff_effect *effect,
>  
>  	if (effect->id == -1) {
>  		for (id = 0; id < ff->max_effects; id++)
> -		     if (!ff->effect_owners[id])
> -			break;
> +			if (!ff->effect_owners[id])
> +				break;

Better surrounded by braces too.

cheers, Joe



  reply	other threads:[~2012-07-25  7:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-25  7:11 [PATCH] fixed coding style issues Baodong Chen
2012-07-25  7:30 ` Joe Perches [this message]
2012-07-25  7:44   ` Baodong Chen
2012-07-25  8:01     ` Joe Perches
2012-07-25  8:25       ` Baodong Chen
2012-07-30  5:53 ` Dmitry Torokhov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1343201406.30161.10.camel@joe2Laptop \
    --to=joe@perches.com \
    --cc=chenbdchenbd@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).