Subject: Re: [PATCH 07/15] i40iw: add hw and utils files

From: Christoph Hellwig <[email-masked]>
Date: Thu, 17 Dec 2015 08:07:36 -0800

> +#ifndef UNREFERENCED_PARAMETER
> +#define UNREFERENCED_PARAMETER(_p)	\
> +{					\
> +	(_p) = (_p);			\
> +}
> +#endif

No need for this, just remove it.

> +#define I40E_MASK(mask, shift) (mask << shift)

Please just opencode the shit, this macro is silly.

> +#define i40iw_flush(a)          readl((a)->hw_addr + I40E_GLGEN_STAT)
> +
> +#define wr32(a, reg, value)     writel((value), (a)->hw_addr + (reg))
> +#define rd32(a, reg)            readl((a)->hw_addr + (reg))

Please urn these into inlines.

> +
> +#ifndef readq
> +static inline u64 rd64(u8 * __iomem addr)
> +{
> +	return ((u64)readl(addr)) | (((u64)readl(addr + 4UL)) << 32);
> +}
> +#else
> +#define rd64(a)            readq((a))
> +#endif

Please use the magic in <linux/io-64-nonatomic-lo-hi.h> instead.

> +
> +#define db_wr32(a, value)       writel((value), (a))

Pleas remove this pointless wrapper.

> +void SLEEP(u8 ms);

Please give this function a sensible name.

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email-masked]
More majordomo info at  http://vger.kernel.org/majordomo-info.html