lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202212170322.ikZ7Qug3-lkp@intel.com>
Date:   Sat, 17 Dec 2022 03:24:14 +0800
From:   kernel test robot <lkp@...el.com>
To:     Sean Anderson <sean.anderson@...o.com>,
        Andrew Lunn <andrew@...n.ch>,
        Heiner Kallweit <hkallweit1@...il.com>, netdev@...r.kernel.org,
        Russell King <linux@...linux.org.uk>
Cc:     llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
        Paolo Abeni <pabeni@...hat.com>,
        Vladimir Oltean <olteanv@...il.com>,
        linux-kernel@...r.kernel.org, Jakub Kicinski <kuba@...nel.org>,
        Tim Harvey <tharvey@...eworks.com>,
        "David S . Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Sean Anderson <sean.anderson@...o.com>
Subject: Re: [PATCH net-next v4 4/4] phy: aquantia: Determine rate adaptation
 support from registers

Hi Sean,

I love your patch! Yet something to improve:

[auto build test ERROR on net-next/master]

url:    https://github.com/intel-lab-lkp/linux/commits/Sean-Anderson/phy-aquantia-Determine-rate-adaptation-support-from-registers/20221217-005201
patch link:    https://lore.kernel.org/r/20221216164851.2932043-5-sean.anderson%40seco.com
patch subject: [PATCH net-next v4 4/4] phy: aquantia: Determine rate adaptation support from registers
config: hexagon-randconfig-r041-20221216
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 98b13979fb05f3ed288a900deb843e7b27589e58)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel-lab-lkp/linux/commit/d13e19ac57e06d0b5d6ddb81c27801c0b8ec9b70
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Sean-Anderson/phy-aquantia-Determine-rate-adaptation-support-from-registers/20221217-005201
        git checkout d13e19ac57e06d0b5d6ddb81c27801c0b8ec9b70
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash drivers/net/phy/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>

All errors (new ones prefixed by >>):

   In file included from drivers/net/phy/aquantia_main.c:14:
   In file included from include/linux/phy.h:16:
   In file included from include/linux/ethtool.h:18:
   In file included from include/linux/netlink.h:7:
   In file included from include/linux/skbuff.h:17:
   In file included from include/linux/bvec.h:10:
   In file included from include/linux/highmem.h:12:
   In file included from include/linux/hardirq.h:11:
   In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/hexagon/include/asm/io.h:334:
   include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __raw_readb(PCI_IOBASE + addr);
                             ~~~~~~~~~~ ^
   include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
                                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu'
   #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
                                                     ^
   In file included from drivers/net/phy/aquantia_main.c:14:
   In file included from include/linux/phy.h:16:
   In file included from include/linux/ethtool.h:18:
   In file included from include/linux/netlink.h:7:
   In file included from include/linux/skbuff.h:17:
   In file included from include/linux/bvec.h:10:
   In file included from include/linux/highmem.h:12:
   In file included from include/linux/hardirq.h:11:
   In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/hexagon/include/asm/io.h:334:
   include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
                                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu'
   #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                                                     ^
   In file included from drivers/net/phy/aquantia_main.c:14:
   In file included from include/linux/phy.h:16:
   In file included from include/linux/ethtool.h:18:
   In file included from include/linux/netlink.h:7:
   In file included from include/linux/skbuff.h:17:
   In file included from include/linux/bvec.h:10:
   In file included from include/linux/highmem.h:12:
   In file included from include/linux/hardirq.h:11:
   In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/hexagon/include/asm/io.h:334:
   include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writeb(value, PCI_IOBASE + addr);
                               ~~~~~~~~~~ ^
   include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
                                                         ~~~~~~~~~~ ^
   include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
                                                         ~~~~~~~~~~ ^
>> drivers/net/phy/aquantia_main.c:784:17: error: use of undeclared identifier 'MDIO_PMA_SPEED_2_5G'
                           .speed_bit = MDIO_PMA_SPEED_2_5G,
                                        ^
