From: kernel test robot <lkp@intel.com>
To: Dimitri Fedrau <dima.fedrau@gmail.com>,
Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Dimitri Fedrau <dima.fedrau@gmail.com>
Subject: Re: [PATCH net-next] net: phy: dp83822: Add support for PHY LEDs on DP83822
Date: Wed, 18 Dec 2024 16:32:50 +0800 [thread overview]
Message-ID: <202412181638.7XsHSwtp-lkp@intel.com> (raw)
In-Reply-To: <20241217-dp83822-leds-v1-1-800b24461013@gmail.com>
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@intel.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
prev parent reply other threads:[~2024-12-18 8:33 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-17 9:16 [PATCH net-next] net: phy: dp83822: Add support for PHY LEDs on DP83822 Dimitri Fedrau
2024-12-17 16:32 ` Simon Horman
2024-12-17 17:54 ` Dimitri Fedrau
2024-12-17 17:13 ` Andrew Lunn
2024-12-17 17:59 ` Dimitri Fedrau
2024-12-18 17:13 ` Andrew Lunn
2024-12-18 8:54 ` Dimitri Fedrau
2024-12-18 17:16 ` Andrew Lunn
2024-12-18 18:17 ` Dimitri Fedrau
2024-12-18 20:19 ` Andrew Lunn
2024-12-18 20:44 ` Dimitri Fedrau
2024-12-18 8:32 ` kernel test robot [this message]
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=202412181638.7XsHSwtp-lkp@intel.com \
--to=lkp@intel.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=dima.fedrau@gmail.com \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=llvm@lists.linux.dev \
--cc=netdev@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pabeni@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.