[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <46903483.3020205@gmail.com>
Date: Sat, 07 Jul 2007 18:49:07 -0600
From: Jim Cromie <jim.cromie@...il.com>
To: Linux kernel <linux-kernel@...r.kernel.org>
CC: Randy Dunlap <rdunlap@...otime.net>, linux-kernel@...r.kernel.org,
davem@...emloft.net
Subject: Coding style on function signatures (was: Convert tasklets to work
queues )
Linus Torvalds wrote:
>
>
> Yes, code should be less than 80 characters wide.
>
> But hey, sometimes it's just more readable to have one line that is
> slightly longer than it should be, than to split something that is awkward
> to split.
>
>
< cc-list heavily trimmed >
could you speak to the specific case of function signatures ?
I saw nothing in CodingStyle specifically about this.
(I skimmed, and grepped for signature)
forex:
static ssize_t
store_fan_div (struct device *dev, struct device_attribute *devattr,
const char *buf, size_t count)
{...}
IIRC, many like the entire sig on one line, because its grep friendly.
I personally like the above, but grep-ability is hard to argue against.
The above has 2 violations (of strict-grep-ability rule)
1 - return sig is separate
2 - arg-list is split
-
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