public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* brcm80211 build busted on big-endian
@ 2011-06-22  2:36 David Miller
  2011-06-22 15:40 ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: David Miller @ 2011-06-22  2:36 UTC (permalink / raw)
  To: greg; +Cc: linux-kernel


It tries to do "xor" operations on pointers because of how the
R_REG() and W_REG() macros are defined.

====================
#define R_REG(r) (\
        SELECT_BUS_READ( \
                ({ \
                        __typeof(*(r)) __osl_v; \
				       		switch (sizeof(*(r))) { \
                        case sizeof(u8): \
                                __osl_v = \
                                readb((volatile u8*)((r)^3)); \
                                break; \
                        case sizeof(u16): \
                                __osl_v = \
                                readw((volatile u16*)((r)^2)); \
                                break; \
                        case sizeof(u32): \
                                __osl_v = readl((volatile u32*)(r)); \
                                break; \
                        } \
                        __osl_v; \
                }), \
                OSL_READ_REG(r)) \
)
====================

This driver is a crap fest of volatile pointers and not-compile-tested
code.

I think turning on staging like this should have been done in the
-next tree so that things like this could be shaken out before it hit
Linus's tree.  Very few people were doing the necessary forced enable
of this stuff.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-06-27 21:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-22  2:36 brcm80211 build busted on big-endian David Miller
2011-06-22 15:40 ` Greg KH
2011-06-22 20:23   ` David Miller
2011-06-23  1:29     ` Stephen Rothwell
2011-06-27 21:36       ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox