From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757274AbbDPLob (ORCPT ); Thu, 16 Apr 2015 07:44:31 -0400 Received: from mail-bn1bn0105.outbound.protection.outlook.com ([157.56.110.105]:26732 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754754AbbDPLo0 (ORCPT ); Thu, 16 Apr 2015 07:44:26 -0400 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=freescale.com; vger.kernel.org; dkim=none (message not signed) header.d=none; Date: Thu, 16 Apr 2015 19:41:53 +0800 From: Peter Chen To: Roger Quadros CC: , , , , , , , , , Subject: Re: [RFC][PATCH v2 03/13] usb: otg-fsm: Prevent build warning "VDBG" redefined Message-ID: <20150416114152.GC3181@shlinux2> References: <1429008120-5395-1-git-send-email-rogerq@ti.com> <1429008120-5395-4-git-send-email-rogerq@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <1429008120-5395-4-git-send-email-rogerq@ti.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:192.88.158.2;CTRY:US;IPV:NLI;EFV:NLI;BMV:1;SFV:NSPM;SFS:(10019020)(6009001)(339900001)(199003)(189002)(51704005)(24454002)(86362001)(87936001)(76176999)(104016003)(77096005)(77156002)(19580405001)(2950100001)(85426001)(19580395003)(62966003)(97756001)(46406003)(47776003)(33716001)(54356999)(106466001)(50986999)(110136001)(105606002)(50466002)(23726002)(46102003)(4001350100001)(33656002)(83506001)(6806004)(92566002);DIR:OUT;SFP:1102;SCL:1;SRVR:DM2PR0301MB1231;H:az84smr01.freescale.net;FPR:;SPF:Fail;MLV:sfv;A:1;MX:1;LANG:en; X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM2PR0301MB1231; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(5002010);SRVR:DM2PR0301MB1231;BCL:0;PCL:0;RULEID:;SRVR:DM2PR0301MB1231; X-Forefront-PRVS: 0548586081 X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Apr 2015 11:44:23.3278 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d;Ip=[192.88.158.2];Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0301MB1231 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 14, 2015 at 01:41:50PM +0300, Roger Quadros wrote: > If usb/otg-fsm.h and usb/composite.h are included together > then it results in the build warning [1]. > > Prevent that by moving the VDBG defination into the > usb-otg-fsm.c file where it is used. > > Also get rid of MPC_LOC which doesn't seem to be used > by anyone. > > [1] - warning fixed by this patch: > > In file included from drivers/usb/dwc3/core.h:33, > from drivers/usb/dwc3/ep0.c:33: > include/linux/usb/otg-fsm.h:30:1: warning: "VDBG" redefined > In file included from drivers/usb/dwc3/ep0.c:31: > include/linux/usb/composite.h:615:1: warning: this is the location of the previous definition > > Signed-off-by: Roger Quadros > --- > drivers/usb/common/usb-otg-fsm.c | 9 +++++++++ > include/linux/usb/otg-fsm.h | 15 --------------- > 2 files changed, 9 insertions(+), 15 deletions(-) > > diff --git a/drivers/usb/common/usb-otg-fsm.c b/drivers/usb/common/usb-otg-fsm.c > index 0caa37b..35f311a 100644 > --- a/drivers/usb/common/usb-otg-fsm.c > +++ b/drivers/usb/common/usb-otg-fsm.c > @@ -30,6 +30,15 @@ > #include > #include > > +#undef VDBG > + > +#ifdef VERBOSE > +#define VDBG(fmt, args...) pr_debug("[%s] " fmt , \ > + __func__, ## args) > +#else > +#define VDBG(stuff...) do {} while (0) > +#endif > + It is obsolete too, we may use dev_vdbg instead of it. > /* Change USB protocol when there is a protocol change */ > static int otg_set_protocol(struct otg_fsm *fsm, int protocol) > { > diff --git a/include/linux/usb/otg-fsm.h b/include/linux/usb/otg-fsm.h > index 85a9150..73136aa 100644 > --- a/include/linux/usb/otg-fsm.h > +++ b/include/linux/usb/otg-fsm.h > @@ -21,21 +21,6 @@ > #include > #include > > -#undef VERBOSE > - > -#ifdef VERBOSE > -#define VDBG(fmt, args...) pr_debug("[%s] " fmt , \ > - __func__, ## args) > -#else > -#define VDBG(stuff...) do {} while (0) > -#endif > - > -#ifdef VERBOSE > -#define MPC_LOC printk("Current Location [%s]:[%d]\n", __FILE__, __LINE__) > -#else > -#define MPC_LOC do {} while (0) > -#endif > - > #define PROTO_UNDEF (0) > #define PROTO_HOST (1) > #define PROTO_GADGET (2) > -- > 2.1.0 > -- Best Regards, Peter Chen From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Chen Subject: Re: [RFC][PATCH v2 03/13] usb: otg-fsm: Prevent build warning "VDBG" redefined Date: Thu, 16 Apr 2015 19:41:53 +0800 Message-ID: <20150416114152.GC3181@shlinux2> References: <1429008120-5395-1-git-send-email-rogerq@ti.com> <1429008120-5395-4-git-send-email-rogerq@ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Return-path: Content-Disposition: inline In-Reply-To: <1429008120-5395-4-git-send-email-rogerq-l0cyMroinI0@public.gmane.org> Sender: linux-usb-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Roger Quadros Cc: gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org, balbi-l0cyMroinI0@public.gmane.org, stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org, dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org, jun.li-KZfg59tc24xl57MIdRCFDg@public.gmane.org, mathias.nyman-VuQAYsv1563Yd54FQh9/CA@public.gmane.org, tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org, linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-omap@vger.kernel.org On Tue, Apr 14, 2015 at 01:41:50PM +0300, Roger Quadros wrote: > If usb/otg-fsm.h and usb/composite.h are included together > then it results in the build warning [1]. > > Prevent that by moving the VDBG defination into the > usb-otg-fsm.c file where it is used. > > Also get rid of MPC_LOC which doesn't seem to be used > by anyone. > > [1] - warning fixed by this patch: > > In file included from drivers/usb/dwc3/core.h:33, > from drivers/usb/dwc3/ep0.c:33: > include/linux/usb/otg-fsm.h:30:1: warning: "VDBG" redefined > In file included from drivers/usb/dwc3/ep0.c:31: > include/linux/usb/composite.h:615:1: warning: this is the location of the previous definition > > Signed-off-by: Roger Quadros > --- > drivers/usb/common/usb-otg-fsm.c | 9 +++++++++ > include/linux/usb/otg-fsm.h | 15 --------------- > 2 files changed, 9 insertions(+), 15 deletions(-) > > diff --git a/drivers/usb/common/usb-otg-fsm.c b/drivers/usb/common/usb-otg-fsm.c > index 0caa37b..35f311a 100644 > --- a/drivers/usb/common/usb-otg-fsm.c > +++ b/drivers/usb/common/usb-otg-fsm.c > @@ -30,6 +30,15 @@ > #include > #include > > +#undef VDBG > + > +#ifdef VERBOSE > +#define VDBG(fmt, args...) pr_debug("[%s] " fmt , \ > + __func__, ## args) > +#else > +#define VDBG(stuff...) do {} while (0) > +#endif > + It is obsolete too, we may use dev_vdbg instead of it. > /* Change USB protocol when there is a protocol change */ > static int otg_set_protocol(struct otg_fsm *fsm, int protocol) > { > diff --git a/include/linux/usb/otg-fsm.h b/include/linux/usb/otg-fsm.h > index 85a9150..73136aa 100644 > --- a/include/linux/usb/otg-fsm.h > +++ b/include/linux/usb/otg-fsm.h > @@ -21,21 +21,6 @@ > #include > #include > > -#undef VERBOSE > - > -#ifdef VERBOSE > -#define VDBG(fmt, args...) pr_debug("[%s] " fmt , \ > - __func__, ## args) > -#else > -#define VDBG(stuff...) do {} while (0) > -#endif > - > -#ifdef VERBOSE > -#define MPC_LOC printk("Current Location [%s]:[%d]\n", __FILE__, __LINE__) > -#else > -#define MPC_LOC do {} while (0) > -#endif > - > #define PROTO_UNDEF (0) > #define PROTO_HOST (1) > #define PROTO_GADGET (2) > -- > 2.1.0 > -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html