diff mbox series

[linux-next,v3,1/6] vdpa_sim_net: Make mac address array static

Message ID 20210105103203.82508-2-parav@nvidia.com
State New
Headers show
Series Introduce vdpa management tool | expand

Commit Message

Parav Pandit Jan. 5, 2021, 10:31 a.m. UTC
MAC address array is used only in vdpa_sim_net.c.
Hence, keep it static.

Signed-off-by: Parav Pandit <parav@nvidia.com>
Acked-by: Jason Wang <jasowang@redhat.com>
---
Changelog:
v1->v2:
 - new patch
---
 drivers/vdpa/vdpa_sim/vdpa_sim_net.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stefano Garzarella Jan. 7, 2021, 1:45 p.m. UTC | #1
On Tue, Jan 05, 2021 at 12:31:58PM +0200, Parav Pandit wrote:
>MAC address array is used only in vdpa_sim_net.c.

>Hence, keep it static.

>

>Signed-off-by: Parav Pandit <parav@nvidia.com>

>Acked-by: Jason Wang <jasowang@redhat.com>

>---

>Changelog:

>v1->v2:

> - new patch

>---

> drivers/vdpa/vdpa_sim/vdpa_sim_net.c | 2 +-

> 1 file changed, 1 insertion(+), 1 deletion(-)


Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>


>

>diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim_net.c b/drivers/vdpa/vdpa_sim/vdpa_sim_net.c

>index c10b6981fdab..f0482427186b 100644

>--- a/drivers/vdpa/vdpa_sim/vdpa_sim_net.c

>+++ b/drivers/vdpa/vdpa_sim/vdpa_sim_net.c

>@@ -33,7 +33,7 @@ static char *macaddr;

> module_param(macaddr, charp, 0);

> MODULE_PARM_DESC(macaddr, "Ethernet MAC address");

>

>-u8 macaddr_buf[ETH_ALEN];

>+static u8 macaddr_buf[ETH_ALEN];

>

> static struct vdpasim *vdpasim_net_dev;

>

>-- 

>2.26.2

>

>_______________________________________________

>Virtualization mailing list

>Virtualization@lists.linux-foundation.org

>https://lists.linuxfoundation.org/mailman/listinfo/virtualization

>
diff mbox series

Patch

diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim_net.c b/drivers/vdpa/vdpa_sim/vdpa_sim_net.c
index c10b6981fdab..f0482427186b 100644
--- a/drivers/vdpa/vdpa_sim/vdpa_sim_net.c
+++ b/drivers/vdpa/vdpa_sim/vdpa_sim_net.c
@@ -33,7 +33,7 @@  static char *macaddr;
 module_param(macaddr, charp, 0);
 MODULE_PARM_DESC(macaddr, "Ethernet MAC address");
 
-u8 macaddr_buf[ETH_ALEN];
+static u8 macaddr_buf[ETH_ALEN];
 
 static struct vdpasim *vdpasim_net_dev;