From: Leon Romanovsky <leon@kernel.org>
To: "David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>
Cc: Leon Romanovsky <leonro@mellanox.com>,
Michal Kalderon <michal.kalderon@marvell.com>,
linux-netdev <netdev@vger.kernel.org>,
RDMA mailing list <linux-rdma@vger.kernel.org>
Subject: [PATCH net-next v1] net/core: Replace driver version to be kernel version
Date: Sat, 25 Jan 2020 18:14:01 +0200 [thread overview]
Message-ID: <20200125161401.40683-1-leon@kernel.org> (raw)
From: Leon Romanovsky <leonro@mellanox.com>
In order to stop useless driver version bumps and unify output
presented by ethtool -i, let's overwrite the version string.
Before this change:
[leonro@erver ~]$ ethtool -i eth0
driver: virtio_net
version: 1.0.0
After this change:
[leonro@server ~]$ ethtool -i eth0
driver: virtio_net
version: 5.5.0-rc6+
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
Changelog:
v1: Resend per-Dave's request
https://lore.kernel.org/linux-rdma/20200125.101311.1924780619716720495.davem@davemloft.net
No changes at all and applied cleanly on top of "3333e50b64fe Merge branch 'mlxsw-Offload-TBF'"
v0: https://lore.kernel.org/linux-rdma/20200123130541.30473-1-leon@kernel.org
---
net/ethtool/ioctl.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/ethtool/ioctl.c b/net/ethtool/ioctl.c
index 182bffbffa78..a403decacb6d 100644
--- a/net/ethtool/ioctl.c
+++ b/net/ethtool/ioctl.c
@@ -17,6 +17,7 @@
#include <linux/phy.h>
#include <linux/bitops.h>
#include <linux/uaccess.h>
+#include <linux/vermagic.h>
#include <linux/vmalloc.h>
#include <linux/sfp.h>
#include <linux/slab.h>
@@ -666,6 +667,8 @@ static noinline_for_stack int ethtool_get_drvinfo(struct net_device *dev,
return -EOPNOTSUPP;
}
+ strlcpy(info.version, UTS_RELEASE, sizeof(info.version));
+
/*
* this method of obtaining string set info is deprecated;
* Use ETHTOOL_GSSET_INFO instead.
--
2.24.1
next reply other threads:[~2020-01-25 16:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-25 16:14 Leon Romanovsky [this message]
2020-01-25 16:55 ` [PATCH net-next v1] net/core: Replace driver version to be kernel version Florian Fainelli
2020-01-25 18:49 ` Leon Romanovsky
2020-01-25 19:24 ` Leon Romanovsky
2020-01-26 3:11 ` Florian Fainelli
2020-01-26 9:44 ` Leon Romanovsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200125161401.40683-1-leon@kernel.org \
--to=leon@kernel.org \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=leonro@mellanox.com \
--cc=linux-rdma@vger.kernel.org \
--cc=michal.kalderon@marvell.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.