net/bnxt: remove redundant null check in bnxt_validate_and_parse_flow_type
diff mbox series

Message ID 20200806035213.22538-1-gaurav1086@gmail.com
State Accepted
Delegated to: Ajit Khaparde
Headers show
Series
  • net/bnxt: remove redundant null check in bnxt_validate_and_parse_flow_type
Related show

Checks

Context Check Description
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Gaurav Singh Aug. 6, 2020, 3:52 a.m. UTC
vxlan_spec cannot be NULL since its already being accessed
before. Remove the redundant NULL check.

Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>
---
 drivers/net/bnxt/bnxt_flow.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ajit Khaparde Sept. 2, 2020, 4:03 a.m. UTC | #1
On Wed, Aug 5, 2020 at 8:52 PM Gaurav Singh <gaurav1086@gmail.com> wrote:

> vxlan_spec cannot be NULL since its already being accessed
> before. Remove the redundant NULL check.
>
> Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>
>
Patch applied to dpdk-next-net-brcm. Thanks


> ---
>  drivers/net/bnxt/bnxt_flow.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
> index 320b53d94..c1c59bbe5 100644
> --- a/drivers/net/bnxt/bnxt_flow.c
> +++ b/drivers/net/bnxt/bnxt_flow.c
> @@ -554,7 +554,7 @@ bnxt_validate_and_parse_flow_type(struct bnxt *bp,
>                         }
>
>                         /* Check if VNI is masked. */
> -                       if (vxlan_spec && vxlan_mask) {
> +                       if (vxlan_mask != NULL) {
>                                 vni_masked =
>                                         !!memcmp(vxlan_mask->vni, vni_mask,
>                                                  RTE_DIM(vni_mask));
> --
> 2.17.1
>
>

Patch
diff mbox series

diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
index 320b53d94..c1c59bbe5 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
@@ -554,7 +554,7 @@  bnxt_validate_and_parse_flow_type(struct bnxt *bp,
 			}
 
 			/* Check if VNI is masked. */
-			if (vxlan_spec && vxlan_mask) {
+			if (vxlan_mask != NULL) {
 				vni_masked =
 					!!memcmp(vxlan_mask->vni, vni_mask,
 						 RTE_DIM(vni_mask));