All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] net: microchip: sparx5: kunit test: Fix compile warnings.
@ 2022-11-17 13:28 ` Horatiu Vultur
  0 siblings, 0 replies; 4+ messages in thread
From: Horatiu Vultur @ 2022-11-17 13:28 UTC (permalink / raw)
  To: linux-arm-kernel, netdev, linux-kernel
  Cc: Steen.Hegelund, lars.povlsen, daniel.machon, davem, edumazet,
	kuba, pabeni, UNGLinuxDriver, Horatiu Vultur

When VCAP_KUNIT_TEST is enabled the following warnings are generated:

drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c:257:34: warning: Using plain integer as NULL pointer
drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c:258:41: warning: Using plain integer as NULL pointer
drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c:342:23: warning: Using plain integer as NULL pointer
drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c:359:23: warning: Using plain integer as NULL pointer
drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c:1327:34: warning: Using plain integer as NULL pointer
drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c:1328:41: warning: Using plain integer as NULL pointer

Therefore fix this.

Fixes: dccc30cc4906 ("net: microchip: sparx5: Add KUNIT test of counters and sorted rules")
Fixes: c956b9b318d9 ("net: microchip: sparx5: Adding KUNIT tests of key/action values in VCAP API")
Fixes: 67d637516fa9 ("net: microchip: sparx5: Adding KUNIT test for the VCAP API")
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
---
 drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c b/drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c
index 6858e44ce4a55..194734cadf8b4 100644
--- a/drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c
+++ b/drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c
@@ -254,8 +254,8 @@ test_vcap_xn_rule_creator(struct kunit *test, int cid, enum vcap_user user,
 			  u16 priority,
 			  int id, int size, int expected_addr)
 {
-	struct vcap_rule *rule = 0;
-	struct vcap_rule_internal *ri = 0;
+	struct vcap_rule *rule;
+	struct vcap_rule_internal *ri;
 	enum vcap_keyfield_set keyset = VCAP_KFS_NO_VALUE;
 	enum vcap_actionfield_set actionset = VCAP_AFS_NO_VALUE;
 	int ret;
@@ -339,7 +339,7 @@ static void vcap_api_set_bit_1_test(struct kunit *test)
 		.sw_width = 52,
 		.reg_idx = 1,
 		.reg_bitpos = 20,
-		.tg = 0
+		.tg = NULL,
 	};
 	u32 stream[2] = {0};
 
@@ -356,7 +356,7 @@ static void vcap_api_set_bit_0_test(struct kunit *test)
 		.sw_width = 52,
 		.reg_idx = 2,
 		.reg_bitpos = 11,
-		.tg = 0
+		.tg = NULL,
 	};
 	u32 stream[3] = {~0, ~0, ~0};
 
@@ -1324,8 +1324,8 @@ static void vcap_api_encode_rule_test(struct kunit *test)
 			.actionstream = actdata,
 		},
 	};
-	struct vcap_rule *rule = 0;
-	struct vcap_rule_internal *ri = 0;
+	struct vcap_rule *rule;
+	struct vcap_rule_internal *ri;
 	int vcap_chain_id = 10005;
 	enum vcap_user user = VCAP_USER_VCAP_UTIL;
 	u16 priority = 10;
-- 
2.38.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH net-next] net: microchip: sparx5: kunit test: Fix compile warnings.
@ 2022-11-17 13:28 ` Horatiu Vultur
  0 siblings, 0 replies; 4+ messages in thread
From: Horatiu Vultur @ 2022-11-17 13:28 UTC (permalink / raw)
  To: linux-arm-kernel, netdev, linux-kernel
  Cc: Steen.Hegelund, lars.povlsen, daniel.machon, davem, edumazet,
	kuba, pabeni, UNGLinuxDriver, Horatiu Vultur

When VCAP_KUNIT_TEST is enabled the following warnings are generated:

drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c:257:34: warning: Using plain integer as NULL pointer
drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c:258:41: warning: Using plain integer as NULL pointer
drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c:342:23: warning: Using plain integer as NULL pointer
drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c:359:23: warning: Using plain integer as NULL pointer
drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c:1327:34: warning: Using plain integer as NULL pointer
drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c:1328:41: warning: Using plain integer as NULL pointer

Therefore fix this.

Fixes: dccc30cc4906 ("net: microchip: sparx5: Add KUNIT test of counters and sorted rules")
Fixes: c956b9b318d9 ("net: microchip: sparx5: Adding KUNIT tests of key/action values in VCAP API")
Fixes: 67d637516fa9 ("net: microchip: sparx5: Adding KUNIT test for the VCAP API")
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
---
 drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c b/drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c
