From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Sat, 21 Jul 2012 19:21:58 +0200 Subject: [U-Boot] [PATCH 5/7] dfu:cmd: Support for DFU u-boot command In-Reply-To: <201207211320.59965.vapier@gentoo.org> References: <1341308291-14663-1-git-send-email-l.majewski@samsung.com> <201207202311.33418.marex@denx.de> <201207211320.59965.vapier@gentoo.org> Message-ID: <201207211921.59079.marex@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 Mike Frysinger, > On Friday 20 July 2012 17:11:33 Marek Vasut wrote: > > Dear Mike Frysinger, > > > > > On Friday 20 July 2012 07:33:49 Marek Vasut wrote: > > > > Dear Mike Frysinger, > > > > > > > > > On Wednesday 04 July 2012 10:39:20 Marek Vasut wrote: > > > > > > > Putting there the __func__ name would improve structure and > > > > > > > speed up finding right place. > > > > > > > > > > > > And if you want to use even __LINE__, look up __stringify patch > > > > > > in the ML archives ;-) > > > > > > > > > > ugh, no, let's not use __LINE__ anywhere other than debug(). it > > > > > has no business in code we ship as it is pointless bloated noise. > > > > > > > > Helps find out the problematic place in code ... > > > > > > except the code changes thus invalidating the line numbers, and how > > > often are you putting the same string in multiple places that you > > > can't easily coordinate where it came from ? if people are using the > > > same exact string in multiple places, that sounds like a different > > > problem. > > > > You can always replace the function names with macros, which expand in > > place. And then simply add __func__ __LINE__ __FILE__ etc. > > if you wanted to add it while debugging, that's fine, but the point is that > this doesn't belong in normal runtime images. Well doh ... > it's even trivial to define > such a macro: > #ifdef DEBUG > # define printf(fmt, args...) printf("%s:%s:%i: " fmt, __FILE__, __LINE__, > __func__, ## args) > #endif Uh, now I'm not sure what you mean by this stuff above. > (will obviously need a little more work to handle non-const fmt strings, > but you get the idea). > -mike Best regards, Marek Vasut