From: Roger Quadros <rogerq@ti.com>
To: balbi@kernel.org, tony@atomide.com
Cc: peter.chen@freescale.com, vivek.gautam@codeaurora.org,
linux-usb@vger.kernel.org, linux-omap@vger.kernel.org,
linux-kernel@vger.kernel.org, Roger Quadros <rogerq@ti.com>
Subject: [PATCH 1/8] usb: otg-fsm: Prevent build warning "VDBG" redefined
Date: Mon, 23 Jan 2017 13:19:34 +0200 [thread overview]
Message-ID: <1485170381-32110-2-git-send-email-rogerq@ti.com> (raw)
In-Reply-To: <1485170381-32110-1-git-send-email-rogerq@ti.com>
If usb/otg-fsm.h and usb/composite.h are included together
then it results in the build warning [1].
Prevent that by defining VDBG locally.
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 <rogerq@ti.com>
Reviewed-by: Jun Li <jun.li@nxp.com>
Acked-by: Peter Chen <peter.chen@nxp.com>
---
drivers/usb/common/usb-otg-fsm.c | 7 +++++++
drivers/usb/phy/phy-fsl-usb.c | 7 +++++++
include/linux/usb/otg-fsm.h | 15 ---------------
3 files changed, 14 insertions(+), 15 deletions(-)
diff --git a/drivers/usb/common/usb-otg-fsm.c b/drivers/usb/common/usb-otg-fsm.c
index 2f537bb..b8fe31e 100644
--- a/drivers/usb/common/usb-otg-fsm.c
+++ b/drivers/usb/common/usb-otg-fsm.c
@@ -31,6 +31,13 @@
#include <linux/usb/otg.h>
#include <linux/usb/otg-fsm.h>
+#ifdef VERBOSE
+#define VDBG(fmt, args...) pr_debug("[%s] " fmt, \
+ __func__, ## args)
+#else
+#define VDBG(stuff...) do {} while (0)
+#endif
+
/* Change USB protocol when there is a protocol change */
static int otg_set_protocol(struct otg_fsm *fsm, int protocol)
{
diff --git a/drivers/usb/phy/phy-fsl-usb.c b/drivers/usb/phy/phy-fsl-usb.c
index 94eb292..a8784ec 100644
--- a/drivers/usb/phy/phy-fsl-usb.c
+++ b/drivers/usb/phy/phy-fsl-usb.c
@@ -44,6 +44,13 @@
#include "phy-fsl-usb.h"
+#ifdef VERBOSE
+#define VDBG(fmt, args...) pr_debug("[%s] " fmt, \
+ __func__, ## args)
+#else
+#define VDBG(stuff...) do {} while (0)
+#endif
+
#define DRIVER_VERSION "Rev. 1.55"
#define DRIVER_AUTHOR "Jerry Huang/Li Yang"
#define DRIVER_DESC "Freescale USB OTG Transceiver Driver"
diff --git a/include/linux/usb/otg-fsm.h b/include/linux/usb/otg-fsm.h
index 7a03505..a0a8f87 100644
--- a/include/linux/usb/otg-fsm.h
+++ b/include/linux/usb/otg-fsm.h
@@ -21,21 +21,6 @@
#include <linux/mutex.h>
#include <linux/errno.h>
-#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.7.4
next prev parent reply other threads:[~2017-01-23 11:19 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20170123112122epcas4p3af3d2f3434d02967d7c662a9ab9f3e31@epcas4p3.samsung.com>
2017-01-23 11:19 ` [PATCH 0/8] usb: dwc3: add dual-role support Roger Quadros
2017-01-23 11:19 ` Roger Quadros [this message]
2017-01-23 11:19 ` [PATCH 3/8] usb: dwc3: use BIT() macro where possible Roger Quadros
2017-01-23 11:19 ` [PATCH 4/8] usb: dwc3: core.h: add some register definitions Roger Quadros
2017-01-23 11:19 ` [PATCH 5/8] usb: dwc3: add dual-role support Roger Quadros
2017-01-23 11:19 ` [PATCH 6/8] ARM: dts: dra7x-evm: Enable dual-role mode for USB1 Roger Quadros
2017-01-26 15:56 ` Tony Lindgren
2017-01-26 16:33 ` Roger Quadros
2017-01-23 11:19 ` [PATCH 7/8] ARM: dts: am43xx: " Roger Quadros
2017-01-23 11:19 ` [PATCH 8/8] ARM: dts: am57xx-idk: Enable dual-role mode for USB2 Roger Quadros
2017-01-23 11:31 ` [PATCH 0/8] usb: dwc3: add dual-role support Chanwoo Choi
[not found] ` <1485170381-32110-1-git-send-email-rogerq-l0cyMroinI0@public.gmane.org>
2017-01-23 11:19 ` [PATCH 2/8] usb: dwc3-omap: Fix missing break in dwc3_omap_set_mailbox() Roger Quadros
2017-02-09 6:42 ` [PATCH 0/8] usb: dwc3: add dual-role support Vivek Gautam
2017-02-09 7:49 ` Roger Quadros
[not found] ` <81abd13d-4800-2f05-8ad2-7d31d7f596f4-l0cyMroinI0@public.gmane.org>
2017-02-09 11:38 ` Vivek Gautam
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1485170381-32110-2-git-send-email-rogerq@ti.com \
--to=rogerq@ti.com \
--cc=balbi@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=peter.chen@freescale.com \
--cc=tony@atomide.com \
--cc=vivek.gautam@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).