>> drivers/net/phy/aquantia_main.c:789:17: error: use of undeclared identifier 'MDIO_PMA_SPEED_5G'
                           .speed_bit = MDIO_PMA_SPEED_5G,
                                        ^
>> drivers/net/phy/aquantia_main.c:799:18: error: invalid application of 'sizeof' to an incomplete type 'const struct aqr107_link_speed_cfg[]'
           for (i = 0; i < ARRAY_SIZE(speed_table) &&
                           ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:55:32: note: expanded from macro 'ARRAY_SIZE'
   #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
                                  ^~~~~
   drivers/net/phy/aquantia_main.c:805:11: error: invalid application of 'sizeof' to an incomplete type 'const struct aqr107_link_speed_cfg[]'
           if (i == ARRAY_SIZE(speed_table) && speed != speed_table[i].speed)
                    ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:55:32: note: expanded from macro 'ARRAY_SIZE'
   #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
                                  ^~~~~
   6 warnings and 4 errors generated.

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for DEBUG_MAPLE_TREE
   Depends on [n]: DEBUG_KERNEL [=n]
   Selected by [y]:
   - TEST_MAPLE_TREE [=y] && RUNTIME_TESTING_MENU [=y]


vim +/MDIO_PMA_SPEED_2_5G +784 drivers/net/phy/aquantia_main.c

   751	
   752	/**
   753	 * aqr107_rate_adapt_ok() - Validate rate adaptation for an interface speed
   754	 * @phydev: The phy device
   755	 * @speed: The serdes (phy interface) speed
   756	 *
   757	 * This validates whether rate adaptation will work for a particular @speed.
   758	 * All link speeds less than or equal to @speed are validate to ensure they are
   759	 * configured properly.
   760	 *
   761	 * Return: %true if rate adaptation is supported for @speed, %false otherwise.
   762	 */
   763	static bool aqr107_rate_adapt_ok(struct phy_device *phydev, int speed)
   764	{
   765		static const struct aqr107_link_speed_cfg speed_table[] = {
   766			{
   767				.speed = SPEED_10,
   768				.reg = VEND1_GLOBAL_CFG_10M,
   769				.speed_bit = MDIO_PMA_SPEED_10,
   770			},
   771			{
   772				.speed = SPEED_100,
   773				.reg = VEND1_GLOBAL_CFG_100M,
   774				.speed_bit = MDIO_PMA_SPEED_100,
   775			},
   776			{
   777				.speed = SPEED_1000,
   778				.reg = VEND1_GLOBAL_CFG_1G,
   779				.speed_bit = MDIO_PMA_SPEED_1000,
   780			},
   781			{
   782				.speed = SPEED_2500,
   783				.reg = VEND1_GLOBAL_CFG_2_5G,
 > 784				.speed_bit = MDIO_PMA_SPEED_2_5G,
   785			},
   786			{
   787				.speed = SPEED_5000,
   788				.reg = VEND1_GLOBAL_CFG_5G,
 > 789				.speed_bit = MDIO_PMA_SPEED_5G,
   790			},
   791			{
   792				.speed = SPEED_10000,
   793				.reg = VEND1_GLOBAL_CFG_10G,
   794				.speed_bit = MDIO_PMA_SPEED_10G,
   795			},
   796		};
   797		int i;
   798	
 > 799		for (i = 0; i < ARRAY_SIZE(speed_table) &&
   800			    speed_table[i].speed <= speed; i++)
   801			if (!aqr107_rate_adapt_ok_one(phydev, speed, &speed_table[i]))
   802				return false;
   803	
   804		/* Must match at least one speed */
   805		if (i == ARRAY_SIZE(speed_table) && speed != speed_table[i].speed)
   806			return false;
   807	
   808		return true;
   809	}
   810	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (117709 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