--- On Tue, 2/5/08, Ke Wei <[EMAIL PROTECTED]> 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
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html