From: Joe Perches <joe@perches.com>
To: Hariprasad Shenai <hariprasad@chelsio.com>
Cc: netdev@vger.kernel.org, linux-rdma@vger.kernel.org,
linux-scsi@vger.kernel.org, davem@davemloft.net,
roland@purestorage.com, JBottomley@parallels.com,
hch@infradead.org, swise@opengridcomputing.com,
leedom@chelsio.com, anish@chelsio.com, nirranjan@chelsio.com,
kumaras@chelsio.com, praveen@chelsio.com, varun@chelsio.com
Subject: Re: [PATCH net-next 1/5] RDMA/cxgb4: Cleanup Filter related macros/register defines
Date: Thu, 20 Nov 2014 23:55:54 -0800 [thread overview]
Message-ID: <1416556554.6651.35.camel@perches.com> (raw)
In-Reply-To: <1416554525-11844-2-git-send-email-hariprasad@chelsio.com>
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)
next prev parent reply other threads:[~2014-11-21 7:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-21 7:22 [PATCH net-next 0/5] RDMA/cxgb4,cxgb4vf,csiostor: Cleanup macros Hariprasad Shenai
2014-11-21 7:22 ` [PATCH net-next 1/5] RDMA/cxgb4: Cleanup Filter related macros/register defines Hariprasad Shenai
2014-11-21 7:55 ` Joe Perches [this message]
2014-11-21 20:16 ` Hariprasad S
2014-11-21 7:22 ` [PATCH net-next 2/5] RDMA/cxgb4/csiostor: Cleansup FW related macros/register defines for PF/VF and LDST Hariprasad Shenai
2014-11-21 7:22 ` [PATCH net-next 3/5] cxgb4/cxgb4vf/csiostor: Cleanup macros/register defines related to queues Hariprasad Shenai
2014-11-21 7:22 ` [PATCH net-next 4/5] cxgb4/cxgb4vf/csiostor: Cleanup macros/register defines related to port and VI Hariprasad Shenai
[not found] ` <1416554525-11844-1-git-send-email-hariprasad-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
2014-11-21 7:22 ` [PATCH net-next 5/5] RDMA/cxgb4/cxgb4vf/csiostor: Cleanup macros/register defines related to PCIE, RSS and FW Hariprasad Shenai
2014-11-22 21:58 ` [PATCH net-next 0/5] RDMA/cxgb4,cxgb4vf,csiostor: Cleanup macros David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1416556554.6651.35.camel@perches.com \
--to=joe@perches.com \
--cc=JBottomley@parallels.com \
--cc=anish@chelsio.com \
--cc=davem@davemloft.net \
--cc=hariprasad@chelsio.com \
--cc=hch@infradead.org \
--cc=kumaras@chelsio.com \
--cc=leedom@chelsio.com \
--cc=linux-rdma@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nirranjan@chelsio.com \
--cc=praveen@chelsio.com \
--cc=roland@purestorage.com \
--cc=swise@opengridcomputing.com \
--cc=varun@chelsio.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox