Commit 62145822 authored by Jason Cooper's avatar Jason Cooper Committed by Greg Kroah-Hartman

staging: brcm80211: fix "ERROR: trailing statements should be on next line"

Signed-off-by: default avatarJason Cooper <jason@lakedaemon.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent ca8c1e59
...@@ -190,12 +190,16 @@ extern int osl_error(int bcmerror); ...@@ -190,12 +190,16 @@ extern int osl_error(int bcmerror);
__typeof(*(r)) __osl_v; \ __typeof(*(r)) __osl_v; \
__asm__ __volatile__("sync"); \ __asm__ __volatile__("sync"); \
switch (sizeof(*(r))) { \ switch (sizeof(*(r))) { \
case sizeof(uint8): __osl_v = \ case sizeof(uint8): \
readb((volatile uint8*)(r)); break; \ __osl_v = readb((volatile uint8*)(r)); \
case sizeof(uint16): __osl_v = \ break; \
readw((volatile uint16*)(r)); break; \ case sizeof(uint16): \
case sizeof(uint32): __osl_v = \ __osl_v = readw((volatile uint16*)(r)); \
readl((volatile uint32*)(r)); break; \ break; \
case sizeof(uint32): \
__osl_v = \
readl((volatile uint32*)(r)); \
break; \
} \ } \
__asm__ __volatile__("sync"); \ __asm__ __volatile__("sync"); \
__osl_v; \ __osl_v; \
...@@ -228,12 +232,17 @@ extern int osl_error(int bcmerror); ...@@ -228,12 +232,17 @@ extern int osl_error(int bcmerror);
({ \ ({ \
__typeof(*(r)) __osl_v; \ __typeof(*(r)) __osl_v; \
switch (sizeof(*(r))) { \ switch (sizeof(*(r))) { \
case sizeof(uint8): __osl_v = \ case sizeof(uint8): \
readb((volatile uint8*)((uintptr)(r)^3)); break; \ __osl_v = \
case sizeof(uint16): __osl_v = \ readb((volatile uint8*)((uintptr)(r)^3)); \
readw((volatile uint16*)((uintptr)(r)^2)); break; \ break; \
case sizeof(uint32): __osl_v = \ case sizeof(uint16): \
readl((volatile uint32*)(r)); break; \ __osl_v = \
readw((volatile uint16*)((uintptr)(r)^2)); \
break; \
case sizeof(uint32): \
__osl_v = readl((volatile uint32*)(r)); \
break; \
} \ } \
__osl_v; \ __osl_v; \
}), \ }), \
...@@ -353,9 +362,15 @@ extern void *osl_pktdup(osl_t *osh, void *skb); ...@@ -353,9 +362,15 @@ extern void *osl_pktdup(osl_t *osh, void *skb);
) )
#define RPC_WRITE_REG(osh, r, v) do { \ #define RPC_WRITE_REG(osh, r, v) do { \
switch (sizeof(*(r))) { \ switch (sizeof(*(r))) { \
case sizeof(uint8): osl_writeb((osh), (volatile uint8*)(r), (uint8)(v)); break; \ case sizeof(uint8): \
case sizeof(uint16): osl_writew((osh), (volatile uint16*)(r), (uint16)(v)); break; \ osl_writeb((osh), (volatile uint8*)(r), (uint8)(v)); \
case sizeof(uint32): osl_writel((osh), (volatile uint32*)(r), (uint32)(v)); break; \ break; \
case sizeof(uint16): \
osl_writew((osh), (volatile uint16*)(r), (uint16)(v)); \
break; \
case sizeof(uint32): \
osl_writel((osh), (volatile uint32*)(r), (uint32)(v)); \
break; \
} \ } \
} while (0) } while (0)
......
...@@ -100,7 +100,8 @@ typedef irqreturn_t(*FN_ISR) (int irq, void *dev_id, struct pt_regs * ptregs); ...@@ -100,7 +100,8 @@ typedef irqreturn_t(*FN_ISR) (int irq, void *dev_id, struct pt_regs * ptregs);
struct pid *pid; \ struct pid *pid; \
pid = find_get_pid((pid_t)nr); \ pid = find_get_pid((pid_t)nr); \
tsk = pid_task(pid, PIDTYPE_PID); \ tsk = pid_task(pid, PIDTYPE_PID); \
if (tsk) send_sig(sig, tsk, 1); \ if (tsk) \
send_sig(sig, tsk, 1); \
} while (0) } while (0)
#define WL_DEV_IF(dev) ((wl_if_t*)netdev_priv(dev)) #define WL_DEV_IF(dev) ((wl_if_t*)netdev_priv(dev))
......
...@@ -162,7 +162,8 @@ char *phy_getvar(phy_info_t *pi, const char *name) ...@@ -162,7 +162,8 @@ char *phy_getvar(phy_info_t *pi, const char *name)
if ((bcmp(s, name, len) == 0) && (s[len] == '=')) if ((bcmp(s, name, len) == 0) && (s[len] == '='))
return &s[len + 1]; return &s[len + 1];
while (*s++) ; while (*s++)
;
} }
return nvram_get(name); return nvram_get(name);
......
...@@ -4385,7 +4385,8 @@ _wlc_ioctl(wlc_info_t *wlc, int cmd, void *arg, int len, struct wlc_if *wlcif) ...@@ -4385,7 +4385,8 @@ _wlc_ioctl(wlc_info_t *wlc, int cmd, void *arg, int len, struct wlc_if *wlcif)
/* validate the name value */ /* validate the name value */
name = (char *)arg; name = (char *)arg;
for (i = 0; i < (uint) len && *name != '\0'; for (i = 0; i < (uint) len && *name != '\0';
i++, name++) ; i++, name++)
;
if (i == (uint) len) { if (i == (uint) len) {
bcmerror = BCME_BUFTOOSHORT; bcmerror = BCME_BUFTOOSHORT;
......
...@@ -199,7 +199,8 @@ static uint16 ipxotp_read_bit(void *oh, chipcregs_t *cc, uint off) ...@@ -199,7 +199,8 @@ static uint16 ipxotp_read_bit(void *oh, chipcregs_t *cc, uint off)
for (k = 0; for (k = 0;
((st = R_REG(oi->osh, &cc->otpprog)) & OTPP_START_BUSY) ((st = R_REG(oi->osh, &cc->otpprog)) & OTPP_START_BUSY)
&& (k < OTPP_TRIES); k++) ; && (k < OTPP_TRIES); k++)
;
if (k >= OTPP_TRIES) { if (k >= OTPP_TRIES) {
return 0xffff; return 0xffff;
} }
...@@ -259,7 +260,8 @@ static void BCMNMIATTACHFN(_ipxotp_init) (otpinfo_t *oi, chipcregs_t *cc) ...@@ -259,7 +260,8 @@ static void BCMNMIATTACHFN(_ipxotp_init) (otpinfo_t *oi, chipcregs_t *cc)
W_REG(oi->osh, &cc->otpprog, otpp); W_REG(oi->osh, &cc->otpprog, otpp);
for (k = 0; for (k = 0;
((st = R_REG(oi->osh, &cc->otpprog)) & OTPP_START_BUSY) ((st = R_REG(oi->osh, &cc->otpprog)) & OTPP_START_BUSY)
&& (k < OTPP_TRIES); k++) ; && (k < OTPP_TRIES); k++)
;
if (k >= OTPP_TRIES) { if (k >= OTPP_TRIES) {
return; return;
} }
......
...@@ -137,7 +137,8 @@ static int BCMATTACHFN(varbuf_append) (varbuf_t *b, const char *fmt, ...) ...@@ -137,7 +137,8 @@ static int BCMATTACHFN(varbuf_append) (varbuf_t *b, const char *fmt, ...)
break; break;
} }
while (*s++) ; while (*s++)
;
} }
} }
......
...@@ -106,7 +106,8 @@ uint BCMFASTPATH pkttotlen(osl_t *osh, void *p) ...@@ -106,7 +106,8 @@ uint BCMFASTPATH pkttotlen(osl_t *osh, void *p)
/* return the last buffer of chained pkt */ /* return the last buffer of chained pkt */
void *pktlast(osl_t *osh, void *p) void *pktlast(osl_t *osh, void *p)
{ {
for (; PKTNEXT(p); p = PKTNEXT(p)) ; for (; PKTNEXT(p); p = PKTNEXT(p))
;
return p; return p;
} }
...@@ -286,7 +287,8 @@ bool BCMFASTPATH pktq_pdel(struct pktq *pq, void *pktbuf, int prec) ...@@ -286,7 +287,8 @@ bool BCMFASTPATH pktq_pdel(struct pktq *pq, void *pktbuf, int prec)
if (q->head == NULL) if (q->head == NULL)
q->tail = NULL; q->tail = NULL;
} else { } else {
for (p = q->head; p && PKTLINK(p) != pktbuf; p = PKTLINK(p)) ; for (p = q->head; p && PKTLINK(p) != pktbuf; p = PKTLINK(p))
;
if (p == NULL) if (p == NULL)
return FALSE; return FALSE;
...@@ -619,7 +621,8 @@ char *BCMROMFN(bcmstrcat) (char *dest, const char *src) ...@@ -619,7 +621,8 @@ char *BCMROMFN(bcmstrcat) (char *dest, const char *src)
p = dest + strlen(dest); p = dest + strlen(dest);
while ((*p++ = *src++) != '\0') ; while ((*p++ = *src++) != '\0')
;
return dest; return dest;
} }
...@@ -632,7 +635,8 @@ char *BCMROMFN(bcmstrncat) (char *dest, const char *src, uint size) ...@@ -632,7 +635,8 @@ char *BCMROMFN(bcmstrncat) (char *dest, const char *src, uint size)
p = dest + strlen(dest); p = dest + strlen(dest);
endp = p + size; endp = p + size;
while (p != endp && (*p++ = *src++) != '\0') ; while (p != endp && (*p++ = *src++) != '\0')
;
return dest; return dest;
} }
...@@ -841,7 +845,8 @@ char *getvar(char *vars, const char *name) ...@@ -841,7 +845,8 @@ char *getvar(char *vars, const char *name)
if ((bcmp(s, name, len) == 0) && (s[len] == '=')) if ((bcmp(s, name, len) == 0) && (s[len] == '='))
return &s[len + 1]; return &s[len + 1];
while (*s++) ; while (*s++)
;
} }
/* then query nvram */ /* then query nvram */
......
...@@ -135,7 +135,8 @@ static char *findvar(char *vars, char *lim, const char *name) ...@@ -135,7 +135,8 @@ static char *findvar(char *vars, char *lim, const char *name)
if ((bcmp(s, name, len) == 0) && (s[len] == '=')) if ((bcmp(s, name, len) == 0) && (s[len] == '='))
return &s[len + 1]; return &s[len + 1];
while (*s++) ; while (*s++)
;
} }
return NULL; return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment