* [PATCH] add macros notice(), dev_notice() (take 2)
@ 2006-03-08 22:53 Tilman Schmidt
0 siblings, 0 replies; only message in thread
From: Tilman Schmidt @ 2006-03-08 22:53 UTC (permalink / raw)
To: linux-usb-devel, linux-kernel; +Cc: hjlipp, Greg KH
[-- Attachment #1: Type: text/plain, Size: 2141 bytes --]
Both usb.h and device.h have collections of convenience macros for
printk() with the KERN_ERR, KERN_WARNING, and KERN_NOTICE severity
levels. This patch adds macros for the KERN_NOTICE level which was
so far uncatered for.
These macros already exist privately in drivers/isdn/gigaset/gigaset.h
(currently in the process of being submitted for the kernel tree)
but they really belong with their brothers and sisters in
include/linux/{device,usb}.h.
This patch applies to kernel 2.6.16-rc5. It replaces the one posted
on 24 Feb 2006 11:05:45 +0100 which might cause compile errors in
non-modular drivers.
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
---
device.h | 2 ++
usb.h | 2 ++
2 files changed, 4 insertions(+)
diff -ru linux-2.6.16-rc5/include/linux/device.h linux-2.6.16-rc5-patch-splitpoint/include/linux/device.h
--- linux-2.6.16-rc5/include/linux/device.h 2006-02-27 06:09:35.000000000 +0100
+++ linux-2.6.16-rc5-patch-splitpoint/include/linux/device.h 2006-03-08 12:31:51.000000000 +0100
@@ -424,6 +424,8 @@
dev_printk(KERN_INFO , dev , format , ## arg)
#define dev_warn(dev, format, arg...) \
dev_printk(KERN_WARNING , dev , format , ## arg)
+#define dev_notice(dev, format, arg...) \
+ dev_printk(KERN_NOTICE , dev , format , ## arg)
/* Create alias, so I can be autoloaded. */
#define MODULE_ALIAS_CHARDEV(major,minor) \
diff -ru linux-2.6.16-rc5/include/linux/usb.h linux-2.6.16-rc5-patch-splitpoint/include/linux/usb.h
--- linux-2.6.16-rc5/include/linux/usb.h 2006-02-27 06:09:35.000000000 +0100
+++ linux-2.6.16-rc5-patch-splitpoint/include/linux/usb.h 2006-03-08 12:36:03.000000000 +0100
@@ -1205,6 +1205,8 @@
__FILE__ , ## arg)
#define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n" , \
__FILE__ , ## arg)
+#define notice(format, arg...) printk(KERN_NOTICE "%s: " format "\n" , \
+ __FILE__ , ## arg)
#endif /* __KERNEL__ */
--
Tilman Schmidt E-Mail: tilman@imap.cc
Bonn, Germany
Diese Nachricht besteht zu 100% aus wiederverwerteten Bits.
Ungeöffnet mindestens haltbar bis: (siehe Rückseite)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 253 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-03-08 22:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-08 22:53 [PATCH] add macros notice(), dev_notice() (take 2) Tilman Schmidt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox