From: Wolfgang Denk Date: Thu, 20 Aug 2009 20:31:45 +0200 Subject: [U-Boot] [PATCH v2 1/4]: Move __set/clear_bit from ubifs.h to bitops.h In-Reply-To: <200908201344.37190.vapier@gentoo.org> References: <20090820104944.42dbeca7@marrow.netinsight.se> <20090820105250.191c7ce9@marrow.netinsight.se> <200908201344.37190.vapier@gentoo.org> Message-ID: <20090820183145.C1D67833DBD2@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 Mike Frysinger, In message <200908201344.37190.vapier@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"