summaryrefslogtreecommitdiffstats
path: root/net/core/ethtool.c
diff options
context:
space:
mode:
authorLi RongQing2019-02-27 13:47:57 +0100
committerDavid S. Miller2019-02-27 19:07:57 +0100
commite83887f67bee00daca7db271fa44db462c55eb28 (patch)
treeafb373a65d8420e19824393774e827b71e13911a /net/core/ethtool.c
parentnet: sched: pie: fix 64-bit division (diff)
downloadkernel-qcow2-linux-e83887f67bee00daca7db271fa44db462c55eb28.tar.gz
kernel-qcow2-linux-e83887f67bee00daca7db271fa44db462c55eb28.tar.xz
kernel-qcow2-linux-e83887f67bee00daca7db271fa44db462c55eb28.zip
ethtool: Use explicit designated initializers for .cmd
Initialize the .cmd member by using a designated struct initializer. This fixes warning of missing field initializers, and makes code a little easier to read. Signed-off-by: Li RongQing <lirongqing@baidu.com> Reviewed-by: Michal Kubecek <mkubecek@suse.cz> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/ethtool.c')
-rw-r--r--net/core/ethtool.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/ethtool.c b/net/core/ethtool.c
index 47558ffae423..d4918ffddda8 100644
--- a/net/core/ethtool.c
+++ b/net/core/ethtool.c
@@ -1717,7 +1717,7 @@ static noinline_for_stack int ethtool_set_channels(struct net_device *dev,
static int ethtool_get_pauseparam(struct net_device *dev, void __user *useraddr)
{
- struct ethtool_pauseparam pauseparam = { ETHTOOL_GPAUSEPARAM };
+ struct ethtool_pauseparam pauseparam = { .cmd = ETHTOOL_GPAUSEPARAM };
if (!dev->ethtool_ops->get_pauseparam)
return -EOPNOTSUPP;
@@ -2503,7 +2503,7 @@ static int set_phy_tunable(struct net_device *dev, void __user *useraddr)
static int ethtool_get_fecparam(struct net_device *dev, void __user *useraddr)
{
- struct ethtool_fecparam fecparam = { ETHTOOL_GFECPARAM };
+ struct ethtool_fecparam fecparam = { .cmd = ETHTOOL_GFECPARAM };
int rc;
if (!dev->ethtool_ops->get_fecparam)