public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Randy Dunlap <randy.dunlap@oracle.com>
To: Thomas Backlund <tmb@mandriva.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [patch] Add support for picopower irq router
Date: Tue, 1 May 2007 09:10:07 -0700	[thread overview]
Message-ID: <20070501091007.fd649833.randy.dunlap@oracle.com> (raw)
In-Reply-To: <46370B06.4030600@mandriva.org>

On Tue, 01 May 2007 12:40:22 +0300 Thomas Backlund wrote:

> arg, attachment.  :(

[parts of patch copy/pasted here for comments]


+static int pirq_pico_get(struct pci_dev *router, struct pci_dev *dev, int pirq)
+{
+	outb(0x10+((pirq-1)>>1), 0x24);
+	return ((pirq-1)&1) ? (inb(0x26)>>4) : (inb(0x26)&0xf);
+}

Be more liberal with the spacebar.  It helps readability.  Like so:
(and see Documentation/CodingStyle)

+	outb(0x10 + ((pirq - 1) >> 1), 0x24);
+	return ((pirq -1 ) & 1) ? (inb(0x26) >> 4) : (inb(0x26) & 0xf);


Same for following functions.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+static int pirq_pico_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq)
+{
+	outb(0x10+((pirq-1)>>1), 0x24);
+	unsigned int x;
+	x = inb(0x26);

Data declarations must come before code.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+static __init int pico_router_probe(struct irq_router *r, struct pci_dev *router, u16 device)
+{
+	switch(device)

space after "switch".

+	{
+	        case PCI_DEVICE_ID_PICOPOWER_PT86C523:

Don't indent cases.  Put at same column as {.

BTW, this is all in CodingStyle.



---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

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

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-01  9:40 [patch] Add support for picopower irq router Thomas Backlund
2007-05-01 16:10 ` Randy Dunlap [this message]
2007-05-01 17:05   ` [PATCH, try2] " Thomas Backlund
2007-05-01 17:12     ` Randy Dunlap
2007-05-01 17:14       ` [PATCH, try3] " Thomas Backlund

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=20070501091007.fd649833.randy.dunlap@oracle.com \
    --to=randy.dunlap@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tmb@mandriva.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox