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


Groups > linux.kernel > #1301240

Re: [PATCH 08/17] usb: host: ehci-dbg: remove unnecessary space after cast

From Joe Perches <joe@perches.com>
Newsgroups linux.kernel
Subject Re: [PATCH 08/17] usb: host: ehci-dbg: remove unnecessary space after cast
Date 2016-01-05 03:50 +0100
Message-ID <qNpR8-3Te-3@gated-at.bofh.it> (permalink)
References (1 earlier) <qNkoq-6b-11@gated-at.bofh.it> <qNlaP-Er-19@gated-at.bofh.it> <qNlaP-Er-17@gated-at.bofh.it> <qNlkw-HP-57@gated-at.bofh.it> <qNlub-10M-31@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, 2016-01-04 at 19:07 -0300, Geyslan G. Bem wrote:
> 2016-01-04 18:52 GMT-03:00 Sergei Shtylyov :
> > > > > > This patch fixes coding style issues reported by checkpatch concerning
> > > > > > to unnecessary space after a cast.
> > > > > This is a case where checkpatch is wrong, IMO.  Casts should always be
> > > > > followed by a space.  I will not accept this patch.

Your choice, but most kernel code disagrees with you.

measuring only kernel casts to a pointer, (because there are
too many false positives otherwise) casts without a space
are preferred ~3:1 over casts followed by a space.

(without space)
$ grep -rP --include=*.[ch] -oh "\(\s*(\w{3,}\s+){0,2}\w{3,}\s*\*+\s*\)\w+" * | \
  sort|cut -f1 -d")"| sed 's/$/)/' | wc -l
36612

(with space)
$ grep -rP --include=*.[ch] -oh "\(\s*(\w{3,}\s+){0,2}\w{3,}\s*\*+\s*\)[ \t]\w+" * | \
  sort|cut -f1 -d")"| sed 's/$/)/' | wc -l
13233
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

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


Thread

[PATCH 00/17] usb: host: ehci-dbg: cleanup and refactoring "Geyslan G. Bem" <geyslan@gmail.com> - 2016-01-04 21:20 +0100
  [PATCH 17/17] usb: host: ehci-dbg: refactor fill_periodic_buffer function "Geyslan G. Bem" <geyslan@gmail.com> - 2016-01-04 21:20 +0100
    Re: [PATCH 17/17] usb: host: ehci-dbg: refactor fill_periodic_buffer  function Alan Stern <stern@rowland.harvard.edu> - 2016-01-04 22:10 +0100
      Re: [PATCH 17/17] usb: host: ehci-dbg: refactor fill_periodic_buffer function "Geyslan G. Bem" <geyslan@gmail.com> - 2016-01-05 02:20 +0100
        Re: [PATCH 17/17] usb: host: ehci-dbg: refactor fill_periodic_buffer  function Alan Stern <stern@rowland.harvard.edu> - 2016-01-05 16:20 +0100
          Re: [PATCH 17/17] usb: host: ehci-dbg: refactor fill_periodic_buffer function "Geyslan G. Bem" <geyslan@gmail.com> - 2016-01-05 16:50 +0100
  [PATCH 10/17] usb: host: ehci-dbg: use a blank line after struct declarations "Geyslan G. Bem" <geyslan@gmail.com> - 2016-01-04 21:20 +0100
  [PATCH 08/17] usb: host: ehci-dbg: remove unnecessary space after cast "Geyslan G. Bem" <geyslan@gmail.com> - 2016-01-04 21:30 +0100
    Re: [PATCH 08/17] usb: host: ehci-dbg: remove unnecessary space  after cast Alan Stern <stern@rowland.harvard.edu> - 2016-01-04 22:00 +0100
      Re: [PATCH 08/17] usb: host: ehci-dbg: remove unnecessary space  after cast Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-01-04 22:50 +0100
        Re: [PATCH 08/17] usb: host: ehci-dbg: remove unnecessary space after  cast Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-01-04 23:00 +0100
          Re: [PATCH 08/17] usb: host: ehci-dbg: remove unnecessary space after cast "Geyslan G. Bem" <geyslan@gmail.com> - 2016-01-04 23:10 +0100
            Re: [PATCH 08/17] usb: host: ehci-dbg: remove unnecessary space  after cast Joe Perches <joe@perches.com> - 2016-01-05 03:50 +0100
              Re: [PATCH 08/17] usb: host: ehci-dbg: remove unnecessary space after cast "Geyslan G. Bem" <geyslan@gmail.com> - 2016-01-05 16:20 +0100
              Re: [PATCH 08/17] usb: host: ehci-dbg: remove unnecessary space  after cast Alan Stern <stern@rowland.harvard.edu> - 2016-01-05 17:50 +0100
      Re: [PATCH 08/17] usb: host: ehci-dbg: remove unnecessary space after cast "Geyslan G. Bem" <geyslan@gmail.com> - 2016-01-04 22:50 +0100

csiph-web