
4 Jun
2009
4 Jun
'09
1:47 p.m.
Dear Daniel Mack,
In message 1244111241-32735-3-git-send-email-daniel@caiaq.de you wrote:
This adds generic bit operations for all platforms and enables includes the implementations from asm-arm.
I should have read the patch to end...
+static inline void set_bit(int nr, volatile unsigned long *addr) +{
- unsigned long mask = BIT_MASK(nr);
- unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr);
- *p |= mask;
+}
+static inline void clear_bit(int nr, volatile unsigned long *addr) +{
- unsigned long mask = BIT_MASK(nr);
- unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr);
- *p &= ~mask;
+}
Such code has no chance of being accepted anyway.
It tries to be generic and does not care if you use it on memory or device addresses - but for device addresses, the use of proper I/O accessor functions is mandatory.
Full NAK.
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@denx.de
I really hate this damned machine It never does quite what I want
I wish that they would sell it. But only what I tell it.