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


Groups > linux.kernel > #1447481

Re: staging: ks7010: Rename jump labels

From Jean Delvare <jdelvare@suse.de>
Newsgroups linux.kernel
Subject Re: staging: ks7010: Rename jump labels
Date 2016-07-20 23:20 +0200
Message-ID <rX74l-6Go-3@gated-at.bofh.it> (permalink)
References (7 earlier) <mSsDN-4wa-33@gated-at.bofh.it> <rVYFQ-430-11@gated-at.bofh.it> <rVYZc-49k-17@gated-at.bofh.it> <rX24G-3jb-33@gated-at.bofh.it> <rX4pP-4W5-11@gated-at.bofh.it>
Organization SUSE Linux

Show all headers | View raw


Hello Markus, Wolfram,

On Wed, 20 Jul 2016 20:21:25 +0200, SF Markus Elfring wrote:
> >> Adjust jump targets according to the Linux coding style convention.
> > 
> > Really? Is that documented somewhere?
> 
> How do you think about information from the chapter "7: Centralized exiting of functions"?
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/CodingStyle?id=47ef4ad2684d380dd6d596140fb79395115c3950#n389

I'm not impressed by this piece of documentation. For example, <<also
don't name them after the goto location like "err_kmalloc_failed:">> is
as unclear as you can get. It would be much better to tell what to name
them, if the author thinks it really matters. (Personally I think it is
out of scope of coding style rules.)

Back to the lack of space before labels, it's at best a personal
preference. If you insist on standardizing, I'd call it a bug in the
documentation, which should be fixed. One space before label is the way
to go.

> > Quoting Jean Delvare:

I'm honored :)

> > "> It is generally accepted to indent labels with a single space. This
> >  > avoids breaking the -p option of diff."
> 
> Would you like to take another look at the warning "LEADING_SPACE"?
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/scripts/checkpatch.pl?id=47ef4ad2684d380dd6d596140fb79395115c3950#n3004
> 
> Does such a check need further considerations?

checkpatch has become so complex, it's full of false positives, trying
to enforce rules just because one developer wants to force his view on
all others. I stopped following everything the script says long ago.
I'm cherry-picking now.

That being said... checkpatch does not complain about leading space
before labels. Not even with --strict. So why are you mentioning it
here?

> > So, NACK for now unless we know 'diff' has been fixed.

Full nack from myself as well. Just looking at the thread on lkml makes
me feel dizzy. When you are about to send that amount of messages, you
should pause and think again. Is it really worth it? I think I'd be
less annoyed by regular spam.

> I am also curious on corresponding software evolution.

