linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Michal Kubecek <mkubecek@suse.cz>
Cc: kbuild-all@lists.01.org, Jiri Pirko <jiri@resnulli.us>,
	Andrew Lunn <andrew@lunn.ch>,
	Florian Fainelli <f.fainelli@gmail.com>,
	John Linville <linville@tuxdriver.com>,
	Johannes Berg <johannes@sipsolutions.net>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 11/12] ethtool: add timestamping related string sets
Date: Fri, 27 Mar 2020 14:55:36 +0800	[thread overview]
Message-ID: <202003271437.5LMEAGMc%lkp@intel.com> (raw)
In-Reply-To: <105373960c4afeeea7b51459b9763b0452d6e660.1585267388.git.mkubecek@suse.cz>

[-- Attachment #1: Type: text/plain, Size: 5893 bytes --]

Hi Michal,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on net-next/master]
[also build test WARNING on next-20200326]
[cannot apply to net/master linus/master v5.6-rc7]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Michal-Kubecek/ethtool-netlink-interface-part-4/20200327-122420
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 5bb7357f45315138f623d08a615d23dd6ac26cf3
config: nds32-defconfig (attached as .config)
compiler: nds32le-linux-gcc (GCC) 9.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=9.2.0 make.cross ARCH=nds32 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   net/core/dev_ioctl.c: In function 'net_hwtstamp_validate':
>> net/core/dev_ioctl.c:186:2: warning: enumeration value '__HWTSTAMP_TX_CNT' not handled in switch [-Wswitch]
     186 |  switch (tx_type) {
         |  ^~~~~~
>> net/core/dev_ioctl.c:195:2: warning: enumeration value '__HWTSTAMP_FILTER_CNT' not handled in switch [-Wswitch]
     195 |  switch (rx_filter) {
         |  ^~~~~~

vim +/__HWTSTAMP_TX_CNT +186 net/core/dev_ioctl.c

96b45cbd956ce8 Cong Wang        2013-02-15  168  
96b45cbd956ce8 Cong Wang        2013-02-15  169  static int net_hwtstamp_validate(struct ifreq *ifr)
96b45cbd956ce8 Cong Wang        2013-02-15  170  {
96b45cbd956ce8 Cong Wang        2013-02-15  171  	struct hwtstamp_config cfg;
96b45cbd956ce8 Cong Wang        2013-02-15  172  	enum hwtstamp_tx_types tx_type;
96b45cbd956ce8 Cong Wang        2013-02-15  173  	enum hwtstamp_rx_filters rx_filter;
96b45cbd956ce8 Cong Wang        2013-02-15  174  	int tx_type_valid = 0;
96b45cbd956ce8 Cong Wang        2013-02-15  175  	int rx_filter_valid = 0;
96b45cbd956ce8 Cong Wang        2013-02-15  176  
96b45cbd956ce8 Cong Wang        2013-02-15  177  	if (copy_from_user(&cfg, ifr->ifr_data, sizeof(cfg)))
96b45cbd956ce8 Cong Wang        2013-02-15  178  		return -EFAULT;
96b45cbd956ce8 Cong Wang        2013-02-15  179  
96b45cbd956ce8 Cong Wang        2013-02-15  180  	if (cfg.flags) /* reserved for future extensions */
96b45cbd956ce8 Cong Wang        2013-02-15  181  		return -EINVAL;
96b45cbd956ce8 Cong Wang        2013-02-15  182  
96b45cbd956ce8 Cong Wang        2013-02-15  183  	tx_type = cfg.tx_type;
96b45cbd956ce8 Cong Wang        2013-02-15  184  	rx_filter = cfg.rx_filter;
96b45cbd956ce8 Cong Wang        2013-02-15  185  
96b45cbd956ce8 Cong Wang        2013-02-15 @186  	switch (tx_type) {
96b45cbd956ce8 Cong Wang        2013-02-15  187  	case HWTSTAMP_TX_OFF:
96b45cbd956ce8 Cong Wang        2013-02-15  188  	case HWTSTAMP_TX_ON:
96b45cbd956ce8 Cong Wang        2013-02-15  189  	case HWTSTAMP_TX_ONESTEP_SYNC:
b6fd7b96366769 Richard Cochran  2019-12-25  190  	case HWTSTAMP_TX_ONESTEP_P2P:
96b45cbd956ce8 Cong Wang        2013-02-15  191  		tx_type_valid = 1;
96b45cbd956ce8 Cong Wang        2013-02-15  192  		break;
96b45cbd956ce8 Cong Wang        2013-02-15  193  	}
96b45cbd956ce8 Cong Wang        2013-02-15  194  
96b45cbd956ce8 Cong Wang        2013-02-15 @195  	switch (rx_filter) {
96b45cbd956ce8 Cong Wang        2013-02-15  196  	case HWTSTAMP_FILTER_NONE:
96b45cbd956ce8 Cong Wang        2013-02-15  197  	case HWTSTAMP_FILTER_ALL:
96b45cbd956ce8 Cong Wang        2013-02-15  198  	case HWTSTAMP_FILTER_SOME:
96b45cbd956ce8 Cong Wang        2013-02-15  199  	case HWTSTAMP_FILTER_PTP_V1_L4_EVENT:
96b45cbd956ce8 Cong Wang        2013-02-15  200  	case HWTSTAMP_FILTER_PTP_V1_L4_SYNC:
96b45cbd956ce8 Cong Wang        2013-02-15  201  	case HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ:
96b45cbd956ce8 Cong Wang        2013-02-15  202  	case HWTSTAMP_FILTER_PTP_V2_L4_EVENT:
96b45cbd956ce8 Cong Wang        2013-02-15  203  	case HWTSTAMP_FILTER_PTP_V2_L4_SYNC:
96b45cbd956ce8 Cong Wang        2013-02-15  204  	case HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ:
96b45cbd956ce8 Cong Wang        2013-02-15  205  	case HWTSTAMP_FILTER_PTP_V2_L2_EVENT:
96b45cbd956ce8 Cong Wang        2013-02-15  206  	case HWTSTAMP_FILTER_PTP_V2_L2_SYNC:
96b45cbd956ce8 Cong Wang        2013-02-15  207  	case HWTSTAMP_FILTER_PTP_V2_L2_DELAY_REQ:
96b45cbd956ce8 Cong Wang        2013-02-15  208  	case HWTSTAMP_FILTER_PTP_V2_EVENT:
96b45cbd956ce8 Cong Wang        2013-02-15  209  	case HWTSTAMP_FILTER_PTP_V2_SYNC:
96b45cbd956ce8 Cong Wang        2013-02-15  210  	case HWTSTAMP_FILTER_PTP_V2_DELAY_REQ:
b8210a9e4bea63 Miroslav Lichvar 2017-05-19  211  	case HWTSTAMP_FILTER_NTP_ALL:
e3412575488ac2 Miroslav Lichvar 2017-05-19  212  		rx_filter_valid = 1;
b8210a9e4bea63 Miroslav Lichvar 2017-05-19  213  		break;
96b45cbd956ce8 Cong Wang        2013-02-15  214  	}
96b45cbd956ce8 Cong Wang        2013-02-15  215  
96b45cbd956ce8 Cong Wang        2013-02-15  216  	if (!tx_type_valid || !rx_filter_valid)
96b45cbd956ce8 Cong Wang        2013-02-15  217  		return -ERANGE;
96b45cbd956ce8 Cong Wang        2013-02-15  218  
96b45cbd956ce8 Cong Wang        2013-02-15  219  	return 0;
96b45cbd956ce8 Cong Wang        2013-02-15  220  }
96b45cbd956ce8 Cong Wang        2013-02-15  221  

:::::: The code at line 186 was first introduced by commit
:::::: 96b45cbd956ce83908378d87d009b05645353f22 net: move ioctl functions into a separated file

:::::: TO: Cong Wang <xiyou.wangcong@gmail.com>
:::::: CC: David S. Miller <davem@davemloft.net>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 10830 bytes --]

  reply	other threads:[~2020-03-27  6:56 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-27  0:11 [PATCH net-next 00/12] ethtool netlink interface, part 4 Michal Kubecek
2020-03-27  0:11 ` [PATCH net-next 01/12] ethtool: fix reference leak in ethnl_set_privflags() Michal Kubecek
2020-03-27  0:11 ` [PATCH net-next 02/12] ethtool: provide coalescing parameters with COALESCE_GET request Michal Kubecek
2020-03-27  4:16   ` Jakub Kicinski
2020-03-27  0:12 ` [PATCH net-next 03/12] ethtool: set coalescing parameters with COALESCE_SET request Michal Kubecek
2020-03-27  4:16   ` Jakub Kicinski
2020-03-27  0:12 ` [PATCH net-next 04/12] ethtool: add COALESCE_NTF notification Michal Kubecek
2020-03-27  4:16   ` Jakub Kicinski
2020-03-27  0:12 ` [PATCH net-next 05/12] ethtool: provide pause parameters with PAUSE_GET request Michal Kubecek
2020-03-27  0:12 ` [PATCH net-next 06/12] ethtool: set pause parameters with PAUSE_SET request Michal Kubecek
2020-03-27  0:12 ` [PATCH net-next 07/12] ethtool: add PAUSE_NTF notification Michal Kubecek
2020-03-27  0:12 ` [PATCH net-next 08/12] ethtool: provide EEE settings with EEE_GET request Michal Kubecek
2020-03-27  0:12 ` [PATCH net-next 09/12] ethtool: set EEE settings with EEE_SET request Michal Kubecek
2020-03-27  0:12 ` [PATCH net-next 10/12] ethtool: add EEE_NTF notification Michal Kubecek
2020-03-27  0:12 ` [PATCH net-next 11/12] ethtool: add timestamping related string sets Michal Kubecek
2020-03-27  6:55   ` kbuild test robot [this message]
2020-03-27  8:42     ` Michal Kubecek
2020-03-27  0:12 ` [PATCH net-next 12/12] ethtool: provide timestamping information with TIMESTAMP_GET request Michal Kubecek
2020-03-27  4:17 ` [PATCH net-next 00/12] ethtool netlink interface, part 4 Jakub Kicinski

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=202003271437.5LMEAGMc%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andrew@lunn.ch \
    --cc=f.fainelli@gmail.com \
    --cc=jiri@resnulli.us \
    --cc=johannes@sipsolutions.net \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=mkubecek@suse.cz \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).