netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: microchip: sparx5: kunit test: change test_callbacks and test_vctrl to static
@ 2022-10-28  8:11 Yang Yingliang
  2022-10-28  8:33 ` Steen Hegelund
  2022-10-31 10:50 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Yang Yingliang @ 2022-10-28  8:11 UTC (permalink / raw)
  To: netdev; +Cc: Steen.Hegelund, davem

test_callbacks and test_vctrl are only used in vcap_api_kunit.c now,
change them to static.

Fixes: 67d637516fa9 ("net: microchip: sparx5: Adding KUNIT test for the VCAP API")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c b/drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c
index b01a6e5039b0..d142ed660338 100644
--- a/drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c
+++ b/drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c
@@ -204,7 +204,7 @@ static int vcap_test_port_info(struct net_device *ndev, enum vcap_type vtype,
 	return 0;
 }
 
-struct vcap_operations test_callbacks = {
+static struct vcap_operations test_callbacks = {
 	.validate_keyset = test_val_keyset,
 	.add_default_fields = test_add_def_fields,
 	.cache_erase = test_cache_erase,
@@ -216,7 +216,7 @@ struct vcap_operations test_callbacks = {
 	.port_info = vcap_test_port_info,
 };
 
-struct vcap_control test_vctrl = {
+static struct vcap_control test_vctrl = {
 	.vcaps = kunit_test_vcaps,
 	.stats = &kunit_test_vcap_stats,
 	.ops = &test_callbacks,
-- 
2.25.1


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

* Re: [PATCH net-next] net: microchip: sparx5: kunit test: change test_callbacks and test_vctrl to static
  2022-10-28  8:11 [PATCH net-next] net: microchip: sparx5: kunit test: change test_callbacks and test_vctrl to static Yang Yingliang
@ 2022-10-28  8:33 ` Steen Hegelund
  2022-10-31 10:50 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Steen Hegelund @ 2022-10-28  8:33 UTC (permalink / raw)
  To: Yang Yingliang, netdev; +Cc: davem

Hi Yang,

On Fri, 2022-10-28 at 16:11 +0800, Yang Yingliang wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> test_callbacks and test_vctrl are only used in vcap_api_kunit.c now,
> change them to static.

Correct, they should have been static.
> 
> Fixes: 67d637516fa9 ("net: microchip: sparx5: Adding KUNIT test for the VCAP API")
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> ---
>  drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c
> b/drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c
> index b01a6e5039b0..d142ed660338 100644
> --- a/drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c
> +++ b/drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c
> @@ -204,7 +204,7 @@ static int vcap_test_port_info(struct net_device *ndev, enum vcap_type vtype,
>         return 0;
>  }
> 
> -struct vcap_operations test_callbacks = {
> +static struct vcap_operations test_callbacks = {
>         .validate_keyset = test_val_keyset,
>         .add_default_fields = test_add_def_fields,
>         .cache_erase = test_cache_erase,
> @@ -216,7 +216,7 @@ struct vcap_operations test_callbacks = {
>         .port_info = vcap_test_port_info,
>  };
> 
> -struct vcap_control test_vctrl = {
> +static struct vcap_control test_vctrl = {
>         .vcaps = kunit_test_vcaps,
>         .stats = &kunit_test_vcap_stats,
>         .ops = &test_callbacks,
> --
> 2.25.1
> 
Thanks for providing this fix
BR
Steen

Reviewed-by: Steen Hegelund <Steen.Hegelund@microchip.com>



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

* Re: [PATCH net-next] net: microchip: sparx5: kunit test: change test_callbacks and test_vctrl to static
  2022-10-28  8:11 [PATCH net-next] net: microchip: sparx5: kunit test: change test_callbacks and test_vctrl to static Yang Yingliang
  2022-10-28  8:33 ` Steen Hegelund
@ 2022-10-31 10:50 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-10-31 10:50 UTC (permalink / raw)
  To: Yang Yingliang; +Cc: netdev, Steen.Hegelund, davem

Hello:

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

On Fri, 28 Oct 2022 16:11:06 +0800 you wrote:
> test_callbacks and test_vctrl are only used in vcap_api_kunit.c now,
> change them to static.
> 
> Fixes: 67d637516fa9 ("net: microchip: sparx5: Adding KUNIT test for the VCAP API")
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> ---
>  drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Here is the summary with links:
  - [net-next] net: microchip: sparx5: kunit test: change test_callbacks and test_vctrl to static
    https://git.kernel.org/netdev/net-next/c/e8572f038a52

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] 3+ messages in thread

end of thread, other threads:[~2022-10-31 10:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-28  8:11 [PATCH net-next] net: microchip: sparx5: kunit test: change test_callbacks and test_vctrl to static Yang Yingliang
2022-10-28  8:33 ` Steen Hegelund
2022-10-31 10:50 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).