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

Mike Frysinger vapier at gentoo.org
Thu Aug 20 20:55:12 CEST 2009


On Thursday 20 August 2009 14:31:45 Wolfgang Denk wrote:
> Mike Frysinger 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.

i know what the code looks like.  the obvious extensions was that the arches 
would do something like:
#define __set_bit __set_bit
to indicate that they have their own replacement
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090820/f97fe5b8/attachment.pgp 


More information about the U-Boot mailing list