[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202412181638.7XsHSwtp-lkp@intel.com>
Date: Wed, 18 Dec 2024 16:32:50 +0800
From: kernel test robot <lkp@...el.com>
To: Dimitri Fedrau <dima.fedrau@...il.com>, Andrew Lunn <andrew@...n.ch>,
Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
Dimitri Fedrau <dima.fedrau@...il.com>
Subject: Re: [PATCH net-next] net: phy: dp83822: Add support for PHY LEDs on
DP83822
Hi Dimitri,
kernel test robot noticed the following build warnings:
[auto build test WARNING on a14a429069bb1a18eb9fe63d68fcaa77dffe0e23]
url: https://github.com/intel-lab-lkp/linux/commits/Dimitri-Fedrau/net-phy-dp83822-Add-support-for-PHY-LEDs-on-DP83822/20241217-172305
base: a14a429069bb1a18eb9fe63d68fcaa77dffe0e23
patch link: https://lore.kernel.org/r/20241217-dp83822-leds-v1-1-800b24461013%40gmail.com
patch subject: [PATCH net-next] net: phy: dp83822: Add support for PHY LEDs on DP83822
config: x86_64-buildonly-randconfig-002-20241218 (https://download.01.org/0day-ci/archive/20241218/202412181638.7XsHSwtp-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241218/202412181638.7XsHSwtp-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202412181638.7XsHSwtp-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from drivers/net/phy/dp83822.c:7:
In file included from include/linux/ethtool.h:18:
In file included from include/linux/if_ether.h:19:
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:8:
In file included from include/linux/cacheflush.h:5:
In file included from arch/x86/include/asm/cacheflush.h:5:
In file included from include/linux/mm.h:2223:
include/linux/vmstat.h:504:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
504 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
505 | item];
| ~~~~
include/linux/vmstat.h:511:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
511 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
512 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
518 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
include/linux/vmstat.h:524:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
524 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
525 | NR_VM_NUMA_EVENT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/phy/dp83822.c:1029:39: warning: use of logical '||' with constant operand [-Wconstant-logical-operand]
1029 | if (index == DP83822_LED_INDEX_LED_0 || DP83822_LED_INDEX_COL_GPIO2) {
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/phy/dp83822.c:1029:39: note: use '|' for a bitwise operation
1029 | if (index == DP83822_LED_INDEX_LED_0 || DP83822_LED_INDEX_COL_GPIO2) {
| ^~
| |
5 warnings generated.
vim +1029 drivers/net/phy/dp83822.c
1023
1024 static int dp83822_led_hw_control_get(struct phy_device *phydev, u8 index,
1025 unsigned long *rules)
1026 {
1027 int val;
1028
> 1029 if (index == DP83822_LED_INDEX_LED_0 || DP83822_LED_INDEX_COL_GPIO2) {
1030 val = phy_read_mmd(phydev, MDIO_MMD_VEND2, MII_DP83822_MLEDCR);
1031 if (val < 0)
1032 return val;
1033
1034 val = FIELD_GET(DP83822_MLEDCR_CFG, val);
1035 } else {
1036 val = phy_read_mmd(phydev, MDIO_MMD_VEND2, MII_DP83822_LEDCFG1);
1037 if (val < 0)
1038 return val;
1039
1040 if (index == DP83822_LED_INDEX_LED_1_GPIO1)
1041 val = FIELD_GET(DP83822_LEDCFG1_LED1_CTRL, val);
1042 else
1043 val = FIELD_GET(DP83822_LEDCFG1_LED3_CTRL, val);
1044 }
1045
1046 switch (val) {
1047 case DP83822_LED_FN_LINK:
1048 *rules = BIT(TRIGGER_NETDEV_LINK);
1049 break;
1050 case DP83822_LED_FN_LINK_10_BT:
1051 *rules = BIT(TRIGGER_NETDEV_LINK_10);
1052 break;
1053 case DP83822_LED_FN_LINK_100_BTX:
1054 *rules = BIT(TRIGGER_NETDEV_LINK_100);
1055 break;
1056 case DP83822_LED_FN_FULL_DUPLEX:
1057 *rules = BIT(TRIGGER_NETDEV_FULL_DUPLEX);
1058 break;
1059 case DP83822_LED_FN_TX:
1060 *rules = BIT(TRIGGER_NETDEV_TX);
1061 break;
1062 case DP83822_LED_FN_RX:
1063 *rules = BIT(TRIGGER_NETDEV_RX);
1064 break;
1065 case DP83822_LED_FN_RX_TX:
1066 *rules = BIT(TRIGGER_NETDEV_TX) | BIT(TRIGGER_NETDEV_RX);
1067 break;
1068 case DP83822_LED_FN_RX_TX_ERR:
1069 *rules = BIT(TRIGGER_NETDEV_TX_ERR) | BIT(TRIGGER_NETDEV_RX_ERR);
1070 break;
1071 case DP83822_LED_FN_LINK_RX_TX:
1072 *rules = BIT(TRIGGER_NETDEV_LINK) | BIT(TRIGGER_NETDEV_TX) |
1073 BIT(TRIGGER_NETDEV_RX);
1074 break;
1075 default:
1076 *rules = 0;
1077 break;
1078 }
1079
1080 return 0;
1081 }
1082
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists