Use the "real" inline marking for functions.
Cc: Brett Rudley <brudley@broadcom.com>
Cc: Henry Ptasinski <henryp@broadcom.com>
Cc: Nohee Ko <noheek@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
#else /* !__GNUC__ */
/* Inline versions avoid referencing the argument multiple times */
-static INLINE uint16 bcmswap16(uint16 val)
+static inline uint16 bcmswap16(uint16 val)
{
return BCMSWAP16(val);
}
-static INLINE uint32 bcmswap32(uint32 val)
+static inline uint32 bcmswap32(uint32 val)
{
return BCMSWAP32(val);
}
-static INLINE uint32 bcmswap32by16(uint32 val)
+static inline uint32 bcmswap32by16(uint32 val)
{
return BCMSWAP32BY16(val);
}
/* Reverse pairs of bytes in a buffer (not for high-performance use) */
/* buf - start of buffer of shorts to swap */
/* len - byte length of buffer */
-static INLINE void bcmswap16_buf(uint16 *buf, uint len)
+static inline void bcmswap16_buf(uint16 *buf, uint len)
{
len = len / 2;
/*
* Store 16-bit value to unaligned little-endian byte array.
*/
-static INLINE void htol16_ua_store(uint16 val, uint8 *bytes)
+static inline void htol16_ua_store(uint16 val, uint8 *bytes)
{
bytes[0] = val & 0xff;
bytes[1] = val >> 8;
/*
* Store 32-bit value to unaligned little-endian byte array.
*/
-static INLINE void htol32_ua_store(uint32 val, uint8 *bytes)
+static inline void htol32_ua_store(uint32 val, uint8 *bytes)
{
bytes[0] = val & 0xff;
bytes[1] = (val >> 8) & 0xff;
/*
* Store 16-bit value to unaligned network-(big-)endian byte array.
*/
-static INLINE void hton16_ua_store(uint16 val, uint8 *bytes)
+static inline void hton16_ua_store(uint16 val, uint8 *bytes)
{
bytes[0] = val >> 8;
bytes[1] = val & 0xff;
/*
* Store 32-bit value to unaligned network-(big-)endian byte array.
*/
-static INLINE void hton32_ua_store(uint32 val, uint8 *bytes)
+static inline void hton32_ua_store(uint32 val, uint8 *bytes)
{
bytes[0] = val >> 24;
bytes[1] = (val >> 16) & 0xff;
/*
* Load 16-bit value from unaligned little-endian byte array.
*/
-static INLINE uint16 ltoh16_ua(const void *bytes)
+static inline uint16 ltoh16_ua(const void *bytes)
{
return _LTOH16_UA((const uint8 *)bytes);
}
/*
* Load 32-bit value from unaligned little-endian byte array.
*/
-static INLINE uint32 ltoh32_ua(const void *bytes)
+static inline uint32 ltoh32_ua(const void *bytes)
{
return _LTOH32_UA((const uint8 *)bytes);
}
/*
* Load 16-bit value from unaligned big-(network-)endian byte array.
*/
-static INLINE uint16 ntoh16_ua(const void *bytes)
+static inline uint16 ntoh16_ua(const void *bytes)
{
return _NTOH16_UA((const uint8 *)bytes);
}
/*
* Load 32-bit value from unaligned big-(network-)endian byte array.
*/
-static INLINE uint32 ntoh32_ua(const void *bytes)
+static inline uint32 ntoh32_ua(const void *bytes)
{
return _NTOH32_UA((const uint8 *)bytes);
}
* @return TRUE if variable is defined and its value is string equal
* to match or FALSE otherwise
*/
-static INLINE int nvram_match(char *name, char *match)
+static inline int nvram_match(char *name, char *match)
{
const char *value = nvram_get(name);
return value && !strcmp(value, match);
* @return TRUE if variable is defined and its value is not string
* equal to invmatch or FALSE otherwise
*/
-static INLINE int nvram_invmatch(char *name, char *invmatch)
+static inline int nvram_invmatch(char *name, char *invmatch)
{
const char *value = nvram_get(name);
return value && strcmp(value, invmatch);
/* crypto utility function */
/* 128-bit xor: *dst = *src1 xor *src2. dst1, src1 and src2 may have any alignment */
- static INLINE void
+ static inline void
xor_128bit_block(const uint8 *src1, const uint8 *src2, uint8 *dst) {
if (
#ifdef __i386__
#include <typedefs.h>
/* local prototypes */
-static INLINE uint32 find_msbit(uint32 x);
+static inline uint32 find_msbit(uint32 x);
/*
* find_msbit: returns index of most significant set bit in x, with index
* model 2, stepping 12, "Pentium 75 - 200"), so we use the generic
* implementation instead.
*/
-static INLINE uint32 find_msbit(uint32 x)
+static inline uint32 find_msbit(uint32 x)
{
uint msbit;
__asm__("bsrl %1,%0" : "=r"(msbit)
#define DB_POW_MASK2 0x0000000c
#define DB_POW_MASK1 0x00000002
-static INLINE uint32 find_msbit(uint32 x)
+static inline uint32 find_msbit(uint32 x)
{
uint32 temp_x = x;
uint msbit = 0;
extern void *osl_pktget_static(osl_t *osh, uint len);
extern void osl_pktfree_static(osl_t *osh, void *skb, bool send);
-static INLINE void *
+static inline void *
osl_pkt_frmnative(osl_pubinfo_t *osh, struct sk_buff *skb)
{
struct sk_buff *nskb;
#define PKTFRMNATIVE(osh, skb) \
osl_pkt_frmnative(((osl_pubinfo_t *)osh), (struct sk_buff*)(skb))
-static INLINE struct sk_buff *
+static inline struct sk_buff *
osl_pkt_tonative(osl_pubinfo_t *osh, void *pkt)
{
struct sk_buff *nskb;
#define si_eci_init(sih) (0)
#define si_eci_notify_bt(sih, type, val) (0)
#define si_seci(sih) 0
-static INLINE void *si_seci_init(si_t *sih, uint8 use_seci)
+static inline void *si_seci_init(si_t *sih, uint8 use_seci)
{
return NULL;
}
#define AUTO (-1) /* Auto = -1 */
-/* define PTRSZ, INLINE */
-
+/* define PTRSZ */
#ifndef PTRSZ
#define PTRSZ sizeof(char *)
#endif
-/* Detect compiler type. */
-#if defined(__GNUC__)
-#define BWL_COMPILER_GNU
-#elif defined(__CC_ARM) && __CC_ARM
-#define BWL_COMPILER_ARMCC
-#else
-#error "Unknown compiler!"
-#endif
-
-#ifndef INLINE
-#if defined(BWL_COMPILER_GNU)
-#define INLINE __inline__
-#elif defined(BWL_COMPILER_ARMCC)
-#define INLINE __inline
-#else
-#define INLINE
-#endif
-#endif /* INLINE */
-
#undef TYPEDEF_BOOL
#undef TYPEDEF_UCHAR
#undef TYPEDEF_USHORT
uint32 frmtxstatus,
uint32 frmtxstatus2);
-static INLINE uint16 pkt_txh_seqnum(wlc_info_t *wlc, void *p)
+static inline uint16 pkt_txh_seqnum(wlc_info_t *wlc, void *p)
{
d11txh_t *txh;
struct dot11_header *h;
* 0 if the interrupt is not for us, or we are in some special cases;
* device interrupt status bits otherwise.
*/
-static INLINE uint32 wlc_intstatus(wlc_info_t *wlc, bool in_isr)
+static inline uint32 wlc_intstatus(wlc_info_t *wlc, bool in_isr)
{
wlc_hw_info_t *wlc_hw = wlc->hw;
d11regs_t *regs = wlc_hw->regs;
* Generate frame ID for a BCMC packet. The frag field is not used
* for MC frames so is used as part of the sequence number.
*/
-static INLINE uint16
+static inline uint16
bcmc_fid_generate(wlc_info_t *wlc, wlc_bsscfg_t *bsscfg, d11txh_t *txh)
{
uint16 frameid;
extern uint32 wlc_get_rspec_history(struct wlc_bsscfg *cfg);
extern uint32 wlc_get_current_highest_rate(struct wlc_bsscfg *cfg);
-static INLINE int wlc_iovar_getuint(struct wlc_info *wlc, const char *name,
+static inline int wlc_iovar_getuint(struct wlc_info *wlc, const char *name,
uint *arg)
{
return wlc_iovar_getint(wlc, name, (int *)arg);
}
-static INLINE int wlc_iovar_getuint8(struct wlc_info *wlc, const char *name,
+static inline int wlc_iovar_getuint8(struct wlc_info *wlc, const char *name,
uint8 *arg)
{
return wlc_iovar_getint8(wlc, name, (int8 *) arg);
}
-static INLINE int wlc_iovar_setuint(struct wlc_info *wlc, const char *name,
+static inline int wlc_iovar_setuint(struct wlc_info *wlc, const char *name,
uint arg)
{
return wlc_iovar_setint(wlc, name, (int)arg);
wlc_hw_info_t *wlc_hw;
} wlc_rpc_ctx_t;
-static INLINE rpc_buf_t *wlc_rpc_buf_alloc(rpc_info_t *rpc, bcm_xdr_buf_t *b,
+static inline rpc_buf_t *wlc_rpc_buf_alloc(rpc_info_t *rpc, bcm_xdr_buf_t *b,
uint len, wlc_rpc_id_t rpc_id)
{
rpc_buf_t *rpc_buf;
uint32 ackphyrxsh_phyerr;
} wlc_rpc_txstatus_t;
-static INLINE
+static inline
void txstatus2rpc_txstatus(tx_status_t *txstatus,
wlc_rpc_txstatus_t *rpc_txstatus)
{
(txstatus->ackphyrxsh << 16) | txstatus->phyerr;
}
-static INLINE
+static inline
void rpc_txstatus2txstatus(wlc_rpc_txstatus_t *rpc_txstatus,
tx_status_t *txstatus)
{
static bool dma64_rxenabled(dma_info_t *di);
static bool _dma64_addrext(osl_t *osh, dma64regs_t *dma64regs);
-STATIC INLINE uint32 parity32(uint32 data);
+STATIC inline uint32 parity32(uint32 data);
const di_fcn_t dma64proc = {
(di_detach_t) _dma_detach,
}
/* init the tx or rx descriptor */
-static INLINE void
+static inline void
dma32_dd_upd(dma_info_t *di, dma32dd_t *ddring, dmaaddr_t pa, uint outidx,
uint32 *flags, uint32 bufcount)
{
}
/* Check for odd number of 1's */
-STATIC INLINE uint32 parity32(uint32 data)
+STATIC inline uint32 parity32(uint32 data)
{
data ^= data >> 16;
data ^= data >> 8;
#define DMA64_DD_PARITY(dd) parity32((dd)->addrlow ^ (dd)->addrhigh ^ (dd)->ctrl1 ^ (dd)->ctrl2)
-static INLINE void
+static inline void
dma64_dd_upd(dma_info_t *di, dma64dd_t *ddring, dmaaddr_t pa, uint outidx,
uint32 *flags, uint32 bufcount)
{