[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0709231134480.15712@fbirervta.pbzchgretzou.qr>
Date: Sun, 23 Sep 2007 11:38:58 +0200 (CEST)
From: Jan Engelhardt <jengelh@...putergmbh.de>
To: Vegard Nossum <vegard.nossum@...il.com>
cc: Joe Perches <joe@...ches.com>, LKML <linux-kernel@...r.kernel.org>,
holzheu <holzheu@...ux.vnet.ibm.com>,
Rob Landley <rob@...dley.net>,
Dick Streefland <dick.streefland@...ium.nl>
Subject: Re: [RFC] New kernel-message logging API
On Sep 23 2007 11:20, Vegard Nossum wrote:
>> >printk(KERN_INFO "Message.\n");
>> >kprint_info("Message.");
>>
>> I'd rather fix up code to reduce its indent rather than
>> trying microoptimizations at the function name level!
>
>Well, that's a different discussion, really. Is fixing the body of
>[v]printk() enough?
I mean the bodies of functions calling printk. (where possible)
Like this:
diff --git a/fs/quota_v2.c b/fs/quota_v2.c
index c519a58..49e04e7 100644
--- a/fs/quota_v2.c
+++ b/fs/quota_v2.c
@@ -86,12 +86,12 @@ static int v2_write_file_info(struct super_block *sb, int type)
dinfo.dqi_free_entry = cpu_to_le32(info->u.v2_i.dqi_free_entry);
size = sb->s_op->quota_write(sb, type, (char *)&dinfo,
sizeof(struct v2_disk_dqinfo), V2_DQINFOOFF);
- if (size != sizeof(struct v2_disk_dqinfo)) {
- printk(KERN_WARNING "Can't write info structure on device %s.\n",
- sb->s_id);
- return -1;
- }
- return 0;
+ if (size == sizeof(struct v2_disk_dqinfo))
+ return 0;
+
+ printk(KERN_WARNING "Can't write info structure on device %s.\n",
+ sb->s_id);
+ return -1;
}
static void disk2memdqb(struct mem_dqblk *m, struct v2_disk_dqblk *d)
I gained 8 columns _without_ fiddling with the names.
-
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