Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755128AbXJ2WyG (ORCPT ); Mon, 29 Oct 2007 18:54:06 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752122AbXJ2Wxz (ORCPT ); Mon, 29 Oct 2007 18:53:55 -0400 Received: from az33egw01.freescale.net ([192.88.158.102]:48076 "EHLO az33egw01.freescale.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751607AbXJ2Wxz (ORCPT ); Mon, 29 Oct 2007 18:53:55 -0400 From: Emil Medve To: mochel@osdl.org, gregkh@suse.de, linux-kernel@vger.kernel.org, hjlipp@web.de, tilman@imap.cc, gigaset307x-common@lists.sourceforge.net, kkeil@suse.de, isdn4linux@listserv.isdn4linux.de, mac@melware.de, linux-omap-open-source@linux.omap.com Cc: Emil Medve Subject: [PATCH resend] Make the dev_*() family of macros in device.h complete Date: Mon, 29 Oct 2007 17:43:15 -0500 Message-Id: <1193697795-7823-1-git-send-email-Emilian.Medve@Freescale.com> X-Mailer: git-send-email 1.5.3.GIT Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3921 Lines: 105 Removed duplicates defined elsewhere Signed-off-by: Emil Medve --- Reseding the patch to a larger audience The macros are defined in the relative order KERN_* are defined in kernel.h linux-2.6> scripts/checkpatch.pl 0001-Make-the-dev_-family-of-macros-in-device.h-comple.patch Your patch has no obvious style problems and is ready for submission. drivers/i2c/chips/isp1301_omap.c | 6 ------ drivers/isdn/gigaset/gigaset.h | 6 ------ include/linux/device.h | 26 ++++++++++++++++---------- 3 files changed, 16 insertions(+), 22 deletions(-) diff --git a/drivers/i2c/chips/isp1301_omap.c b/drivers/i2c/chips/isp1301_omap.c index fe04e46..35b9909 100644 --- a/drivers/i2c/chips/isp1301_omap.c +++ b/drivers/i2c/chips/isp1301_omap.c @@ -259,12 +259,6 @@ static inline const char *state_name(struct isp1301 *isp) return state_string(isp->otg.state); } -#ifdef VERBOSE -#define dev_vdbg dev_dbg -#else -#define dev_vdbg(dev, fmt, arg...) do{}while(0) -#endif - /*-------------------------------------------------------------------------*/ /* NOTE: some of this ISP1301 setup is specific to H2 boards; diff --git a/drivers/isdn/gigaset/gigaset.h b/drivers/isdn/gigaset/gigaset.h index a0317ab..02bdaf2 100644 --- a/drivers/isdn/gigaset/gigaset.h +++ b/drivers/isdn/gigaset/gigaset.h @@ -106,12 +106,6 @@ enum debuglevel { activated */ }; -/* missing from linux/device.h ... */ -#ifndef dev_notice -#define dev_notice(dev, format, arg...) \ - dev_printk(KERN_NOTICE , dev , format , ## arg) -#endif - /* Kernel message macros for situations where dev_printk and friends cannot be * used for lack of reliable access to a device structure. * linux/usb.h already contains these but in an obsolete form which clutters diff --git a/include/linux/device.h b/include/linux/device.h index 2e15822..e4f8a1c 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -557,9 +557,24 @@ extern const char *dev_driver_string(struct device *dev); #define dev_printk(level, dev, format, arg...) \ printk(level "%s %s: " format , dev_driver_string(dev) , (dev)->bus_id , ## arg) +#define dev_emerg(dev, format, arg...) \ + dev_printk(KERN_EMERG, dev, format, ## arg) +#define dev_alert(dev, format, arg...) \ + dev_printk(KERN_ALERT, dev, format, ## arg) +#define dev_crit(dev, format, arg...) \ + dev_printk(KERN_CRIT, dev, format, ## arg) +#define dev_err(dev, format, arg...) \ + dev_printk(KERN_ERR, 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) +#define dev_info(dev, format, arg...) \ + dev_printk(KERN_INFO, dev, format, ## arg) + #ifdef DEBUG #define dev_dbg(dev, format, arg...) \ - dev_printk(KERN_DEBUG , dev , format , ## arg) + dev_printk(KERN_DEBUG, dev, format, ## arg) #else static inline int __attribute__ ((format (printf, 2, 3))) dev_dbg(struct device * dev, const char * fmt, ...) @@ -578,15 +593,6 @@ dev_vdbg(struct device * dev, const char * fmt, ...) } #endif -#define dev_err(dev, format, arg...) \ - dev_printk(KERN_ERR , dev , format , ## arg) -#define dev_info(dev, format, arg...) \ - 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) \ MODULE_ALIAS("char-major-" __stringify(major) "-" __stringify(minor)) -- 1.5.3.GIT - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/