All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alan Stern <stern@rowland.harvard.edu>
To: Joe Perches <joe@perches.com>
Cc: "Geyslan G. Bem" <geyslan@gmail.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	<linux-usb@vger.kernel.org>
Subject: Re: [PATCH 09/17] usb: host: ehci-dbg: fix up function definitions
Date: Tue, 5 Jan 2016 11:06:26 -0500 (EST)	[thread overview]
Message-ID: <Pine.LNX.4.44L0.1601051101470.1666-100000@iolanthe.rowland.org> (raw)
In-Reply-To: <1452007408.4334.136.camel@perches.com>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: TEXT/PLAIN; charset=UTF-8, Size: 1742 bytes --]

On Tue, 5 Jan 2016, Joe Perches wrote:

> On Tue, 2016-01-05 at 10:12 -0500, Alan Stern wrote:
> > On Mon, 4 Jan 2016, Geyslan G. Bem wrote:
> > 
> > > >> @@ -404,12 +422,8 @@ static inline char token_mark(struct ehci_hcd *ehci, __hc32 token)
> > > >>       return '/';
> > > >>  }
> > > >>
> > > >> -static void qh_lines(
> > > >> -     struct ehci_hcd *ehci,
> > > >> -     struct ehci_qh *qh,
> > > >> -     char **nextp,
> > > >> -     unsigned *sizep
> > > >> -)
> > > >> +static void qh_lines(struct ehci_hcd *ehci, struct ehci_qh *qh,
> > > >> +                     char **nextp, unsigned *sizep)
> > > >>  {
> > > >>       u32                     scratch;
> > > >>       u32                     hw_curr;
> > > >>
> > > >
> > > And about that style? Should be done?
> > 
> > You mean squeezing the function parameters into two lines?  That's 
> > okay.
> > 
> > However, the style in this file is to indent continuation lines by two
> > extra tab stops, not to line things up with an open paren on the first
> > line.
> 
> It's not consistent.
> It's a bit of a mix of 1 and 2 tabs, and some others.

I know.  That's because the files were written by various people at 
various times and nobody tried to enforce a rigid consistent style.

I'm not even consistent all the time in the things that I write.  There 
are places (see drivers/usb/core/config.c) where I indented 
continuation lines by 4 spaces instead of 2 tab stops.  And there are 
places where a continuation of a continuation gets indented even 
farther.

Trying to come up with hard-and-fast rules for this sort of thing is 
pretty hopeless.  Even "Maximize readability" doesn't work too well, 
because different people find different things most readable.

Alan Stern


  parent reply	other threads:[~2016-01-05 16:06 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-04 20:09 [PATCH 00/17] usb: host: ehci-dbg: cleanup and refactoring Geyslan G. Bem
2016-01-04 20:09 ` [PATCH 01/17] usb: host: ehci-dbg: remove space before open parenthesis Geyslan G. Bem
2016-01-04 20:09 ` [PATCH 02/17] usb: host: ehci-dbg: remove space before open square bracket Geyslan G. Bem
2016-01-04 20:09 ` [PATCH 03/17] usb: host: ehci-dbg: use C89-style comments Geyslan G. Bem
2016-01-04 20:09 ` [PATCH 04/17] usb: host: ehci-dbg: move trailing statements to next line Geyslan G. Bem
2016-01-04 20:09 ` [PATCH 05/17] usb: host: ehci-dbg: fix up closing parenthesis Geyslan G. Bem
2016-01-04 20:09 ` [PATCH 06/17] usb: host: ehci-dbg: put spaces around operators Geyslan G. Bem
2016-01-04 20:09 ` [PATCH 07/17] usb: host: ehci-dbg: fix unsigned comparison Geyslan G. Bem
2016-01-04 20:50   ` Alan Stern
2016-01-04 21:35     ` Geyslan G. Bem
2016-01-04 21:52       ` Alan Stern
2016-01-04 20:09 ` [PATCH 08/17] usb: host: ehci-dbg: remove unnecessary space after cast Geyslan G. Bem
2016-01-04 20:58   ` Alan Stern
2016-01-04 21:40     ` Geyslan G. Bem
2016-01-04 21:49       ` Greg Kroah-Hartman
2016-01-04 21:52         ` Sergei Shtylyov
2016-01-04 22:07           ` Geyslan G. Bem
2016-01-05  2:40             ` Joe Perches
2016-01-05 15:16               ` Geyslan G. Bem
2016-01-05 16:41               ` Alan Stern
2016-01-04 20:09 ` [PATCH 09/17] usb: host: ehci-dbg: fix up function definitions Geyslan G. Bem
2016-01-04 21:00   ` Alan Stern
2016-01-04 23:28     ` Geyslan G. Bem
2016-01-05 15:12       ` Alan Stern
2016-01-05 15:20         ` Joe Perches
2016-01-05 15:23         ` Joe Perches
2016-01-05 15:27           ` Geyslan G. Bem
2016-01-05 15:36             ` Geyslan G. Bem
2016-01-05 16:06           ` Alan Stern [this message]
2016-01-05 16:10             ` Joe Perches
2016-01-05 16:29               ` Alan Stern
2016-01-05 17:03                 ` Geyslan G. Bem
2016-01-04 20:09 ` [PATCH 10/17] usb: host: ehci-dbg: use a blank line after struct declarations Geyslan G. Bem
2016-01-04 20:09 ` [PATCH 11/17] usb: host: ehci-dbg: convert macro to inline function Geyslan G. Bem
2016-01-04 20:09 ` [PATCH 12/17] usb: host: ehci-dbg: add blank line after declarations Geyslan G. Bem
2016-01-04 20:09 ` [PATCH 13/17] usb: host: ehci-dbg: remove blank line before close brace Geyslan G. Bem
2016-01-04 20:09 ` [PATCH 14/17] usb: host: ehci-dbg: replace sizeof operand Geyslan G. Bem
2016-01-04 20:10 ` [PATCH 15/17] usb: host: ehci-dbg: enclose conditional blocks with braces Geyslan G. Bem
2016-01-04 20:10 ` [PATCH 16/17] usb: host: ehci-dbg: prefer kmalloc_array over kmalloc times size Geyslan G. Bem
2016-01-04 20:10 ` [PATCH 17/17] usb: host: ehci-dbg: refactor fill_periodic_buffer function Geyslan G. Bem
2016-01-04 21:01   ` Alan Stern
2016-01-05  1:19     ` Geyslan G. Bem
2016-01-05 15:15       ` Alan Stern
2016-01-05 15:41         ` Geyslan G. Bem

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=Pine.LNX.4.44L0.1601051101470.1666-100000@iolanthe.rowland.org \
    --to=stern@rowland.harvard.edu \
    --cc=geyslan@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.