On Tue, Jul 16, 2019 at 6:41 PM Logan Gunthorpe <logang@xxxxxxxxxxxx> wrote: > > > > On 2019-07-16 11:34 a.m., Alexander Fomichev wrote: > > On switchtec_ntb_mw_set_trans() call, when (only) address == 0, it acts as > > ntb_mw_clear_trans(). Fix this, since address == 0 and size != 0 is valid > > combination for setting translation. > > > > Signed-off-by: Alexander Fomichev <fomichev.ru@xxxxxxxxx> > > Looks good, thanks. > > Reviewed-by: Logan Gunthorpe <logang@xxxxxxxxxxxx> Applied to ntb-next, thanks > > > --- > > drivers/ntb/hw/mscc/ntb_hw_switchtec.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/ntb/hw/mscc/ntb_hw_switchtec.c b/drivers/ntb/hw/mscc/ntb_hw_switchtec.c > > index db49677..45b9513 100644 > > --- a/drivers/ntb/hw/mscc/ntb_hw_switchtec.c > > +++ b/drivers/ntb/hw/mscc/ntb_hw_switchtec.c > > @@ -305,7 +305,7 @@ static int switchtec_ntb_mw_set_trans(struct ntb_dev *ntb, int pidx, int widx, > > if (rc) > > return rc; > > > > - if (addr == 0 || size == 0) { > > + if (size == 0) { > > if (widx < nr_direct_mw) > > switchtec_ntb_mw_clr_direct(sndev, widx); > > else > >