From: kernel test robot <lkp@intel.com>
To: Christian Marangi <ansuelsmth@gmail.com>,
Andrew Lunn <andrew@lunn.ch>,
Florian Fainelli <f.fainelli@gmail.com>,
Vladimir Oltean <olteanv@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, upstream@airoha.com
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
netdev@vger.kernel.org
Subject: Re: [net-next PATCH v3 3/3] net: phy: Add Airoha AN8855 Internal Switch Gigabit PHY
Date: Thu, 7 Nov 2024 10:37:32 +0800 [thread overview]
Message-ID: <202411071000.uL10bu3r-lkp@intel.com> (raw)
In-Reply-To: <20241106122254.13228-4-ansuelsmth@gmail.com>
Hi Christian,
kernel test robot noticed the following build warnings:
[auto build test WARNING on net-next/main]
url: https://github.com/intel-lab-lkp/linux/commits/Christian-Marangi/dt-bindings-net-dsa-Add-Airoha-AN8855-Gigabit-Switch-documentation/20241106-203624
base: net-next/main
patch link: https://lore.kernel.org/r/20241106122254.13228-4-ansuelsmth%40gmail.com
patch subject: [net-next PATCH v3 3/3] net: phy: Add Airoha AN8855 Internal Switch Gigabit PHY
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20241107/202411071000.uL10bu3r-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/20241107/202411071000.uL10bu3r-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/202411071000.uL10bu3r-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from drivers/net/phy/air_an8855.c:6:
In file included from include/linux/phy.h:16:
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:2213:
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/air_an8855.c:137:6: warning: variable 'val' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
137 | if (saved_page >= 0)
| ^~~~~~~~~~~~~~~
drivers/net/phy/air_an8855.c:139:45: note: uninitialized use occurs here
139 | ret = phy_restore_page(phydev, saved_page, val);
| ^~~
drivers/net/phy/air_an8855.c:137:2: note: remove the 'if' if its condition is always true
137 | if (saved_page >= 0)
| ^~~~~~~~~~~~~~~~~~~~
138 | val = __phy_read(phydev, AN8855_PHY_EXT_REG_14);
drivers/net/phy/air_an8855.c:133:9: note: initialize the variable 'val' to silence this warning
133 | int val;
| ^
| = 0
>> drivers/net/phy/air_an8855.c:155:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
155 | if (saved_page >= 0) {
| ^~~~~~~~~~~~~~~
drivers/net/phy/air_an8855.c:164:46: note: uninitialized use occurs here
164 | return phy_restore_page(phydev, saved_page, ret);
| ^~~
drivers/net/phy/air_an8855.c:155:2: note: remove the 'if' if its condition is always true
155 | if (saved_page >= 0) {
| ^~~~~~~~~~~~~~~~~~~~
drivers/net/phy/air_an8855.c:152:9: note: initialize the variable 'ret' to silence this warning
152 | int ret;
| ^
| = 0
6 warnings generated.
vim +137 drivers/net/phy/air_an8855.c
129
130 static int an8855_get_downshift(struct phy_device *phydev, u8 *data)
131 {
132 int saved_page;
133 int val;
134 int ret;
135
136 saved_page = phy_select_page(phydev, AN8855_PHY_PAGE_EXTENDED_1);
> 137 if (saved_page >= 0)
138 val = __phy_read(phydev, AN8855_PHY_EXT_REG_14);
139 ret = phy_restore_page(phydev, saved_page, val);
140 if (ret)
141 return ret;
142
143 *data = val & AN8855_PHY_EXT_REG_14 ? DOWNSHIFT_DEV_DEFAULT_COUNT :
144 DOWNSHIFT_DEV_DISABLE;
145
146 return 0;
147 }
148
149 static int an8855_set_downshift(struct phy_device *phydev, u8 cnt)
150 {
151 int saved_page;
152 int ret;
153
154 saved_page = phy_select_page(phydev, AN8855_PHY_PAGE_EXTENDED_1);
> 155 if (saved_page >= 0) {
156 if (cnt != DOWNSHIFT_DEV_DISABLE)
157 ret = __phy_set_bits(phydev, AN8855_PHY_EXT_REG_14,
158 AN8855_PHY_EN_DOWN_SHFIT);
159 else
160 ret = __phy_clear_bits(phydev, AN8855_PHY_EXT_REG_14,
161 AN8855_PHY_EN_DOWN_SHFIT);
162 }
163
164 return phy_restore_page(phydev, saved_page, ret);
165 }
166
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2024-11-07 2:40 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-06 12:22 [net-next PATCH v3 0/3] net: dsa: Add Airoha AN8855 support Christian Marangi
2024-11-06 12:22 ` [net-next PATCH v3 1/3] dt-bindings: net: dsa: Add Airoha AN8855 Gigabit Switch documentation Christian Marangi
2024-11-06 12:22 ` [net-next PATCH v3 2/3] net: dsa: Add Airoha AN8855 5-Port Gigabit DSA Switch driver Christian Marangi
2024-11-07 17:53 ` Christophe JAILLET
2024-11-07 19:36 ` Andrew Lunn
2024-11-08 10:32 ` Christian Marangi
2024-11-08 10:51 ` Russell King (Oracle)
2024-11-06 12:22 ` [net-next PATCH v3 3/3] net: phy: Add Airoha AN8855 Internal Switch Gigabit PHY Christian Marangi
2024-11-06 14:54 ` Maxime Chevallier
2024-11-06 18:04 ` Christian Marangi
2024-11-06 16:19 ` Andrew Lunn
2024-11-06 18:11 ` Christian Marangi
2024-11-07 2:37 ` kernel test robot [this message]
2024-11-08 11:09 ` Russell King (Oracle)
2024-11-08 13:09 ` Christian Marangi
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=202411071000.uL10bu3r-lkp@intel.com \
--to=lkp@intel.com \
--cc=andrew@lunn.ch \
--cc=angelogioacchino.delregno@collabora.com \
--cc=ansuelsmth@gmail.com \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=krzk@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux@armlinux.org.uk \
--cc=llvm@lists.linux.dev \
--cc=matthias.bgg@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=robh@kernel.org \
--cc=upstream@airoha.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.