[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <201904051032.3mBLVyMR%lkp@intel.com>
Date: Fri, 5 Apr 2019 10:18:35 +0800
From: kbuild test robot <lkp@...el.com>
To: greearb@...delatech.com
Cc: kbuild-all@...org, netdev@...r.kernel.org,
Ben Greear <greearb@...delatech.com>
Subject: Re: [PATCH] igb: Debugging for setting rate negotiation settings.
Hi,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on jkirsher-next-queue/dev-queue]
[also build test WARNING on v5.1-rc3 next-20190404]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/greearb-candelatech-com/igb-Debugging-for-setting-rate-negotiation-settings/20190405-090219
base: https://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git dev-queue
config: x86_64-lkp (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All warnings (new ones prefixed by >>):
In file included from include/linux/dma-mapping.h:7:0,
from include/linux/skbuff.h:34,
from include/linux/if_ether.h:23,
from include/uapi/linux/ethtool.h:19,
from include/linux/ethtool.h:18,
from include/linux/netdevice.h:41,
from drivers/net/ethernet/intel/igb/igb_main.c:12:
drivers/net/ethernet/intel/igb/igb_main.c: In function 'igb_set_spd_dplx':
>> drivers/net/ethernet/intel/igb/igb_main.c:8730:23: warning: too many arguments for format [-Wformat-extra-args]
dev_err(&pdev->dev, "Unsupported Speed/Duplex configuration: 1Gbps HD not supported\n",
^
include/linux/device.h:1402:22: note: in definition of macro 'dev_fmt'
#define dev_fmt(fmt) fmt
^~~
drivers/net/ethernet/intel/igb/igb_main.c:8730:3: note: in expansion of macro 'dev_err'
dev_err(&pdev->dev, "Unsupported Speed/Duplex configuration: 1Gbps HD not supported\n",
^~~~~~~
vim +8730 drivers/net/ethernet/intel/igb/igb_main.c
8679
8680 int igb_set_spd_dplx(struct igb_adapter *adapter, u32 spd, u8 dplx)
8681 {
8682 struct pci_dev *pdev = adapter->pdev;
8683 struct e1000_mac_info *mac = &adapter->hw.mac;
8684
8685 mac->autoneg = 0;
8686
8687 /* Make sure dplx is at most 1 bit and lsb of speed is not set
8688 * for the switch() below to work
8689 */
8690 if ((spd & 1) || (dplx & ~1)) {
8691 dev_err(&pdev->dev, "Unsupported Speed/Duplex configuration, bit-mismatch, spd: 0x%x dplx: 0x%x\n",
8692 spd, dplx);
8693 goto err_inval;
8694 }
8695
8696 /* Fiber NIC's only allow 1000 gbps Full duplex
8697 * and 100Mbps Full duplex for 100baseFx sfp
8698 */
8699 if (adapter->hw.phy.media_type == e1000_media_type_internal_serdes) {
8700 switch (spd + dplx) {
8701 case SPEED_10 + DUPLEX_HALF:
8702 case SPEED_10 + DUPLEX_FULL:
8703 case SPEED_100 + DUPLEX_HALF:
8704 dev_err(&pdev->dev, "Unsupported Speed/Duplex configuration, fiber does not support HD, spd: 0x%x dplx: 0x%x\n",
8705 spd, dplx);
8706 goto err_inval;
8707 default:
8708 break;
8709 }
8710 }
8711
8712 switch (spd + dplx) {
8713 case SPEED_10 + DUPLEX_HALF:
8714 mac->forced_speed_duplex = ADVERTISE_10_HALF;
8715 break;
8716 case SPEED_10 + DUPLEX_FULL:
8717 mac->forced_speed_duplex = ADVERTISE_10_FULL;
8718 break;
8719 case SPEED_100 + DUPLEX_HALF:
8720 mac->forced_speed_duplex = ADVERTISE_100_HALF;
8721 break;
8722 case SPEED_100 + DUPLEX_FULL:
8723 mac->forced_speed_duplex = ADVERTISE_100_FULL;
8724 break;
8725 case SPEED_1000 + DUPLEX_FULL:
8726 mac->autoneg = 1;
8727 adapter->hw.phy.autoneg_advertised = ADVERTISE_1000_FULL;
8728 break;
8729 case SPEED_1000 + DUPLEX_HALF: /* not supported */
> 8730 dev_err(&pdev->dev, "Unsupported Speed/Duplex configuration: 1Gbps HD not supported\n",
8731 spd, dplx);
8732 goto err_inval;
8733 default:
8734 dev_err(&pdev->dev, "Unsupported Speed/Duplex configuration, case not handled, spd: 0x%x dplx: 0x%x\n",
8735 spd, dplx);
8736 goto err_inval;
8737 }
8738
8739 dev_info(&pdev->dev, "Set Speed: %d dplx: %d autoneg: %d forced-speed-duplex: %d\n",
8740 spd, dplx, mac->autoneg, mac->forced_speed_duplex);
8741
8742 /* clear MDI, MDI(-X) override is only allowed when autoneg enabled */
8743 adapter->hw.phy.mdix = AUTO_ALL_MODES;
8744
8745 return 0;
8746
8747 err_inval:
8748 return -EINVAL;
8749 }
8750
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Download attachment ".config.gz" of type "application/gzip" (26578 bytes)
Powered by blists - more mailing lists