Thread (7 messages) flat view 7 messages, 4 authors, 2017-12-09
STALE3159d

Re: [PATCH net-next 2/2 v6] net: ethernet: Add a driver for Gemini gigabit ethernet

From: Linus Walleij <hidden>
Date: 2017-12-06 13:02:49
Also in: linux-arm-kernel

On Mon, Dec 4, 2017 at 12:21 AM, David Miller [off-list ref] wrote:
quoted
+static irqreturn_t gemini_port_irq_thread(int irq, void *data)
+{
+     struct gemini_ethernet_port *port = data;
+     struct gemini_ethernet *geth = port->geth;
+     unsigned long irqmask = SWFQ_EMPTY_INT_BIT;
+     unsigned long flags;
Always order local variables in reverse-christmas-tree format,
which is longest to shortest line.
It's hard to do in cases like this where I use the variable
when defining another variable:

struct gemini_ethernet_port *port = netdev_priv(netdev);
void __iomem *status_reg = port->gmac_base + GMAC_STATUS;

But I understand the aesthetic, so I fix it as well as I can.

If you want me to even rewrite the above using more lines of code
to keep the aestetic (moving assignment out of the variable
definitions), tell me and I can fix that too, whatever you like.

Yours,
Linus Walleij
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help