Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1685003
| From | Joe Perches <joe@perches.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] staging: bcm2835-audio: remove more than 80 char error |
| Date | 2017-07-11 14:20 +0200 |
| Message-ID | <u22j0-29B-15@gated-at.bofh.it> (permalink) |
| References | <u21wB-1EK-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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...
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] staging: bcm2835-audio: remove more than 80 char error Karuna Grewal <karunagrewal98@gmail.com> - 2017-07-11 13:30 +0200 Re: [PATCH] staging: bcm2835-audio: remove more than 80 char error Dan Carpenter <dan.carpenter@oracle.com> - 2017-07-11 14:20 +0200 Re: [PATCH] staging: bcm2835-audio: remove more than 80 char error Joe Perches <joe@perches.com> - 2017-07-11 14:20 +0200
csiph-web