From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Mon, 30 Apr 2012 15:38:31 +0200 Subject: [U-Boot] [PATCH v4 3/3] usb:udc:samsung Add functions for storing private gadget data in UDC driver In-Reply-To: <20120430085801.4fe5af09@lmajewski.digital.local> References: <1334214931-19480-1-git-send-email-l.majewski@samsung.com> <1334762811-23068-1-git-send-email-l.majewski@samsung.com> <1334762811-23068-4-git-send-email-l.majewski@samsung.com> <201204300125.12972.marex@denx.de> <20120430085801.4fe5af09@lmajewski.digital.local> Message-ID: <20120430133831.48E4020021A@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Lukasz Majewski, In message <20120430085801.4fe5af09@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.