linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@xenotime.net>
To: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Cc: devel@driverdev.osuosl.org,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	linux-usb@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Michal Nazarewicz <mnazarewicz@gmail.com>,
	linux-kernel@vger.kernel.org, Felipe Balbi <balbi@ti.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	linux-next@vger.kernel.org,
	Alan Stern <stern@rowland.harvard.edu>,
	Benoit Goby <benoit@android.com>,
	Mike Lockwood <lockwood@android.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>
Subject: Re: [PATCH 2/2] drivers: usb: gadget: add multiple definition guards
Date: Tue, 12 Jun 2012 09:17:25 -0700	[thread overview]
Message-ID: <4FD76B95.60708@xenotime.net> (raw)
In-Reply-To: <1339405995-6298-1-git-send-email-andrzej.p@samsung.com>

On 06/11/2012 02:13 AM, Andrzej Pietrasiewicz wrote:

> 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>


Acked-by: Randy Dunlap <rdunlap@xenotime.net>

Thanks.

> ---
>  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
>  
>  /*-------------------------------------------------------------------------*/



-- 
~Randy

      reply	other threads:[~2012-06-12 16:17 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
     [not found]     ` <Pine.LNX.4.44L0.1206071646360.1185-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
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     ` [PATCH 2/2] drivers: usb: gadget: add multiple definition guards Andrzej Pietrasiewicz
2012-06-12 16:17       ` Randy Dunlap [this message]

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=4FD76B95.60708@xenotime.net \
    --to=rdunlap@xenotime.net \
    --cc=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=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;
as well as URLs for NNTP newsgroup(s).