From: Luben Tuikov <ltuikov@yahoo.com>
To: James Bottomley <James.Bottomley@HansenPartnership.com>,
Ke Wei <kewei.mv@gmail.com>
Cc: linux-scsi@vger.kernel.org, jeff@garzik.org, qswang@marvell.com,
jfeng@marvell.com, qzhao@marvell.com, kewei@marvell.com
Subject: Re: [PATCH] Marvell 6440 SAS/SATA driver
Date: Tue, 5 Feb 2008 13:00:02 -0800 (PST) [thread overview]
Message-ID: <57069.55058.qm@web31801.mail.mud.yahoo.com> (raw)
In-Reply-To: <20080205131920.GA7901@ubuntu.domain>
--- On Tue, 2/5/08, Ke Wei <kewei.mv@gmail.com> wrote:
> + for_each_phy(port->wide_port_phymap, no, j, mvi->chip->n_phy) {
> + mvs_write_port_cfg_addr(mvi, no, PHYR_WIDE_PORT);
> + mvs_write_port_cfg_data(mvi, no , port->wide_port_phymap);
> + } else {
> + mvs_write_port_cfg_addr(mvi, no, PHYR_WIDE_PORT);
> + mvs_write_port_cfg_data(mvi, no , 0);
> + }
> +}
Don't do this. Make the "if" explicit.
Since I can see you've taken this verbatim from the SAS code,
if "no" means number, then it is "j". "no" is just a temporary
register which gets shifted right each iteration and not of
much use outside the macro.
Also if "__rest" (which you added to the macro) is 0, then nether
statement would execute, which is probably not what you want.
If "n_phy" means "number of phys", then its usage that you added
into the macro is inconsistent. Furthermore it shouldn't be
necessary since wide_port_phymap & ~((2^n_phy)-1) must never be true.
Luben
next prev parent reply other threads:[~2008-02-05 21:00 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20080122151857.GA8680@ubuntu.domain>
2008-01-22 15:24 ` [PATCH] Marvell 6440 SAS/SATA driver Ke Wei
2008-01-23 3:58 ` Jeff Garzik
2008-01-23 10:54 ` Ke Wei
2008-01-23 11:41 ` Jeff Garzik
2008-01-25 16:43 ` Ke Wei
2008-01-25 17:24 ` Grant Grundler
2008-01-25 17:38 ` James Bottomley
2008-01-25 22:12 ` Jeff Garzik
2008-01-25 17:38 ` Grant Grundler
2008-01-25 22:39 ` James Bottomley
2008-01-27 15:10 ` Ke Wei
2008-01-27 15:27 ` Ke Wei
2008-01-27 18:13 ` James Bottomley
2008-02-05 13:19 ` Ke Wei
2008-02-05 21:00 ` Luben Tuikov [this message]
2008-02-07 0:33 ` Jeff Garzik
2008-01-25 23:00 ` James Bottomley
2008-01-25 23:05 ` Jeff Garzik
2008-01-25 21:27 ` James Bottomley
2008-01-23 19:23 ` Grant Grundler
[not found] <FE3F06125A99254E8D92161AA4569C6F02310B1A@sc-exch02.marvell.com>
2008-02-22 16:26 ` Jeff Garzik
2008-02-22 16:38 ` James Bottomley
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=57069.55058.qm@web31801.mail.mud.yahoo.com \
--to=ltuikov@yahoo.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=jeff@garzik.org \
--cc=jfeng@marvell.com \
--cc=kewei.mv@gmail.com \
--cc=kewei@marvell.com \
--cc=linux-scsi@vger.kernel.org \
--cc=qswang@marvell.com \
--cc=qzhao@marvell.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 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.