On Fri, 2014-11-21 at 12:52 +0530, Hariprasad Shenai wrote:
> This patch cleanups all filter related macros/register defines that are 
> defined
> in t4fw_api.h and the affected files.

Is there any real value in the FW_FILTER_WR_ prefix?
Does it need to be so long?

Perhaps it'd be nicer to read if
_S was _SHIFT
_M was _MASK
_V was whatever it's supposed to represent (_SET?)
and
_G was _GET

> +#define FW_FILTER_WR_TID_S      12
> +#define FW_FILTER_WR_TID_M      0xfffff
> +#define FW_FILTER_WR_TID_V(x)   ((x) << FW_FILTER_WR_TID_S)
> +#define FW_FILTER_WR_TID_G(x)   \
> +     (((x) >> FW_FILTER_WR_TID_S) & FW_FILTER_WR_TID_M)

Why aren't the _V defines masked then shifted?

#define FW_FILTER_WR_<foo>_V(x)                         \
        (((x) & FW_FILTER_<foo>_M) << FW_FILTER_<foo>_S)


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

Reply via email to