__typeof(*(r)) __osl_v; \
__asm__ __volatile__("sync"); \
switch (sizeof(*(r))) { \
- case sizeof(uint8): __osl_v = \
- readb((volatile uint8*)(r)); break; \
- case sizeof(uint16): __osl_v = \
- readw((volatile uint16*)(r)); break; \
- case sizeof(uint32): __osl_v = \
- readl((volatile uint32*)(r)); break; \
+ case sizeof(uint8): \
+ __osl_v = readb((volatile uint8*)(r)); \
+ break; \
+ case sizeof(uint16): \
+ __osl_v = readw((volatile uint16*)(r)); \
+ break; \
+ case sizeof(uint32): \
+ __osl_v = \
+ readl((volatile uint32*)(r)); \
+ break; \
} \
__asm__ __volatile__("sync"); \
__osl_v; \
({ \
__typeof(*(r)) __osl_v; \
switch (sizeof(*(r))) { \
- case sizeof(uint8): __osl_v = \
- readb((volatile uint8*)((uintptr)(r)^3)); break; \
- case sizeof(uint16): __osl_v = \
- readw((volatile uint16*)((uintptr)(r)^2)); break; \
- case sizeof(uint32): __osl_v = \
- readl((volatile uint32*)(r)); break; \
+ case sizeof(uint8): \
+ __osl_v = \
+ readb((volatile uint8*)((uintptr)(r)^3)); \
+ break; \
+ case sizeof(uint16): \
+ __osl_v = \
+ readw((volatile uint16*)((uintptr)(r)^2)); \
+ break; \
+ case sizeof(uint32): \
+ __osl_v = readl((volatile uint32*)(r)); \
+ break; \
} \
__osl_v; \
}), \
)
#define RPC_WRITE_REG(osh, r, v) do { \
switch (sizeof(*(r))) { \
- case sizeof(uint8): osl_writeb((osh), (volatile uint8*)(r), (uint8)(v)); 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; \
+ case sizeof(uint8): \
+ osl_writeb((osh), (volatile uint8*)(r), (uint8)(v)); \
+ 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)
for (k = 0;
((st = R_REG(oi->osh, &cc->otpprog)) & OTPP_START_BUSY)
- && (k < OTPP_TRIES); k++) ;
+ && (k < OTPP_TRIES); k++)
+ ;
if (k >= OTPP_TRIES) {
return 0xffff;
}
W_REG(oi->osh, &cc->otpprog, otpp);
for (k = 0;
((st = R_REG(oi->osh, &cc->otpprog)) & OTPP_START_BUSY)
- && (k < OTPP_TRIES); k++) ;
+ && (k < OTPP_TRIES); k++)
+ ;
if (k >= OTPP_TRIES) {
return;
}
/* return the last buffer of chained pkt */
void *pktlast(osl_t *osh, void *p)
{
- for (; PKTNEXT(p); p = PKTNEXT(p)) ;
+ for (; PKTNEXT(p); p = PKTNEXT(p))
+ ;
return p;
}
if (q->head == NULL)
q->tail = NULL;
} 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)
return FALSE;
p = dest + strlen(dest);
- while ((*p++ = *src++) != '\0') ;
+ while ((*p++ = *src++) != '\0')
+ ;
return dest;
}
p = dest + strlen(dest);
endp = p + size;
- while (p != endp && (*p++ = *src++) != '\0') ;
+ while (p != endp && (*p++ = *src++) != '\0')
+ ;
return dest;
}
if ((bcmp(s, name, len) == 0) && (s[len] == '='))
return &s[len + 1];
- while (*s++) ;
+ while (*s++)
+ ;
}
/* then query nvram */