All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lukasz Majewski <l.majewski@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 RESEND 3/3] usb:udc:samsung Add functions for storing private gadget data in UDC driver
Date: Mon, 30 Apr 2012 17:46:30 +0200	[thread overview]
Message-ID: <20120430174630.2679cc31@lmajewski.digital.local> (raw)
In-Reply-To: <20120430152342.EC15720021A@gemini.denx.de>

Hi Wolfgang,


> Dear Lukasz Majewski,
> 
> In message <1335797479-1091-1-git-send-email-l.majewski@samsung.com>
> you wrote:
> > This commit adds support for storing private data to Samsung's UDC
> > driver. This data is afterward used by usb gadget.
> > 
> > Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
> > Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> > Cc: Marek Vasut <marex@denx.de>
> ...
> > --- a/drivers/usb/gadget/s3c_udc_otg.c
> > +++ b/drivers/usb/gadget/s3c_udc_otg.c
> > @@ -30,7 +30,7 @@
> >   * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> > 02111-1307  USA *
> >   */
> > -
> > +#undef DEBUG
> 
> Sorry, but please do not define what is not defined anyway.
> 
> > +void set_udc_gadget_private_data(void *p)
> > +{
> > +	debug("%s: the_controller: 0x%p, p: 0x%p\n", __func__,
> > +	       the_controller, p);
> > +	the_controller->gadget.dev.device_data = p;
> > +}
> 
> Hm... you chose the easy way.

:-)

> 
> My hope was that you would pick up my hint and keep the functionality,
> and just convert it to debug_cond() instead.
> 
> For example, as is DEBUG_SETUP() would become "active" only when
> DEBUG_S3C_UDC_SETUP is defined; see "include/usb/s3c_udc.h".  If we
> change the plain "#define DEBUG_S3C_UDC_SETUP" into a 
> "#define DEBUG_S3C_UDC_SETUP 1", then we can replace all use of
> 
> 	DEBUG_SETUP(foo, ...);
> 
> by the standard
> 
> 	debug_cond(DEBUG_S3C_UDC_SETUP != 0, foo, ...);
> 
> And similar for all the other DEBUG_S3C_* macros in
> "include/usb/s3c_udc.h"
> 
> That would be much more useful, wouldn't it?
> 

Thank you for detailed debug_cond explanation.

I will look into the code and refactor it.


-- 
Best regards,

Lukasz Majewski

Samsung Poland R&D Center | Linux Platform Group

  reply	other threads:[~2012-04-30 15:46 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-12  7:15 [U-Boot] [PATCH 0/4] usb:gadget:composite: Support for composite gadget framework Lukasz Majewski
2012-04-12  7:15 ` [U-Boot] [PATCH 1/4] usb:gadget:composite Composite framework - files from Linux kernel Lukasz Majewski
2012-04-14  9:46   ` Marek Vasut
2012-04-14 13:41   ` Wolfgang Denk
2012-04-14 13:42   ` Wolfgang Denk
2012-04-16  9:10     ` Lukasz Majewski
2012-04-16 13:59       ` Wolfgang Denk
2012-04-12  7:15 ` [U-Boot] [PATCH 2/4] usb:gadget:composite: Linux composite.{h/c} code adjustement for u-boot Lukasz Majewski
2012-04-14 13:46   ` Wolfgang Denk
2012-04-16  9:23     ` Lukasz Majewski
2012-04-16 14:01       ` Wolfgang Denk
2012-04-12  7:15 ` [U-Boot] [PATCH 3/4] usb:gadget: Wrapper for extracting usb_gadget from linux's device Lukasz Majewski
2012-04-14  9:47   ` Marek Vasut
2012-04-12  7:15 ` [U-Boot] [PATCH 4/4] usb:gadget: Extend device struct to device_data pointer Lukasz Majewski
2012-04-17  7:27 ` [U-Boot] [PATCH v2 0/3] usb:gadget:composite: Support for composite gadget framework Lukasz Majewski
2012-04-17  7:27   ` [U-Boot] [PATCH v2 1/3] usb:gadget:composite USB composite gadget support Lukasz Majewski
2012-04-17  7:47     ` Marek Vasut
2012-04-17 12:45       ` Lukasz Majewski
2012-04-17  7:27   ` [U-Boot] [PATCH v2 2/3] usb:gadget:composite: Support for composite at gadget.h Lukasz Majewski
2012-04-17  7:27   ` [U-Boot] [PATCH v2 3/3] usb:udc:samsung Add functions for storing private gadget data in UDC driver Lukasz Majewski
2012-04-17  7:59     ` Marek Vasut
2012-04-17 14:07 ` [U-Boot] [PATCH v3 0/3] usb:gadget:composite: Support for composite gadget framework Lukasz Majewski
2012-04-17 14:07   ` [U-Boot] [PATCH v3 1/3] usb:gadget:composite USB composite gadget support Lukasz Majewski
2012-04-17 15:32     ` Marek Vasut
2012-04-17 14:07   ` [U-Boot] [PATCH v3 2/3] usb:gadget:composite: Support for composite at gadget.h Lukasz Majewski
2012-04-17 14:07   ` [U-Boot] [PATCH v3 3/3] usb:udc:samsung Add functions for storing private gadget data in UDC driver Lukasz Majewski
2012-04-18 15:26 ` [U-Boot] [PATCH v4 0/3] usb:gadget:composite: Support for composite gadget framework Lukasz Majewski
2012-04-18 15:26   ` [U-Boot] [PATCH v4 1/3] usb:gadget:composite USB composite gadget support Lukasz Majewski
2012-04-25 22:53     ` Marek Vasut
2012-04-26  7:02       ` Lukasz Majewski
2012-04-29 23:22         ` Marek Vasut
2012-04-18 15:26   ` [U-Boot] [PATCH v4 2/3] usb:gadget:composite: Support for composite at gadget.h Lukasz Majewski
2012-04-29 23:23     ` Marek Vasut
2012-04-18 15:26   ` [U-Boot] [PATCH v4 3/3] usb:udc:samsung Add functions for storing private gadget data in UDC driver Lukasz Majewski
2012-04-29 23:25     ` Marek Vasut
2012-04-30  6:58       ` Lukasz Majewski
2012-04-30 12:31         ` Marek Vasut
2012-04-30 13:11           ` Lukasz Majewski
2012-04-30 13:38         ` Wolfgang Denk
2012-04-30 14:23           ` Lukasz Majewski
2012-04-30 14:51     ` [U-Boot] [PATCH v4 RESEND " Lukasz Majewski
2012-04-30 15:22       ` Marek Vasut
2012-04-30 15:23       ` Wolfgang Denk
2012-04-30 15:46         ` Lukasz Majewski [this message]
2012-04-25 15:53   ` [U-Boot] [PATCH v4 0/3] usb:gadget:composite: Support for composite gadget framework Lukasz Majewski
2012-04-25 17:06     ` Marek Vasut
2012-05-01 19:53 ` [U-Boot] [PATCH 0/4] " Marek Vasut
2012-05-02  7:10   ` Lukasz Majewski
2012-05-02 10:37     ` Marek Vasut

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=20120430174630.2679cc31@lmajewski.digital.local \
    --to=l.majewski@samsung.com \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.