[U-Boot] [PATCH v2 1/4]: Move __set/clear_bit from ubifs.h to bitops.h

Wolfgang Denk wd at denx.de
Thu Aug 20 20:31:45 CEST 2009


Dear Mike Frysinger,

In message <200908201344.37190.vapier at gentoo.org> you wrote:
>
> > +#define __set_bit(nr, addr) generic_set_bit(nr, addr)
> > +
> > +#define __clear_bit(nr, addr) generic_clear_bit(nr, addr)
>
> this is just silly to put into every arch header.  why not do in the common
> code:
> #ifndef __set_bit
> # define __set_bit generice_set_bit
> #endif

Because it doesn't work?

The code usually looks like this: "static inline void __set_bit(...)..."

This defines a static inline function, but _not_ a preprocessor
variable of that name.

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
When a program is being  tested,  it  is  too  late  to  make  design
changes.                  -- Geoffrey James, "The Tao of Programming"


More information about the U-Boot mailing list