I wouldn't consider it a bug. Despite the description of option -p in
the diff man page calling it C specific, it looks very generic to me.
As I understand it, it looks for any line not starting with a blank and
containing at least one letter (or maybe just starting with a letter -
I didn't look at the code.) Thankfully it doesn't try to parse C. So it
depends on how you indent your code. Live with it.

It's been that way for so long that changing it now is hardly an
option. That change would be seen as a gratuitous regression by many
(including myself.) And for the record, "git diff" behaves exactly the
same. So it's a de facto standard.

-- 
Jean Delvare
SUSE L3 Support

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


Thread

[PATCH 0/9] staging: ks7010: Fine-tuning for a SDIO card driver SF Markus Elfring <elfring@users.sourceforge.net> - 2016-07-17 20:10 +0200
  [PATCH 2/9] staging: ks7010: Delete unnecessary assignments for  buffer variables SF Markus Elfring <elfring@users.sourceforge.net> - 2016-07-17 20:20 +0200
    Re: [PATCH 2/9] staging: ks7010: Delete unnecessary assignments for  buffer variables Wolfram Sang <wsa@the-dreams.de> - 2016-07-20 17:50 +0200
  [PATCH 1/9] staging: ks7010: Delete unnecessary checks before the  function call "kfree" SF Markus Elfring <elfring@users.sourceforge.net> - 2016-07-17 20:20 +0200
    Re: [PATCH 1/9] staging: ks7010: Delete unnecessary checks before  the function call "kfree" Wolfram Sang <wsa@the-dreams.de> - 2016-07-20 17:50 +0200
  [PATCH 3/9] staging: ks7010: Return directly after a failed kmalloc() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-07-17 20:20 +0200
    Re: [PATCH 3/9] staging: ks7010: Return directly after a failed  kmalloc() Julia Lawall <julia.lawall@lip6.fr> - 2016-07-17 21:00 +0200
      Re: [PATCH 3/9] staging: ks7010: Return directly after a failed  kmalloc() Wolfram Sang <wsa@the-dreams.de> - 2016-07-20 17:50 +0200
        Re: [PATCH 3/9] staging: ks7010: Return directly after a failed  kmalloc() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-07-20 20:50 +0200
          Re: [PATCH 3/9] staging: ks7010: Return directly after a failed  kmalloc() Wolfram Sang <wsa@the-dreams.de> - 2016-07-21 08:30 +0200
            Re: staging: ks7010: Return directly after a failed kmalloc() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-07-22 09:40 +0200
              Re: staging: ks7010: Return directly after a failed kmalloc() Wolfram Sang <wsa@the-dreams.de> - 2016-07-22 09:50 +0200
  [PATCH 7/9] staging: ks7010: Replace three printk() calls by pr_err() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-07-17 20:30 +0200
    Re: [PATCH 7/9] staging: ks7010: Replace three printk() calls by  pr_err() Joe Perches <joe@perches.com> - 2016-07-17 22:30 +0200
      Re: [PATCH 7/9] staging: ks7010: Replace three printk() calls by  pr_err() Wolfram Sang <wsa@the-dreams.de> - 2016-07-20 18:00 +0200
  [PATCH 5/9] staging: ks7010: Delete unnecessary uses of the variable  "retval" SF Markus Elfring <elfring@users.sourceforge.net> - 2016-07-17 20:30 +0200
    Re: [PATCH 5/9] staging: ks7010: Delete unnecessary uses of the  variable "retval" Julia Lawall <julia.lawall@lip6.fr> - 2016-07-17 21:00 +0200
      Re: [PATCH 5/9] staging: ks7010: Delete unnecessary uses of the  variable "retval" Wolfram Sang <wsa@the-dreams.de> - 2016-07-20 18:00 +0200
        Re: [PATCH 5/9] staging: ks7010: Delete unnecessary uses of the  variable "retval" SF Markus Elfring <elfring@users.sourceforge.net> - 2016-07-20 20:50 +0200
          Re: [PATCH 5/9] staging: ks7010: Delete unnecessary uses of the  variable "retval" Wolfram Sang <wsa@the-dreams.de> - 2016-07-21 08:30 +0200
            Re: [PATCH 5/9] staging: ks7010: Delete unnecessary uses of the  variable "retval" Wolfram Sang <wsa@the-dreams.de> - 2016-07-21 09:30 +0200
            Re: [PATCH 5/9] staging: ks7010: Delete unnecessary uses of the  variable "retval" Julia Lawall <julia.lawall@lip6.fr> - 2016-07-21 09:30 +0200
              Re: staging: ks7010: Delete unnecessary uses of the variable "retval" SF Markus Elfring <elfring@users.sourceforge.net> - 2016-07-21 14:50 +0200
                Re: staging: ks7010: Delete unnecessary uses of the variable  "retval" Julia Lawall <julia.lawall@lip6.fr> - 2016-07-21 15:00 +0200
                Re: staging: ks7010: Delete unnecessary uses of the variable "retval" Wolfram Sang <wsa@the-dreams.de> - 2016-07-21 18:40 +0200
            Re: staging: ks7010: Delete unnecessary uses of the variable "retval" SF Markus Elfring <elfring@users.sourceforge.net> - 2016-07-21 15:40 +0200
              Re: staging: ks7010: Delete unnecessary uses of the variable "retval" Wolfram Sang <wsa@the-dreams.de> - 2016-07-21 18:40 +0200
                Re: staging: ks7010: Delete unnecessary uses of the variable "retval" SF Markus Elfring <elfring@users.sourceforge.net> - 2016-07-21 23:30 +0200
                Re: staging: ks7010: Delete unnecessary uses of the variable "retval" Wolfram Sang <wsa@the-dreams.de> - 2016-07-22 08:00 +0200
  [PATCH 8/9] staging: ks7010: Delete a variable in write_to_device() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-07-17 20:30 +0200
    Re: [PATCH 8/9] staging: ks7010: Delete a variable in  write_to_device() Wolfram Sang <wsa@the-dreams.de> - 2016-07-20 18:00 +0200
  [PATCH 4/9] staging: ks7010: Rename jump labels SF Markus Elfring <elfring@users.sourceforge.net> - 2016-07-17 20:30 +0200
    Re: [PATCH 4/9] staging: ks7010: Rename jump labels Wolfram Sang <wsa@the-dreams.de> - 2016-07-20 18:00 +0200
      Re: staging: ks7010: Rename jump labels SF Markus Elfring <elfring@users.sourceforge.net> - 2016-07-20 20:30 +0200
        Re: staging: ks7010: Rename jump labels Jean Delvare <jdelvare@suse.de> - 2016-07-20 23:20 +0200
          Re: staging: ks7010: Rename jump labels Wolfram Sang <wsa@the-dreams.de> - 2016-07-21 08:30 +0200
          Re: staging: ks7010: Rename jump labels "SF Markus Elfring" <elfring@users.sourceforge.net> - 2016-07-21 10:00 +0200
            Re: staging: ks7010: Rename jump labels Jean Delvare <jdelvare@suse.de> - 2016-07-25 14:40 +0200
          Re: staging: ks7010: Rename jump labels SF Markus Elfring <elfring@users.sourceforge.net> - 2016-07-21 17:40 +0200
            Re: staging: ks7010: Rename jump labels Jean Delvare <jdelvare@suse.de> - 2016-07-21 21:20 +0200
              Re: staging: ks7010: Rename jump labels SF Markus Elfring <elfring@users.sourceforge.net> - 2016-07-21 22:30 +0200
                Re: staging: ks7010: Rename jump labels Jean Delvare <jdelvare@suse.de> - 2016-07-25 14:40 +0200
                Re: staging: ks7010: Rename jump labels SF Markus Elfring <elfring@users.sourceforge.net> - 2016-07-25 18:20 +0200
                Re: staging: ks7010: Rename jump labels Jean Delvare <jdelvare@suse.de> - 2016-07-25 23:10 +0200
  [PATCH 6/9] staging: ks7010: Delete unnecessary braces SF Markus Elfring <elfring@users.sourceforge.net> - 2016-07-17 20:30 +0200
    Re: [PATCH 6/9] staging: ks7010: Delete unnecessary braces Julia Lawall <julia.lawall@lip6.fr> - 2016-07-17 21:00 +0200
      Re: [PATCH 6/9] staging: ks7010: Delete unnecessary braces Wolfram Sang <wsa@the-dreams.de> - 2016-07-20 18:00 +0200
  [PATCH 9/9] staging: ks7010: Delete three unnecessary variable  initialisations SF Markus Elfring <elfring@users.sourceforge.net> - 2016-07-17 20:40 +0200
    Re: [PATCH 9/9] staging: ks7010: Delete three unnecessary variable  initialisations Julia Lawall <julia.lawall@lip6.fr> - 2016-07-17 21:00 +0200
      Re: [PATCH 9/9] staging: ks7010: Delete three unnecessary variable  initialisations Wolfram Sang <wsa@the-dreams.de> - 2016-07-20 18:00 +0200
      Re: [PATCH 9/9] staging: ks7010: Delete three unnecessary variable  initialisations SF Markus Elfring <elfring@users.sourceforge.net> - 2016-07-21 15:50 +0200
        Re: [PATCH 9/9] staging: ks7010: Delete three unnecessary variable  initialisations Julia Lawall <julia.lawall@lip6.fr> - 2016-07-21 16:00 +0200
          Re: staging: ks7010: Delete three unnecessary variable  initialisations SF Markus Elfring <elfring@users.sourceforge.net> - 2016-07-21 16:20 +0200

csiph-web