Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1583832

Re: [PATCH 5/5] staging: bcm2835-audio: bcm2835.h: fix line length coding style issue

From Adan Hawthorn <adanhawthorn@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH 5/5] staging: bcm2835-audio: bcm2835.h: fix line length coding style issue
Date 2017-02-18 02:50 +0100
Message-ID <tc2ad-3GK-5@gated-at.bofh.it> (permalink)
References <tbXay-tp-21@gated-at.bofh.it> <tbXay-tp-19@gated-at.bofh.it> <tc1QR-3yf-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Thanks, Joe.

Is this to say that scripts/checkpatch.pl should be updated to some
higher column limit?  I have made these cleanup changes before in a
like manner.

On Fri, Feb 17, 2017 at 8:17 PM, Joe Perches <joe@perches.com> wrote:
> On Fri, 2017-02-17 at 15:16 -0500, Nathan Howard wrote:
>> Fix checkpatch.pl warning of the form "WARNING: line over 80 characters."
> []
>> diff --git a/drivers/staging/bcm2835-audio/bcm2835.h b/drivers/staging/bcm2835-audio/bcm2835.h
> []
>> @@ -163,8 +163,10 @@ int bcm2835_audio_write(struct bcm2835_alsa_stream *alsa_stream,
>>                       unsigned int count,
>>                       void *src);
>>  void bcm2835_playback_fifo(struct bcm2835_alsa_stream *alsa_stream);
>> -unsigned int bcm2835_audio_retrieve_buffers(struct bcm2835_alsa_stream *alsa_stream);
>> +unsigned int bcm2835_audio_retrieve_buffers(
>> +             struct bcm2835_alsa_stream *alsa_stream);
>
> This is not a good change.
>
> This line exceeds 80 columns only because
> it uses very long identifiers (30+ chars).
>
> Anything that uses these very long names
> is going to be silly looking when forced
> to use 80 column line length maximums.
>
> Basically, it's OK as it is and if you
> really want to change it for any reason
> the other style to use is to have the
> return value on a separate line like:
>
> unsigned int
> bcm2836_audio_retrieve_buffers(struct bcm2835_also_stream *alsa_stream);
>
> Even so, that's not a good change either.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 5/5] staging: bcm2835-audio: bcm2835.h: fix line length coding style issue Nathan Howard <adanhawthorn@gmail.com> - 2017-02-17 21:20 +0100
  Re: [PATCH 5/5] staging: bcm2835-audio: bcm2835.h: fix line length  coding style issue Joe Perches <joe@perches.com> - 2017-02-18 02:20 +0100
    Re: [PATCH 5/5] staging: bcm2835-audio: bcm2835.h: fix line length  coding style issue Joe Perches <joe@perches.com> - 2017-02-18 02:40 +0100
      Re: [PATCH 5/5] staging: bcm2835-audio: bcm2835.h: fix line length  coding style issue Adan Hawthorn <adanhawthorn@gmail.com> - 2017-02-18 03:10 +0100
    Re: [PATCH 5/5] staging: bcm2835-audio: bcm2835.h: fix line length  coding style issue Adan Hawthorn <adanhawthorn@gmail.com> - 2017-02-18 02:50 +0100

csiph-web