index 6858e44ce4a55..194734cadf8b4 100644
--- a/drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c
+++ b/drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c
@@ -254,8 +254,8 @@ test_vcap_xn_rule_creator(struct kunit *test, int cid, enum vcap_user user,
 			  u16 priority,
 			  int id, int size, int expected_addr)
 {
-	struct vcap_rule *rule = 0;
-	struct vcap_rule_internal *ri = 0;
+	struct vcap_rule *rule;
+	struct vcap_rule_internal *ri;
 	enum vcap_keyfield_set keyset = VCAP_KFS_NO_VALUE;
 	enum vcap_actionfield_set actionset = VCAP_AFS_NO_VALUE;
 	int ret;
@@ -339,7 +339,7 @@ static void vcap_api_set_bit_1_test(struct kunit *test)
 		.sw_width = 52,
 		.reg_idx = 1,
 		.reg_bitpos = 20,
-		.tg = 0
+		.tg = NULL,
 	};
 	u32 stream[2] = {0};
 
@@ -356,7 +356,7 @@ static void vcap_api_set_bit_0_test(struct kunit *test)
 		.sw_width = 52,
 		.reg_idx = 2,
 		.reg_bitpos = 11,
-		.tg = 0
+		.tg = NULL,
 	};
 	u32 stream[3] = {~0, ~0, ~0};
 
@@ -1324,8 +1324,8 @@ static void vcap_api_encode_rule_test(struct kunit *test)
 			.actionstream = actdata,
 		},
 	};
-	struct vcap_rule *rule = 0;
-	struct vcap_rule_internal *ri = 0;
+	struct vcap_rule *rule;
+	struct vcap_rule_internal *ri;
 	int vcap_chain_id = 10005;
 	enum vcap_user user = VCAP_USER_VCAP_UTIL;
 	u16 priority = 10;
-- 
2.38.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] net: microchip: sparx5: kunit test: Fix compile warnings.
  2022-11-17 13:28 ` Horatiu Vultur
@ 2022-11-21  9:50   ` patchwork-bot+netdevbpf
  -1 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-11-21  9:50 UTC (permalink / raw)
  To: Horatiu Vultur
  Cc: linux-arm-kernel, netdev, linux-kernel, Steen.Hegelund,
	lars.povlsen, daniel.machon, davem, edumazet, kuba, pabeni,
	UNGLinuxDriver

Hello:

This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:

On Thu, 17 Nov 2022 14:28:12 +0100 you wrote:
> When VCAP_KUNIT_TEST is enabled the following warnings are generated:
> 
> drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c:257:34: warning: Using plain integer as NULL pointer
> drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c:258:41: warning: Using plain integer as NULL pointer
> drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c:342:23: warning: Using plain integer as NULL pointer
> drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c:359:23: warning: Using plain integer as NULL pointer
> drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c:1327:34: warning: Using plain integer as NULL pointer
> drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c:1328:41: warning: Using plain integer as NULL pointer
> 
> [...]

Here is the summary with links:
  - [net-next] net: microchip: sparx5: kunit test: Fix compile warnings.
    https://git.kernel.org/netdev/net-next/c/aa5ac4be8da1

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] net: microchip: sparx5: kunit test: Fix compile warnings.
@ 2022-11-21  9:50   ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-11-21  9:50 UTC (permalink / raw)
  To: Horatiu Vultur
  Cc: linux-arm-kernel, netdev, linux-kernel, Steen.Hegelund,
	lars.povlsen, daniel.machon, davem, edumazet, kuba, pabeni,
	UNGLinuxDriver

Hello:

This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:

On Thu, 17 Nov 2022 14:28:12 +0100 you wrote:
> When VCAP_KUNIT_TEST is enabled the following warnings are generated:
> 
> drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c:257:34: warning: Using plain integer as NULL pointer
> drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c:258:41: warning: Using plain integer as NULL pointer
> drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c:342:23: warning: Using plain integer as NULL pointer
> drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c:359:23: warning: Using plain integer as NULL pointer
> drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c:1327:34: warning: Using plain integer as NULL pointer
> drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c:1328:41: warning: Using plain integer as NULL pointer
> 
> [...]

Here is the summary with links:
  - [net-next] net: microchip: sparx5: kunit test: Fix compile warnings.
    https://git.kernel.org/netdev/net-next/c/aa5ac4be8da1

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-11-21  9:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-17 13:28 [PATCH net-next] net: microchip: sparx5: kunit test: Fix compile warnings Horatiu Vultur
2022-11-17 13:28 ` Horatiu Vultur
2022-11-21  9:50 ` patchwork-bot+netdevbpf
2022-11-21  9:50   ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.