From: Dan Carpenter <dan.carpenter@oracle.com>
To: ira.weiny@intel.com
Cc: devel@driverdev.osuosl.org, gregkh@linuxfoundation.org,
dledford@redhat.com, Dean Luick <dean.luick@intel.com>,
linux-rdma@vger.kernel.org
Subject: Re: [PATCH v2] staging/rdma/hfi1: set Gen3 half-swing for integrated devices
Date: Tue, 10 Nov 2015 12:59:29 +0300 [thread overview]
Message-ID: <20151110095929.GW18797@mwanda> (raw)
In-Reply-To: <1447112288-28327-1-git-send-email-ira.weiny@intel.com>
Gar... No. Please please get rid of the PC() macro. It makes the code
impossible to understand because instead of hitting CTRL-[ you have
decode it and then manually type out
:cs find g CCE_PCIE_CTRL_XMT_MARGIN_GEN1_GEN2_OVERWRITE_ENABLE_SHIFT
which is the length of a typical college essay. I meant just put a
comment like this:
/*
* In the hardware spec these are prefixed with:
* CCE_PCIE_CTRL_...
* But it is too long to use in code.
*/
#define XMT_MARGIN_GEN1_GEN2_OVERWRITE_ENABLE_MASK 0x1ull
Or probably even better:
#define CCE_PCIE_CTRL (CCE + 0x0000000000C0)
#define LANE_BUNDLE_MASK 0x3ull /* CCE_PCIE_CTRL_PCIE_LANE_BUNDLE_MASK */
#define LANE_BUNDLE_SHIFT 0 /* CCE_PCIE_CTRL_PCIE_LANE_BUNDLE_SHIFT */
#define LANE_DELAY_MASK 0xFull /* CCE_PCIE_CTRL_PCIE_LANE_DELAY_MASK */
#define LANE_DELAY_SHIFT 2 /* CCE_PCIE_CTRL_PCIE_LANE_DELAY_SHIFT */
#define MARGIN_OVERWRITE_SHIFT 8 /* CCE_PCIE_CTRL_XMT_MARGIN_OVERWRITE_ENABLE_SHIFT */
#define MARGIN_SHIFT 9 /* CCE_PCIE_CTRL_XMT_MARGIN_SHIFT */
#define MARGIN_G1G2_OVERWRITE_MASK 0x1ull /* CCE_PCIE_CTRL_XMT_MARGIN_GEN1_GEN2_OVERWRITE_ENABLE_MASK */
#define MARGIN_G1G2_OVERWRITE_SHIFT 12 /* CCE_PCIE_CTRL_XMT_MARGIN_GEN1_GEN2_OVERWRITE_ENABLE_SHIFT */
#define MARGIN_G1G2_MASK 0x7ull /* CCE_PCIE_CTRL_XMT_MARGIN_GEN1_GEN2_MASK */
#define MARGIN_G1G2_SHIFT 13 /* CCE_PCIE_CTRL_XMT_MARGIN_GEN1_GEN2_SHIFT */
Those lines go over the 80 character limit but it's fine.
regards,
dan carpenter
next prev parent reply other threads:[~2015-11-10 9:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-09 23:38 [PATCH v2] staging/rdma/hfi1: set Gen3 half-swing for integrated devices ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2015-11-10 9:59 ` Dan Carpenter [this message]
2015-11-10 23:51 ` ira.weiny
2015-11-11 7:37 ` Dan Carpenter
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=20151110095929.GW18797@mwanda \
--to=dan.carpenter@oracle.com \
--cc=dean.luick@intel.com \
--cc=devel@driverdev.osuosl.org \
--cc=dledford@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=ira.weiny@intel.com \
--cc=linux-rdma@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.