Skip to contentSkip to conversation

add macros notice(), dev_notice()

PATCH New Tilman Schmidt 1 participant 1 message Feb 24, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 add macros notice(), dev_notice()

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.

---

 device.h |    2 ++
 usb.h    |    2 ++
 2 files changed, 4 insertions(+)
include/linux/device.h +2 -0
diff -ru linux-2.6.16-rc4-patch-splitpoint/include/linux/device.h linux-2.6.16-rc4/include/linux/device.h
@@ -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) \
include/linux/usb.h +2 -0
diff -ru linux-2.6.16-rc4-patch-splitpoint/include/linux/usb.h linux-2.6.16-rc4/include/linux/usb.h
@@ -1216,6 +1216,8 @@
 	THIS_MODULE ? THIS_MODULE->name : __FILE__ , ## arg)
 #define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n" , \
 	THIS_MODULE ? THIS_MODULE->name : __FILE__ , ## arg)
+#define notice(format, arg...) printk(KERN_NOTICE "%s: " format "\n" , \
+	THIS_MODULE ? THIS_MODULE->name : __FILE__ , ## arg)
 
 
 #endif  /* __KERNEL__ */

--
Tilman Schmidt E-Mail: [email protected]
Bonn, Germany
Diese Nachricht besteht zu 100% aus wiederverwerteten Bits. Ungeöffnet mindestens haltbar bis: (siehe Rückseite)