diff mbox series

[net,7/7] ibmvnic: parenthesize a check

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

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Clearly marked for net
netdev/subject_prefix success Link
netdev/cc_maintainers fail 3 blamed authors not CCed: saeedm@nvidia.com davem@davemloft.net lijunp213@gmail.com; 9 maintainers not CCed: tlfalcon@linux.ibm.com saeedm@nvidia.com paulus@samba.org benh@kernel.crashing.org linuxppc-dev@lists.ozlabs.org mpe@ellerman.id.au davem@davemloft.net lijunp213@gmail.com kuba@kernel.org
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/kdoc success Errors and warnings before: 3 this patch: 3
netdev/verify_fixes success Link
netdev/checkpatch warning CHECK: Unnecessary parentheses around 'rc != H_FUNCTION'
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/header_inline success Link

Commit Message

Sukadev Bhattiprolu June 24, 2021, 4:13 a.m. UTC
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(-)

Comments

Lijun Pan June 24, 2021, 5:50 a.m. UTC | #1
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 mbox series

Patch

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);
 	}