diff mbox series

[1/2] um: Don't overwrite ethtool driver version

Message ID 20200220084014.238768-2-leon@kernel.org
State Accepted
Headers show
Series Remove dead code and driver version | expand

Commit Message

Leon Romanovsky Feb. 20, 2020, 8:40 a.m. UTC
From: Leon Romanovsky <leonro@mellanox.com>


In-tree drivers don't need to manage internal version because
they are aligned to the global Linux kernel version, which is
reported by default with "ethtool -i".

Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
 arch/um/drivers/net_kern.c    | 1 -
 arch/um/drivers/vector_kern.c | 2 --
 2 files changed, 3 deletions(-)

--
2.24.1

Comments

Anton Ivanov Feb. 20, 2020, 7:35 p.m. UTC | #1
On 20/02/2020 08:40, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@mellanox.com>
> 
> 
> In-tree drivers don't need to manage internal version because
> they are aligned to the global Linux kernel version, which is
> reported by default with "ethtool -i".
> 
> Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
> ---
>   arch/um/drivers/net_kern.c    | 1 -
>   arch/um/drivers/vector_kern.c | 2 --
>   2 files changed, 3 deletions(-)
> 
> diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c
> index 35ebeebfc1a8..af07733c2dc8 100644
> --- a/arch/um/drivers/net_kern.c
> +++ b/arch/um/drivers/net_kern.c
> @@ -266,7 +266,6 @@ static void uml_net_get_drvinfo(struct net_device *dev,
>   				struct ethtool_drvinfo *info)
>   {
>   	strlcpy(info->driver, DRIVER_NAME, sizeof(info->driver));
> -	strlcpy(info->version, "42", sizeof(info->version));
>   }
> 
>   static const struct ethtool_ops uml_net_ethtool_ops = {
> diff --git a/arch/um/drivers/vector_kern.c b/arch/um/drivers/vector_kern.c
> index 0ff86391f77d..9693dfca7651 100644
> --- a/arch/um/drivers/vector_kern.c
> +++ b/arch/um/drivers/vector_kern.c
> @@ -46,7 +46,6 @@
> 
> 
>   #define DRIVER_NAME "uml-vector"
> -#define DRIVER_VERSION "01"
>   struct vector_cmd_line_arg {
>   	struct list_head list;
>   	int unit;
> @@ -1378,7 +1377,6 @@ static void vector_net_get_drvinfo(struct net_device *dev,
>   				struct ethtool_drvinfo *info)
>   {
>   	strlcpy(info->driver, DRIVER_NAME, sizeof(info->driver));
> -	strlcpy(info->version, DRIVER_VERSION, sizeof(info->version));
>   }
> 
>   static int vector_net_load_bpf_flash(struct net_device *dev,
> --
> 2.24.1
> 
> 

Acked-by: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Richard Weinberger March 29, 2020, 9:38 p.m. UTC | #2
On Thu, Feb 20, 2020 at 8:35 PM Anton Ivanov
<anton.ivanov@cambridgegreys.com> wrote:
>
>
>
> On 20/02/2020 08:40, Leon Romanovsky wrote:
> > From: Leon Romanovsky <leonro@mellanox.com>
> >
> >
> > In-tree drivers don't need to manage internal version because
> > they are aligned to the global Linux kernel version, which is
> > reported by default with "ethtool -i".
> >
> > Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
> > ---
> >   arch/um/drivers/net_kern.c    | 1 -
> >   arch/um/drivers/vector_kern.c | 2 --
> >   2 files changed, 3 deletions(-)
> >
> > diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c
> > index 35ebeebfc1a8..af07733c2dc8 100644
> > --- a/arch/um/drivers/net_kern.c
> > +++ b/arch/um/drivers/net_kern.c
> > @@ -266,7 +266,6 @@ static void uml_net_get_drvinfo(struct net_device *dev,
> >                               struct ethtool_drvinfo *info)
> >   {
> >       strlcpy(info->driver, DRIVER_NAME, sizeof(info->driver));
> > -     strlcpy(info->version, "42", sizeof(info->version));
> >   }
> >
> >   static const struct ethtool_ops uml_net_ethtool_ops = {
> > diff --git a/arch/um/drivers/vector_kern.c b/arch/um/drivers/vector_kern.c
> > index 0ff86391f77d..9693dfca7651 100644
> > --- a/arch/um/drivers/vector_kern.c
> > +++ b/arch/um/drivers/vector_kern.c
> > @@ -46,7 +46,6 @@
> >
> >
> >   #define DRIVER_NAME "uml-vector"
> > -#define DRIVER_VERSION "01"
> >   struct vector_cmd_line_arg {
> >       struct list_head list;
> >       int unit;
> > @@ -1378,7 +1377,6 @@ static void vector_net_get_drvinfo(struct net_device *dev,
> >                               struct ethtool_drvinfo *info)
> >   {
> >       strlcpy(info->driver, DRIVER_NAME, sizeof(info->driver));
> > -     strlcpy(info->version, DRIVER_VERSION, sizeof(info->version));
> >   }
> >
> >   static int vector_net_load_bpf_flash(struct net_device *dev,
> > --
> > 2.24.1
> >
> >
>
> Acked-by: Anton Ivanov <anton.ivanov@cambridgegreys.com>

Both patches applied, thanks!
Leon Romanovsky March 30, 2020, 7:22 a.m. UTC | #3
On Sun, Mar 29, 2020 at 11:38:10PM +0200, Richard Weinberger wrote:
> On Thu, Feb 20, 2020 at 8:35 PM Anton Ivanov
> <anton.ivanov@cambridgegreys.com> wrote:
> >
> >
> >
> > On 20/02/2020 08:40, Leon Romanovsky wrote:
> > > From: Leon Romanovsky <leonro@mellanox.com>
> > >
> > >
> > > In-tree drivers don't need to manage internal version because
> > > they are aligned to the global Linux kernel version, which is
> > > reported by default with "ethtool -i".
> > >
> > > Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
> > > ---
> > >   arch/um/drivers/net_kern.c    | 1 -
> > >   arch/um/drivers/vector_kern.c | 2 --
> > >   2 files changed, 3 deletions(-)
> > >
> > > diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c
> > > index 35ebeebfc1a8..af07733c2dc8 100644
> > > --- a/arch/um/drivers/net_kern.c
> > > +++ b/arch/um/drivers/net_kern.c
> > > @@ -266,7 +266,6 @@ static void uml_net_get_drvinfo(struct net_device *dev,
> > >                               struct ethtool_drvinfo *info)
> > >   {
> > >       strlcpy(info->driver, DRIVER_NAME, sizeof(info->driver));
> > > -     strlcpy(info->version, "42", sizeof(info->version));
> > >   }
> > >
> > >   static const struct ethtool_ops uml_net_ethtool_ops = {
> > > diff --git a/arch/um/drivers/vector_kern.c b/arch/um/drivers/vector_kern.c
> > > index 0ff86391f77d..9693dfca7651 100644
> > > --- a/arch/um/drivers/vector_kern.c
> > > +++ b/arch/um/drivers/vector_kern.c
> > > @@ -46,7 +46,6 @@
> > >
> > >
> > >   #define DRIVER_NAME "uml-vector"
> > > -#define DRIVER_VERSION "01"
> > >   struct vector_cmd_line_arg {
> > >       struct list_head list;
> > >       int unit;
> > > @@ -1378,7 +1377,6 @@ static void vector_net_get_drvinfo(struct net_device *dev,
> > >                               struct ethtool_drvinfo *info)
> > >   {
> > >       strlcpy(info->driver, DRIVER_NAME, sizeof(info->driver));
> > > -     strlcpy(info->version, DRIVER_VERSION, sizeof(info->version));
> > >   }
> > >
> > >   static int vector_net_load_bpf_flash(struct net_device *dev,
> > > --
> > > 2.24.1
> > >
> > >
> >
> > Acked-by: Anton Ivanov <anton.ivanov@cambridgegreys.com>
>
> Both patches applied, thanks!

Thanks for taking care.

>
> --
> Thanks,
> //richard
diff mbox series

Patch

diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c
index 35ebeebfc1a8..af07733c2dc8 100644
--- a/arch/um/drivers/net_kern.c
+++ b/arch/um/drivers/net_kern.c
@@ -266,7 +266,6 @@  static void uml_net_get_drvinfo(struct net_device *dev,
 				struct ethtool_drvinfo *info)
 {
 	strlcpy(info->driver, DRIVER_NAME, sizeof(info->driver));
-	strlcpy(info->version, "42", sizeof(info->version));
 }

 static const struct ethtool_ops uml_net_ethtool_ops = {
diff --git a/arch/um/drivers/vector_kern.c b/arch/um/drivers/vector_kern.c
index 0ff86391f77d..9693dfca7651 100644
--- a/arch/um/drivers/vector_kern.c
+++ b/arch/um/drivers/vector_kern.c
@@ -46,7 +46,6 @@ 


 #define DRIVER_NAME "uml-vector"
-#define DRIVER_VERSION "01"
 struct vector_cmd_line_arg {
 	struct list_head list;
 	int unit;
@@ -1378,7 +1377,6 @@  static void vector_net_get_drvinfo(struct net_device *dev,
 				struct ethtool_drvinfo *info)
 {
 	strlcpy(info->driver, DRIVER_NAME, sizeof(info->driver));
-	strlcpy(info->version, DRIVER_VERSION, sizeof(info->version));
 }

 static int vector_net_load_bpf_flash(struct net_device *dev,