[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20110621.193641.1605224831578508501.davem@davemloft.net>
Date:	Tue, 21 Jun 2011 19:36:41 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	greg@...ah.com
CC:	linux-kernel@...r.kernel.org
Subject: brcm80211 build busted on big-endian
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Powered by blists - more mailing lists
 
