Commit 36c63ff6 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Staging: brcm80211: remove ISALIGNED macro



And use the kernel provided IS_ALIGNED one instead.

Cc: Brett Rudley <brudley@broadcom.com>
Cc: Henry Ptasinski <henryp@broadcom.com>
Cc: Nohee Ko <noheek@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent d2733c97
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -883,7 +883,7 @@ uint pktsetprio(void *pkt, bool update_vtag)
	int rc = 0;
	int rc = 0;


	pktdata = (u8 *) PKTDATA(pkt);
	pktdata = (u8 *) PKTDATA(pkt);
	ASSERT(ISALIGNED((uintptr) pktdata, sizeof(u16)));
	ASSERT(IS_ALIGNED((uintptr) pktdata, sizeof(u16)));


	eh = (struct ether_header *)pktdata;
	eh = (struct ether_header *)pktdata;


+2 −2
Original line number Original line Diff line number Diff line
@@ -1087,7 +1087,7 @@ int dhd_bus_txdata(struct dhd_bus *bus, void *pkt)


	/* Add space for the header */
	/* Add space for the header */
	PKTPUSH(pkt, SDPCM_HDRLEN);
	PKTPUSH(pkt, SDPCM_HDRLEN);
	ASSERT(ISALIGNED((uintptr) PKTDATA(pkt), 2));
	ASSERT(IS_ALIGNED((uintptr) PKTDATA(pkt), 2));


	prec = PRIO2PREC((PKTPRIO(pkt) & PRIOMASK));
	prec = PRIO2PREC((PKTPRIO(pkt) & PRIOMASK));


@@ -1265,7 +1265,7 @@ int dhd_bus_txctl(struct dhd_bus *bus, unsigned char *msg, uint msglen)
	if (forcealign && (len & (ALIGNMENT - 1)))
	if (forcealign && (len & (ALIGNMENT - 1)))
		len = ROUNDUP(len, ALIGNMENT);
		len = ROUNDUP(len, ALIGNMENT);


	ASSERT(ISALIGNED((uintptr) frame, 2));
	ASSERT(IS_ALIGNED((uintptr) frame, 2));


	/* Need to lock here to protect txseq and SDIO tx calls */
	/* Need to lock here to protect txseq and SDIO tx calls */
	dhd_os_sdlock(bus->dhd);
	dhd_os_sdlock(bus->dhd);
+0 −1
Original line number Original line Diff line number Diff line
@@ -451,7 +451,6 @@ extern "C" {


#define CEIL(x, y)		(((x) + ((y)-1)) / (y))
#define CEIL(x, y)		(((x) + ((y)-1)) / (y))
#define	ROUNDUP(x, y)		((((x)+((y)-1))/(y))*(y))
#define	ROUNDUP(x, y)		((((x)+((y)-1))/(y))*(y))
#define	ISALIGNED(a, x)		(((a) & ((x)-1)) == 0)
#define	ISPOWEROF2(x)		((((x)-1)&(x)) == 0)
#define	ISPOWEROF2(x)		((((x)-1)&(x)) == 0)
#define VALID_MASK(mask)	(!((mask) & ((mask) + 1)))
#define VALID_MASK(mask)	(!((mask) & ((mask) + 1)))


+2 −2
Original line number Original line Diff line number Diff line
@@ -268,8 +268,8 @@ typedef struct si_info {
#define	SI_INFO(sih)	(si_info_t *)(uintptr)sih
#define	SI_INFO(sih)	(si_info_t *)(uintptr)sih


#define	GOODCOREADDR(x, b) (((x) >= (b)) && ((x) < ((b) + SI_MAXCORES * SI_CORE_SIZE)) && \
#define	GOODCOREADDR(x, b) (((x) >= (b)) && ((x) < ((b) + SI_MAXCORES * SI_CORE_SIZE)) && \
		ISALIGNED((x), SI_CORE_SIZE))
		IS_ALIGNED((x), SI_CORE_SIZE))
#define	GOODREGS(regs)	((regs) != NULL && ISALIGNED((uintptr)(regs), SI_CORE_SIZE))
#define	GOODREGS(regs)	((regs) != NULL && IS_ALIGNED((uintptr)(regs), SI_CORE_SIZE))
#define BADCOREADDR	0
#define BADCOREADDR	0
#define	GOODIDX(idx)	(((uint)idx) < SI_MAXCORES)
#define	GOODIDX(idx)	(((uint)idx) < SI_MAXCORES)
#define	NOREV		-1	/* Invalid rev */
#define	NOREV		-1	/* Invalid rev */
+3 −3
Original line number Original line Diff line number Diff line
@@ -1789,8 +1789,8 @@ wlc_bmac_write_template_ram(wlc_hw_info_t *wlc_hw, int offset, int len,
	regs = wlc_hw->regs;
	regs = wlc_hw->regs;
	osh = wlc_hw->osh;
	osh = wlc_hw->osh;


	ASSERT(ISALIGNED(offset, sizeof(u32)));
	ASSERT(IS_ALIGNED(offset, sizeof(u32)));
	ASSERT(ISALIGNED(len, sizeof(u32)));
	ASSERT(IS_ALIGNED(len, sizeof(u32)));
	ASSERT((offset & ~0xffff) == 0);
	ASSERT((offset & ~0xffff) == 0);


	W_REG(osh, &regs->tplatewrptr, offset);
	W_REG(osh, &regs->tplatewrptr, offset);
@@ -2824,7 +2824,7 @@ BCMATTACHFN(wlc_ucode_write) (wlc_hw_info_t *wlc_hw, const u32 ucode[],


	WL_TRACE(("wl%d: wlc_ucode_write\n", wlc_hw->unit));
	WL_TRACE(("wl%d: wlc_ucode_write\n", wlc_hw->unit));


	ASSERT(ISALIGNED(nbytes, sizeof(u32)));
	ASSERT(IS_ALIGNED(nbytes, sizeof(u32)));


	count = (nbytes / sizeof(u32));
	count = (nbytes / sizeof(u32));


Loading