Message ID | 20210624041316.567622-8-sukadev@linux.ibm.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 154b3b2a6ffca445379063ef49f71895104d5a5e |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | ibmvnic: Assorted bug fixes | expand |
On Wed, Jun 23, 2021 at 11:17 PM Sukadev Bhattiprolu <sukadev@linux.ibm.com> wrote: > > Parenthesize a check to be more explicit and to fix a sparse warning > seen on some distros. > > Fixes: 91dc5d2553fbf ("ibmvnic: fix miscellaneous checks") > Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.ibm.com> > --- > drivers/net/ethernet/ibm/ibmvnic.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c > index 363a5d5503ad..697b9714fc76 100644 > --- a/drivers/net/ethernet/ibm/ibmvnic.c > +++ b/drivers/net/ethernet/ibm/ibmvnic.c > @@ -3367,7 +3367,7 @@ static int enable_scrq_irq(struct ibmvnic_adapter *adapter, > /* H_EOI would fail with rc = H_FUNCTION when running > * in XIVE mode which is expected, but not an error. > */ > - if (rc && rc != H_FUNCTION) > + if (rc && (rc != H_FUNCTION)) It is unnecessary and this is not an issue with the latest sparse. Just curious what was the version on that distro?
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index 363a5d5503ad..697b9714fc76 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -3367,7 +3367,7 @@ static int enable_scrq_irq(struct ibmvnic_adapter *adapter, /* H_EOI would fail with rc = H_FUNCTION when running * in XIVE mode which is expected, but not an error. */ - if (rc && rc != H_FUNCTION) + if (rc && (rc != H_FUNCTION)) dev_err(dev, "H_EOI FAILED irq 0x%llx. rc=%ld\n", val, rc); }
Parenthesize a check to be more explicit and to fix a sparse warning seen on some distros. Fixes: 91dc5d2553fbf ("ibmvnic: fix miscellaneous checks") Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.ibm.com> --- drivers/net/ethernet/ibm/ibmvnic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)