[U-Boot] [PATCH 02/22] ARM: sunxi: MMC driver
Luka Perkov
luka at openwrt.org
Sun Nov 25 18:07:30 CET 2012
On Sun, Nov 25, 2012 at 04:39:03PM +0100, Henrik Nordström wrote:
> sön 2012-11-25 klockan 15:33 +0100 skrev Luka Perkov:
> > > +#define MMCDBG(fmt...) printf("[mmc]: "fmt)
> >
> > Why not reuse something from existing uboot code ? (exaple from api/api.c):
> >
> >
> > 53 #ifdef DEBUG
> > 54 #define debugf(fmt, args...) do { printf("%s(): ", __func__); printf(fmt, ##args); } while (0)
> > 55 #else
> > 56 #define debugf(fmt, args...)
> > 57 #endif
>
> Because it's not in a reusable header?
I know, but it might be a good idea to put it somewhere there.
> But should at least use up to date syntax, and debug() instead of
> printf, and less #ifdefs.
>
> What about this:
>
> #define MMCDBG(fmt, args...) debug("[sunxi_mmc] " fmt, ##args)
>
> and printf() changed to debug() in the other debug helpers, and no
> #ifdefs, the compiler will sort it out nicely at -OS
I don't know. Maybe u-boot developers could tell us what is the best way
to do it...
Luka
More information about the U-Boot
mailing list