From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED, USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 16D01C43381 for ; Wed, 27 Feb 2019 13:52:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E71CD20C01 for ; Wed, 27 Feb 2019 13:52:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730404AbfB0NwB (ORCPT ); Wed, 27 Feb 2019 08:52:01 -0500 Received: from mx2.suse.de ([195.135.220.15]:48950 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730094AbfB0NwB (ORCPT ); Wed, 27 Feb 2019 08:52:01 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 04196B120; Wed, 27 Feb 2019 13:51:59 +0000 (UTC) Received: by unicorn.suse.cz (Postfix, from userid 1000) id 59F4DE00AD; Wed, 27 Feb 2019 14:51:59 +0100 (CET) Date: Wed, 27 Feb 2019 14:51:59 +0100 From: Michal Kubecek To: Li RongQing Cc: netdev@vger.kernel.org Subject: Re: [PATCH][net-next] ethtool: Use explicit designated initializers for .cmd Message-ID: <20190227135159.GC29992@unicorn.suse.cz> References: <1551271677-14492-1-git-send-email-lirongqing@baidu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1551271677-14492-1-git-send-email-lirongqing@baidu.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, Feb 27, 2019 at 08:47:57PM +0800, Li RongQing wrote: > 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 Reviewed-by: Michal Kubecek > --- > net/core/ethtool.c | 4 ++-- > 1 file 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) > -- > 2.16.2 >