From: "Dale Farnsworth" <dale@farnsworth.org>
To: Sven Luther <sl@bplan-gmbh.de>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH 2.6.14-rc3 1/1] chrp_pegasos_eth: Added Marvell Discovery II SRAM support
Date: Fri, 14 Oct 2005 14:42:17 -0700 [thread overview]
Message-ID: <20051014214217.GA29529@xyzzy.farnsworth.org> (raw)
In-Reply-To: <20051014151830.GA31442@localhost.localdomain>
On Fri, Oct 14, 2005 at 05:18:30PM +0200, Sven Luther wrote:
> On Fri, Oct 14, 2005 at 01:56:41PM -0000, Dale Farnsworth wrote:
> > > - static struct pci_device_id pci_marvell_mv64360[] = {
> > > + static struct pci_device_id pci_marvell_mv64360[] =
> > > + {
> >
> > > + if (pci_dev_present(pci_marvell_mv64360))
> > > + {
> >
> > Open brace should not be on a line by itself except in function definitions.
>
> Oh, neat, i knew i should not use same-line-braces for function but didn't
> know i should use them for non-functions :)
???
I guess what I wrote wasn't clear, since in his most recent patch,
Nicolas added more places like the above where the "{" has been moved
to a line by itself. Just the opposite of what I meant to suggest.
>From Documentation/CodingStyle:
> Chapter 3: Placing Braces
>
>The other issue that always comes up in C styling is the placement of
>braces. Unlike the indent size, there are few technical reasons to
>choose one placement strategy over the other, but the preferred way, as
>shown to us by the prophets Kernighan and Ritchie, is to put the opening
>brace last on the line, and put the closing brace first, thusly:
>
> if (x is true) {
> we do y
> }
>
>However, there is one special case, namely functions: they have the
>opening brace at the beginning of the next line, thus:
>
> int function(int x)
> {
> body of function
> }
-Dale
next prev parent reply other threads:[~2005-10-14 21:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-13 20:00 [PATCH 2.6.14-rc3 1/1] chrp_pegasos_eth: Added Marvell Discovery II SRAM support Nicolas DET
2005-10-14 6:50 ` Nicolas DET
2005-10-14 13:56 ` Dale Farnsworth
2005-10-14 15:18 ` Sven Luther
2005-10-14 21:42 ` Dale Farnsworth [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-10-14 17:38 Nicolas DET
2005-10-14 17:45 ` Nicolas DET
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=20051014214217.GA29529@xyzzy.farnsworth.org \
--to=dale@farnsworth.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=sl@bplan-gmbh.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).