Commit aa5ac4be authored by Horatiu Vultur's avatar Horatiu Vultur Committed by David S. Miller

net: microchip: sparx5: kunit test: Fix compile warnings.

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: dccc30cc ("net: microchip: sparx5: Add KUNIT test of counters and sorted rules")
Fixes: c956b9b3 ("net: microchip: sparx5: Adding KUNIT tests of key/action values in VCAP API")
Fixes: 67d63751 ("net: microchip: sparx5: Adding KUNIT test for the VCAP API")
Signed-off-by: default avatarHoratiu Vultur <horatiu.vultur@microchip.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent dca508cd
...@@ -254,8 +254,8 @@ test_vcap_xn_rule_creator(struct kunit *test, int cid, enum vcap_user user, ...@@ -254,8 +254,8 @@ test_vcap_xn_rule_creator(struct kunit *test, int cid, enum vcap_user user,
u16 priority, u16 priority,
int id, int size, int expected_addr) int id, int size, int expected_addr)
{ {
struct vcap_rule *rule = 0; struct vcap_rule *rule;
struct vcap_rule_internal *ri = 0; struct vcap_rule_internal *ri;
enum vcap_keyfield_set keyset = VCAP_KFS_NO_VALUE; enum vcap_keyfield_set keyset = VCAP_KFS_NO_VALUE;
enum vcap_actionfield_set actionset = VCAP_AFS_NO_VALUE; enum vcap_actionfield_set actionset = VCAP_AFS_NO_VALUE;
int ret; int ret;
...@@ -339,7 +339,7 @@ static void vcap_api_set_bit_1_test(struct kunit *test) ...@@ -339,7 +339,7 @@ static void vcap_api_set_bit_1_test(struct kunit *test)
.sw_width = 52, .sw_width = 52,
.reg_idx = 1, .reg_idx = 1,
.reg_bitpos = 20, .reg_bitpos = 20,
.tg = 0 .tg = NULL,
}; };
u32 stream[2] = {0}; u32 stream[2] = {0};
...@@ -356,7 +356,7 @@ static void vcap_api_set_bit_0_test(struct kunit *test) ...@@ -356,7 +356,7 @@ static void vcap_api_set_bit_0_test(struct kunit *test)
.sw_width = 52, .sw_width = 52,
.reg_idx = 2, .reg_idx = 2,
.reg_bitpos = 11, .reg_bitpos = 11,
.tg = 0 .tg = NULL,
}; };
u32 stream[3] = {~0, ~0, ~0}; u32 stream[3] = {~0, ~0, ~0};
...@@ -1324,8 +1324,8 @@ static void vcap_api_encode_rule_test(struct kunit *test) ...@@ -1324,8 +1324,8 @@ static void vcap_api_encode_rule_test(struct kunit *test)
.actionstream = actdata, .actionstream = actdata,
}, },
}; };
struct vcap_rule *rule = 0; struct vcap_rule *rule;
struct vcap_rule_internal *ri = 0; struct vcap_rule_internal *ri;
int vcap_chain_id = 10005; int vcap_chain_id = 10005;
enum vcap_user user = VCAP_USER_VCAP_UTIL; enum vcap_user user = VCAP_USER_VCAP_UTIL;
u16 priority = 10; u16 priority = 10;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment