[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1181758680.26375.25.camel@localhost.localdomain>
Date: Wed, 13 Jun 2007 20:18:00 +0200
From: holzheu <holzheu@...ux.vnet.ibm.com>
To: Greg KH <gregkh@...e.de>
Cc: linux-kernel@...r.kernel.org, randy.dunlap@...cle.com,
akpm@...l.org, mtk-manpages@....net, schwidefsky@...ibm.com,
heiko.carstens@...ibm.com
Subject: Re: [RFC/PATCH] Documentation of kernel messages
Hi Greg,
> Ick, why are you ignoring what we have already with dev_printk() and
> friends? We are just finally getting developers to use that, I think it
> will be almost impossible to get people to change to something else,
> especially one that isn't even as "correct" as what dev_printk() offers
> you today, will be quite hard.
>
> So, why not use what we already have and work off of it?
dev_printk() and friends are great, since they already define something
like KMSG_COMPONENT: The driver name.
But they unfortunately do not solve our problem. We need an identifier
for a documented message in order to find the right description for a
message.
We could add new dev_printk macros for KMSG printks:
#define dev_printk_kmsg(kmsg, dev, format, arg...) \
printk(kmsg "%s: " format , (dev)->bus_id , ## arg)
#define dev_err_kmsg(dev, nr, format, arg...) \
dev_printk_kmsg(KMSG_ERR(nr) , dev , format , ## arg)
E.g. hub.c:
===========
#define KMSG_COMPONENT "hub"
dev_err_kmsg(&udev->dev, 1,
"can't read configurations, error %d\n", err);
Which would result in:
hub.1 5-0:1.0: can't read configuration error 4711
Michael
-
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