lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20070501091007.fd649833.randy.dunlap@oracle.com>
Date:	Tue, 1 May 2007 09:10:07 -0700
From:	Randy Dunlap <randy.dunlap@...cle.com>
To:	Thomas Backlund <tmb@...driva.org>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [patch] Add support for picopower irq router

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 ***
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