mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
To: linux-usb@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Felipe Balbi <balbi@ti.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Michal Nazarewicz <mnazarewicz@gmail.com>,
	Benoit Goby <benoit@android.com>,
	Mike Lockwood <lockwood@android.com>,
	Andrzej Pietrasiewicz <andrzej.p@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Alan Stern <stern@rowland.harvard.edu>,
	Randy Dunlap <rdunlap@xenotime.net>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
	devel@driverdev.osuosl.org
Subject: [PATCH 2/2] drivers: usb: gadget: add multiple definition guards
Date: Mon, 11 Jun 2012 11:13:15 +0200	[thread overview]
Message-ID: <1339405995-6298-1-git-send-email-andrzej.p@samsung.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1206071646360.1185-100000@iolanthe.rowland.org>

If f_fs.c and u_serial.c are combined together using #include, which has
been a common practice so far, the pr_vdebug macro is defined multiple
times. Define it only once.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
 drivers/usb/gadget/f_fs.c     |    4 ++++
 drivers/usb/gadget/u_serial.c |    4 ++++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/gadget/f_fs.c b/drivers/usb/gadget/f_fs.c
index dcd1c7f..27c841d 100644
--- a/drivers/usb/gadget/f_fs.c
+++ b/drivers/usb/gadget/f_fs.c
@@ -33,11 +33,15 @@
 /* Debugging ****************************************************************/
 
 #ifdef VERBOSE_DEBUG
+#ifndef pr_vdebug
 #  define pr_vdebug pr_debug
+#endif /* pr_vdebug */
 #  define ffs_dump_mem(prefix, ptr, len) \
 	print_hex_dump_bytes(pr_fmt(prefix ": "), DUMP_PREFIX_NONE, ptr, len)
 #else
+#ifndef pr_vdebug
 #  define pr_vdebug(...)                 do { } while (0)
+#endif /* pr_vdebug */
 #  define ffs_dump_mem(prefix, ptr, len) do { } while (0)
 #endif /* VERBOSE_DEBUG */
 
diff --git a/drivers/usb/gadget/u_serial.c b/drivers/usb/gadget/u_serial.c
index 5b3f5ff..da6d479 100644
--- a/drivers/usb/gadget/u_serial.c
+++ b/drivers/usb/gadget/u_serial.c
@@ -132,11 +132,15 @@ static unsigned	n_ports;
 
 
 #ifdef VERBOSE_DEBUG
+#ifndef pr_vdebug
 #define pr_vdebug(fmt, arg...) \
 	pr_debug(fmt, ##arg)
+#endif /* pr_vdebug */
 #else
+#ifndef pr_vdebig
 #define pr_vdebug(fmt, arg...) \
 	({ if (0) pr_debug(fmt, ##arg); })
+#endif /* pr_vdebug */
 #endif
 
 /*-------------------------------------------------------------------------*/
-- 
1.7.0.4


  parent reply	other threads:[~2012-06-11  9:13 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-07  3:18 linux-next: Tree for Jun 7 Stephen Rothwell
2012-06-07 16:30 ` linux-next: Tree for Jun 7 (staging/ccg) Randy Dunlap
2012-06-07 16:33 ` linux-next: Tree for Jun 7 (mfd/twl6040-irq) Randy Dunlap
2012-06-07 17:53   ` Samuel Ortiz
2012-06-07 16:58 ` linux-next: Tree for Jun 7 (fs / block / rcu) Randy Dunlap
2012-06-07 20:00   ` David Brown
2012-06-07 22:31     ` Mark Brown
2012-06-08  4:07       ` Paul E. McKenney
2012-06-07 20:08 ` linux-next: Tree for Jun 7 (staging/ccg #2) Randy Dunlap
2012-06-07 20:59   ` Alan Stern
2012-06-11  8:44     ` Andrzej Pietrasiewicz
2012-06-11  9:07     ` [PATCH 1/2] staging: usb: gadget: Configurable Composite Gadget depends on BLOCK Andrzej Pietrasiewicz
2012-06-11  9:11     ` [PATCH 1/2 RESEND] " Andrzej Pietrasiewicz
2012-06-12 16:17       ` Randy Dunlap
2012-06-11  9:13     ` Andrzej Pietrasiewicz [this message]
2012-06-12 16:17       ` [PATCH 2/2] drivers: usb: gadget: add multiple definition guards Randy Dunlap

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=1339405995-6298-1-git-send-email-andrzej.p@samsung.com \
    --to=andrzej.p@samsung.com \
    --cc=balbi@ti.com \
    --cc=benoit@android.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=lockwood@android.com \
    --cc=m.szyprowski@samsung.com \
    --cc=mnazarewicz@gmail.com \
    --cc=rdunlap@xenotime.net \
    --cc=sfr@canb.auug.org.au \
    --cc=stern@rowland.harvard.edu \
    /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

all inboxes | Powered by JetHome®