CC: [email protected] CC: [email protected] In-Reply-To: <[email protected]> References: <[email protected]> TO: [email protected] TO: [email protected] CC: [email protected] CC: [email protected] CC: [email protected] CC: [email protected] CC: [email protected] CC: [email protected] CC: [email protected] CC: [email protected] CC: [email protected]
Hi, I love your patch! Perhaps something to improve: [auto build test WARNING on robh/for-next] [also build test WARNING on net-next/master net/master linus/master v5.15 next-20211106] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/alexandru-tachici-analog-com/net-phy-adin1100-Add-initial-support-for-ADIN1100-industrial-PHY/20211011-222106 base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next :::::: branch date: 4 weeks ago :::::: commit date: 4 weeks ago config: riscv-randconfig-c006-20211014 (attached as .config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project acb3b187c4c88650a6a717a1bcb234d27d0d7f54) 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 # install riscv cross compiling tool for clang build # apt-get install binutils-riscv64-linux-gnu # https://github.com/0day-ci/linux/commit/7ccab017f2bbf322599c7d6fb5096b281ed73d53 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review alexandru-tachici-analog-com/net-phy-adin1100-Add-initial-support-for-ADIN1100-industrial-PHY/20211011-222106 git checkout 7ccab017f2bbf322599c7d6fb5096b281ed73d53 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv clang-analyzer If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <[email protected]> clang-analyzer warnings: (new ones prefixed by >>) ^ include/linux/compiler_types.h:310:2: note: expanded from macro '_compiletime_assert' __compiletime_assert(condition, msg, prefix, suffix) ^ include/linux/compiler_types.h:302:3: note: expanded from macro '__compiletime_assert' if (!(condition)) \ ^ fs/gfs2/bmap.c:2237:10: note: Loop condition is false. Exiting loop jext = list_first_entry(&jd->extent_list, struct gfs2_journal_extent, list); ^ include/linux/list.h:522:2: note: expanded from macro 'list_first_entry' list_entry((ptr)->next, type, member) ^ include/linux/list.h:511:2: note: expanded from macro 'list_entry' container_of(ptr, type, member) ^ include/linux/kernel.h:495:2: note: expanded from macro 'container_of' BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \ ^ note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) include/linux/compiler_types.h:322:2: note: expanded from macro 'compiletime_assert' _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) ^ include/linux/compiler_types.h:310:2: note: expanded from macro '_compiletime_assert' __compiletime_assert(condition, msg, prefix, suffix) ^ include/linux/compiler_types.h:300:2: note: expanded from macro '__compiletime_assert' do { \ ^ fs/gfs2/bmap.c:2239:3: note: Memory is released kfree(jext); ^~~~~~~~~~~ fs/gfs2/bmap.c:2236:2: note: Loop condition is true. Entering loop body while(!list_empty(&jd->extent_list)) { ^ fs/gfs2/bmap.c:2237:10: note: Left side of '&&' is false jext = list_first_entry(&jd->extent_list, struct gfs2_journal_extent, list); ^ include/linux/list.h:522:2: note: expanded from macro 'list_first_entry' list_entry((ptr)->next, type, member) ^ include/linux/list.h:511:2: note: expanded from macro 'list_entry' container_of(ptr, type, member) ^ include/linux/kernel.h:495:61: note: expanded from macro 'container_of' BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \ ^ fs/gfs2/bmap.c:2237:10: note: Taking false branch jext = list_first_entry(&jd->extent_list, struct gfs2_journal_extent, list); ^ include/linux/list.h:522:2: note: expanded from macro 'list_first_entry' list_entry((ptr)->next, type, member) ^ include/linux/list.h:511:2: note: expanded from macro 'list_entry' container_of(ptr, type, member) ^ include/linux/kernel.h:495:2: note: expanded from macro 'container_of' BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \ ^ note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) include/linux/compiler_types.h:322:2: note: expanded from macro 'compiletime_assert' _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) ^ include/linux/compiler_types.h:310:2: note: expanded from macro '_compiletime_assert' __compiletime_assert(condition, msg, prefix, suffix) ^ include/linux/compiler_types.h:302:3: note: expanded from macro '__compiletime_assert' if (!(condition)) \ ^ fs/gfs2/bmap.c:2237:10: note: Loop condition is false. Exiting loop jext = list_first_entry(&jd->extent_list, struct gfs2_journal_extent, list); ^ include/linux/list.h:522:2: note: expanded from macro 'list_first_entry' list_entry((ptr)->next, type, member) ^ include/linux/list.h:511:2: note: expanded from macro 'list_entry' container_of(ptr, type, member) ^ include/linux/kernel.h:495:2: note: expanded from macro 'container_of' BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \ ^ note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) include/linux/compiler_types.h:322:2: note: expanded from macro 'compiletime_assert' _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) ^ include/linux/compiler_types.h:310:2: note: expanded from macro '_compiletime_assert' __compiletime_assert(condition, msg, prefix, suffix) ^ include/linux/compiler_types.h:300:2: note: expanded from macro '__compiletime_assert' do { \ ^ fs/gfs2/bmap.c:2238:3: note: Calling 'list_del' list_del(&jext->list); ^~~~~~~~~~~~~~~~~~~~~ include/linux/list.h:147:14: note: Use of memory after it is freed entry->next = LIST_POISON1; ~~~~~~~~~~~ ^ Suppressed 9 warnings (9 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 9 warnings generated. >> drivers/net/phy/adin1100.c:175:3: warning: Value stored to 'ret' is never >> read [clang-analyzer-deadcode.DeadStores] ret = phy_clear_bits_mmd(phydev, MDIO_MMD_AN, MDIO_AN_T1_ADV_L, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/phy/adin1100.c:175:3: note: Value stored to 'ret' is never read ret = phy_clear_bits_mmd(phydev, MDIO_MMD_AN, MDIO_AN_T1_ADV_L, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Suppressed 8 warnings (8 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 8 warnings generated. Suppressed 8 warnings (8 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 14 warnings generated. Suppressed 14 warnings (14 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 14 warnings generated. Suppressed 14 warnings (14 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 14 warnings generated. Suppressed 14 warnings (14 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 13 warnings generated. Suppressed 13 warnings (13 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 8 warnings generated. Suppressed 8 warnings (8 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 15 warnings generated. net/ieee802154/nl-mac.c:529:2: warning: Value stored to 'rc' is never read [clang-analyzer-deadcode.DeadStores] rc = ops->set_mac_params(dev, ¶ms); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ net/ieee802154/nl-mac.c:529:2: note: Value stored to 'rc' is never read rc = ops->set_mac_params(dev, ¶ms); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Suppressed 14 warnings (14 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 14 warnings generated. include/net/netlink.h:1477:32: warning: Null pointer passed as 1st argument to string length function [clang-analyzer-unix.cstring.NullArg] return nla_put(skb, attrtype, strlen(str) + 1, str); ^ net/ieee802154/nl-phy.c:172:2: note: Taking false branch pr_debug("%s\n", __func__); ^ include/linux/printk.h:576:2: note: expanded from macro 'pr_debug' no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) ^ include/linux/printk.h:131:2: note: expanded from macro 'no_printk' if (0) \ ^ net/ieee802154/nl-phy.c:174:6: note: Assuming the condition is false if (!info->attrs[IEEE802154_ATTR_PHY_NAME]) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ net/ieee802154/nl-phy.c:174:2: note: Taking false branch if (!info->attrs[IEEE802154_ATTR_PHY_NAME]) ^ net/ieee802154/nl-phy.c:178:6: note: Assuming the condition is false if (name[nla_len(info->attrs[IEEE802154_ATTR_PHY_NAME]) - 1] != '\0') ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ net/ieee802154/nl-phy.c:178:2: note: Taking false branch if (name[nla_len(info->attrs[IEEE802154_ATTR_PHY_NAME]) - 1] != '\0') ^ net/ieee802154/nl-phy.c:181:6: note: Assuming the condition is false if (info->attrs[IEEE802154_ATTR_DEV_NAME]) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ net/ieee802154/nl-phy.c:181:2: note: Taking false branch if (info->attrs[IEEE802154_ATTR_DEV_NAME]) { ^ net/ieee802154/nl-phy.c:192:2: note: Taking false branch if (strlen(devname) >= IFNAMSIZ) ^ net/ieee802154/nl-phy.c:196:6: note: Assuming 'phy' is non-null if (!phy) ^~~~ net/ieee802154/nl-phy.c:196:2: note: Taking false branch if (!phy) ^ net/ieee802154/nl-phy.c:200:6: note: Assuming 'msg' is non-null if (!msg) ^~~~ net/ieee802154/nl-phy.c:200:2: note: Taking false branch if (!msg) ^ net/ieee802154/nl-phy.c:203:6: note: Assuming pointer value is null if (info->attrs[IEEE802154_ATTR_HW_ADDR] && ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ net/ieee802154/nl-phy.c:203:43: note: Left side of '&&' is false if (info->attrs[IEEE802154_ATTR_HW_ADDR] && ^ net/ieee802154/nl-phy.c:210:6: note: Assuming the condition is false if (info->attrs[IEEE802154_ATTR_DEV_TYPE]) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ net/ieee802154/nl-phy.c:210:2: note: Taking false branch if (info->attrs[IEEE802154_ATTR_DEV_TYPE]) { ^ net/ieee802154/nl-phy.c:220:6: note: Calling 'IS_ERR' if (IS_ERR(dev)) { ^~~~~~~~~~~ include/linux/err.h:36:9: note: Assuming the condition is false return IS_ERR_VALUE((unsigned long)ptr); ^ include/linux/err.h:22:34: note: expanded from macro 'IS_ERR_VALUE' #define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO) vim +/ret +175 drivers/net/phy/adin1100.c 4c69cc969ad7ae Alexandru Ardelean 2021-10-11 153 4c69cc969ad7ae Alexandru Ardelean 2021-10-11 154 static int adin_config_aneg(struct phy_device *phydev) 4c69cc969ad7ae Alexandru Ardelean 2021-10-11 155 { 4c69cc969ad7ae Alexandru Ardelean 2021-10-11 156 struct adin_priv *priv = phydev->priv; 4c69cc969ad7ae Alexandru Ardelean 2021-10-11 157 int ret; 4c69cc969ad7ae Alexandru Ardelean 2021-10-11 158 4c69cc969ad7ae Alexandru Ardelean 2021-10-11 159 /* No sense to continue if auto-neg is disabled, 4c69cc969ad7ae Alexandru Ardelean 2021-10-11 160 * only one link-mode supported. 4c69cc969ad7ae Alexandru Ardelean 2021-10-11 161 */ 4c69cc969ad7ae Alexandru Ardelean 2021-10-11 162 if (phydev->autoneg == AUTONEG_DISABLE) 4c69cc969ad7ae Alexandru Ardelean 2021-10-11 163 return 0; 4c69cc969ad7ae Alexandru Ardelean 2021-10-11 164 7ccab017f2bbf3 Alexandru Tachici 2021-10-11 165 switch (phydev->master_slave_set) { 7ccab017f2bbf3 Alexandru Tachici 2021-10-11 166 case MASTER_SLAVE_CFG_MASTER_FORCE: 7ccab017f2bbf3 Alexandru Tachici 2021-10-11 167 case MASTER_SLAVE_CFG_SLAVE_FORCE: 7ccab017f2bbf3 Alexandru Tachici 2021-10-11 168 ret = phy_set_bits_mmd(phydev, MDIO_MMD_AN, MDIO_AN_T1_ADV_L, 7ccab017f2bbf3 Alexandru Tachici 2021-10-11 169 MDIO_AN_T1_ADV_L_FORCE_MS); 7ccab017f2bbf3 Alexandru Tachici 2021-10-11 170 if (ret < 0) 7ccab017f2bbf3 Alexandru Tachici 2021-10-11 171 return ret; 7ccab017f2bbf3 Alexandru Tachici 2021-10-11 172 break; 7ccab017f2bbf3 Alexandru Tachici 2021-10-11 173 case MASTER_SLAVE_CFG_MASTER_PREFERRED: 7ccab017f2bbf3 Alexandru Tachici 2021-10-11 174 case MASTER_SLAVE_CFG_SLAVE_PREFERRED: 7ccab017f2bbf3 Alexandru Tachici 2021-10-11 @175 ret = phy_clear_bits_mmd(phydev, MDIO_MMD_AN, MDIO_AN_T1_ADV_L, 7ccab017f2bbf3 Alexandru Tachici 2021-10-11 176 MDIO_AN_T1_ADV_L_FORCE_MS); 7ccab017f2bbf3 Alexandru Tachici 2021-10-11 177 break; 7ccab017f2bbf3 Alexandru Tachici 2021-10-11 178 default: 7ccab017f2bbf3 Alexandru Tachici 2021-10-11 179 break; 7ccab017f2bbf3 Alexandru Tachici 2021-10-11 180 } 7ccab017f2bbf3 Alexandru Tachici 2021-10-11 181 7ccab017f2bbf3 Alexandru Tachici 2021-10-11 182 switch (phydev->master_slave_set) { 7ccab017f2bbf3 Alexandru Tachici 2021-10-11 183 case MASTER_SLAVE_CFG_MASTER_FORCE: 7ccab017f2bbf3 Alexandru Tachici 2021-10-11 184 case MASTER_SLAVE_CFG_MASTER_PREFERRED: 7ccab017f2bbf3 Alexandru Tachici 2021-10-11 185 ret = phy_set_bits_mmd(phydev, MDIO_MMD_AN, MDIO_AN_T1_ADV_M, MDIO_AN_T1_ADV_M_MST); 7ccab017f2bbf3 Alexandru Tachici 2021-10-11 186 if (ret < 0) 7ccab017f2bbf3 Alexandru Tachici 2021-10-11 187 return ret; 7ccab017f2bbf3 Alexandru Tachici 2021-10-11 188 break; 7ccab017f2bbf3 Alexandru Tachici 2021-10-11 189 case MASTER_SLAVE_CFG_SLAVE_FORCE: 7ccab017f2bbf3 Alexandru Tachici 2021-10-11 190 case MASTER_SLAVE_CFG_SLAVE_PREFERRED: 7ccab017f2bbf3 Alexandru Tachici 2021-10-11 191 ret = phy_clear_bits_mmd(phydev, MDIO_MMD_AN, MDIO_AN_T1_ADV_M, 7ccab017f2bbf3 Alexandru Tachici 2021-10-11 192 MDIO_AN_T1_ADV_M_MST); 7ccab017f2bbf3 Alexandru Tachici 2021-10-11 193 if (ret < 0) 7ccab017f2bbf3 Alexandru Tachici 2021-10-11 194 return ret; 7ccab017f2bbf3 Alexandru Tachici 2021-10-11 195 break; 7ccab017f2bbf3 Alexandru Tachici 2021-10-11 196 default: 7ccab017f2bbf3 Alexandru Tachici 2021-10-11 197 break; 7ccab017f2bbf3 Alexandru Tachici 2021-10-11 198 } 7ccab017f2bbf3 Alexandru Tachici 2021-10-11 199 4c69cc969ad7ae Alexandru Ardelean 2021-10-11 200 /* Request increased transmit level from LP. */ 4c69cc969ad7ae Alexandru Ardelean 2021-10-11 201 if (priv->tx_level_prop_present && priv->tx_level_2v4) { 4c69cc969ad7ae Alexandru Ardelean 2021-10-11 202 ret = phy_set_bits_mmd(phydev, MDIO_MMD_AN, MDIO_AN_T1_ADV_H, 4c69cc969ad7ae Alexandru Ardelean 2021-10-11 203 MDIO_AN_T1_ADV_H_10L_TX_HI | 4c69cc969ad7ae Alexandru Ardelean 2021-10-11 204 MDIO_AN_T1_ADV_H_10L_TX_HI_REQ); 4c69cc969ad7ae Alexandru Ardelean 2021-10-11 205 if (ret < 0) 4c69cc969ad7ae Alexandru Ardelean 2021-10-11 206 return ret; 4c69cc969ad7ae Alexandru Ardelean 2021-10-11 207 } 4c69cc969ad7ae Alexandru Ardelean 2021-10-11 208 4c69cc969ad7ae Alexandru Ardelean 2021-10-11 209 /* Disable 2.4 Vpp transmit level. */ 4c69cc969ad7ae Alexandru Ardelean 2021-10-11 210 if ((priv->tx_level_prop_present && !priv->tx_level_2v4) || !priv->tx_level_2v4_able) { 4c69cc969ad7ae Alexandru Ardelean 2021-10-11 211 ret = phy_clear_bits_mmd(phydev, MDIO_MMD_AN, MDIO_AN_T1_ADV_H, 4c69cc969ad7ae Alexandru Ardelean 2021-10-11 212 MDIO_AN_T1_ADV_H_10L_TX_HI | 4c69cc969ad7ae Alexandru Ardelean 2021-10-11 213 MDIO_AN_T1_ADV_H_10L_TX_HI_REQ); 4c69cc969ad7ae Alexandru Ardelean 2021-10-11 214 if (ret < 0) 4c69cc969ad7ae Alexandru Ardelean 2021-10-11 215 return ret; 4c69cc969ad7ae Alexandru Ardelean 2021-10-11 216 } 4c69cc969ad7ae Alexandru Ardelean 2021-10-11 217 4c69cc969ad7ae Alexandru Ardelean 2021-10-11 218 return phy_set_bits_mmd(phydev, MDIO_MMD_AN, MDIO_AN_T1_CTRL, BMCR_ANRESTART); 4c69cc969ad7ae Alexandru Ardelean 2021-10-11 219 } 4c69cc969ad7ae Alexandru Ardelean 2021-10-11 220 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/[email protected]
.config.gz
Description: application/gzip
_______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
