public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Karuna Grewal <karunagrewal98@gmail.com>, linux-kernel@vger.kernel.org
Cc: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org
Subject: Re: [PATCH] staging: bcm2835-audio: remove more than 80 char error
Date: Tue, 11 Jul 2017 05:13:12 -0700	[thread overview]
Message-ID: <1499775192.4457.10.camel@perches.com> (raw)
In-Reply-To: <20170711112914.GA4944@aakp-Lenovo-ideapad-500-15ISK>

On Tue, 2017-07-11 at 16:59 +0530, Karuna Grewal wrote:
>     remove the more than 80 character error as pointed out by checkpatch by
>     spliting the statements at the separators in the statements .

Not every 80 column warning needs fixing.

Your selection of separators is poor.  For instance:

> diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c
[]
> @@ -116,14 +116,19 @@ static int snd_bcm2835_ctl_put(struct snd_kcontrol *kcontrol,
>  		return -EINTR;
>  
>  	if (kcontrol->private_value == PCM_PLAYBACK_VOLUME) {
> -		audio_info("Volume change attempted.. volume = %d new_volume = %d\n", chip->volume, (int)ucontrol->value.integer.value[0]);
> +		audio_info(
> +			"Volume change attempted.. volume = %d new_volume = %d\n",
> +	chip->volume, (int)ucontrol->value.integer.value[0]);

Better:

		audio_info("Volume change attempted.. volume = %d new_volume = %d\n",
			   chip->volume, (int)ucontrol->value.integer.value[0]);

[]

> -		if (changed || (ucontrol->value.integer.value[0] != chip2alsa(chip->volume))) {
> -			chip->volume = alsa2chip(ucontrol->value.integer.value[0]);
> +		if (changed || (ucontrol->value.integer.value[0] != chip2alsa(
> +			chip->volume))) {
> +			chip->volume =
> +			alsa2chip(ucontrol->value.integer.value[0]);

Better:
		if (changed ||
		    ucontrol->value.integer.value[0] != chip2alsa(chip->volume) {
			chip->volume = alsa2chip(ucontrol->value.integer.value[0]);
			changed = 1;
		}

etc...

      parent reply	other threads:[~2017-07-11 12:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-11 11:29 [PATCH] staging: bcm2835-audio: remove more than 80 char error Karuna Grewal
2017-07-11 12:10 ` Dan Carpenter
2017-07-11 12:13 ` Joe Perches [this message]

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=1499775192.4457.10.camel@perches.com \
    --to=joe@perches.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=karunagrewal98@gmail.com \
    --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