[U-Boot] [PATCH v4 3/3] usb:udc:samsung Add functions for storing private gadget data in UDC driver
Wolfgang Denk
wd at denx.de
Mon Apr 30 15:38:31 CEST 2012
Dear Lukasz Majewski,
In message <20120430085801.4fe5af09 at lmajewski.digital.local> you wrote:
>
> > > +void set_udc_gadget_private_data(void *p)
> > > +{
> > > + DEBUG_SETUP("%s: the_controller: 0x%p, p: 0x%p\n",
> > > __func__,
> > > + the_controller, p);
> >
> > debug() and fix this message, otherwise:
>
> The DEBUG_SETUP macro has been used to be in sync with the already
> available udc driver. This driver has different DEBUG_* macros, which
> helps in debugging different parts of UDC driver.
I think Marek has a good point here. It was an oversight that this
"private" DEBUG_ stuff slipped into mainline. This should never have
happened. We tried hard to get rid of such conditionally compiled
code for debug() with the rest of the code, so we should not start
re-adding all this again.
> If this is MUST, then I will change it, otherwise I'd like to leave it
> alone.
>
> Is it OK with you?
Sorry, but I object.
At the moment, only include/usb/s3c_udc.h defines this, i. e. it is
not a generally usable feature anyway. In anyu case, this
implementation needs to get fixed. See the code for the debug()
implementation for an example.
Instead of defining your own set of private macros, you can use
debug_cond() instead - this works without #ifdef's.
Thanks.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
If the odds are a million to one against something occuring, chances
are 50-50 it will.
More information about the U-Boot
mailing list