All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Julia Lawall <julia.lawall@inria.fr>
Subject: [frank-w-bpi-r2-4.14:6.19-as21_192 144/144] drivers/net/phy/phylink.c:1022:32-35: ERROR: invalid reference to the index variable of the iterator on line 1011
Date: Mon, 09 Feb 2026 01:42:49 +0800	[thread overview]
Message-ID: <202602090100.W0vMAD7F-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: Frank Wunderlich <frank-w@public-files.de>

tree:   https://github.com/frank-w/BPI-R2-4.14 6.19-as21_192
head:   a16f3f4d09f2d008300fd2068475d5a12c3df8eb
commit: 1b3aeabfc8d801de4b51f4b902d30a50decb31e2 [144/144] net: phylink: introduce internal phylink PCS handling
:::::: branch date: 2 days ago
:::::: commit date: 8 weeks ago
config: csky-randconfig-r053-20260208 (https://download.01.org/0day-ci/archive/20260209/202602090100.W0vMAD7F-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 15.2.0

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>
| Reported-by: Julia Lawall <julia.lawall@inria.fr>
| Closes: https://lore.kernel.org/r/202602090100.W0vMAD7F-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> drivers/net/phy/phylink.c:1022:32-35: ERROR: invalid reference to the index variable of the iterator on line 1011
   drivers/net/phy/phylink.c:1342:26-29: ERROR: invalid reference to the index variable of the iterator on line 1324
   drivers/net/phy/phylink.c:580:7-10: ERROR: invalid reference to the index variable of the iterator on line 567

vim +1022 drivers/net/phy/phylink.c

e9f03a6a879bff Russell King (Oracle  2025-02-10   996) 
df874f9e52c340 Russell King (Oracle  2024-12-03   997) /* Query inband for a specific interface mode, asking the MAC for the
df874f9e52c340 Russell King (Oracle  2024-12-03   998)  * PCS which will be used to handle the interface mode.
df874f9e52c340 Russell King (Oracle  2024-12-03   999)  */
df874f9e52c340 Russell King (Oracle  2024-12-03  1000) static unsigned int phylink_inband_caps(struct phylink *pl,
df874f9e52c340 Russell King (Oracle  2024-12-03  1001) 					 phy_interface_t interface)
df874f9e52c340 Russell King (Oracle  2024-12-03  1002) {
df874f9e52c340 Russell King (Oracle  2024-12-03  1003) 	struct phylink_pcs *pcs;
1b3aeabfc8d801 Christian Marangi     2025-04-07  1004  	bool pcs_found = false;
df874f9e52c340 Russell King (Oracle  2024-12-03  1005) 
1b3aeabfc8d801 Christian Marangi     2025-04-07  1006  	if (pl->mac_ops->mac_select_pcs) {
1b3aeabfc8d801 Christian Marangi     2025-04-07  1007  		pcs = pl->mac_ops->mac_select_pcs(pl->config,
1b3aeabfc8d801 Christian Marangi     2025-04-07  1008  						  interface);
1b3aeabfc8d801 Christian Marangi     2025-04-07  1009  		pcs_found = !!pcs;
1b3aeabfc8d801 Christian Marangi     2025-04-07  1010  	} else {
1b3aeabfc8d801 Christian Marangi     2025-04-07 @1011  		list_for_each_entry(pcs, &pl->pcs_list, list) {
1b3aeabfc8d801 Christian Marangi     2025-04-07  1012  			if (!phylink_validate_pcs_interface(pcs, interface)) {
1b3aeabfc8d801 Christian Marangi     2025-04-07  1013  				pcs_found = true;
1b3aeabfc8d801 Christian Marangi     2025-04-07  1014  				break;
1b3aeabfc8d801 Christian Marangi     2025-04-07  1015  			}
1b3aeabfc8d801 Christian Marangi     2025-04-07  1016  		}
1b3aeabfc8d801 Christian Marangi     2025-04-07  1017  	}
df874f9e52c340 Russell King (Oracle  2024-12-03  1018) 
1b3aeabfc8d801 Christian Marangi     2025-04-07  1019  	if (!pcs_found)
df874f9e52c340 Russell King (Oracle  2024-12-03  1020) 		return 0;
df874f9e52c340 Russell King (Oracle  2024-12-03  1021) 
df874f9e52c340 Russell King (Oracle  2024-12-03 @1022) 	return phylink_pcs_inband_caps(pcs, interface);
df874f9e52c340 Russell King (Oracle  2024-12-03  1023) }
df874f9e52c340 Russell King (Oracle  2024-12-03  1024) 

:::::: The code at line 1022 was first introduced by commit
:::::: df874f9e52c340cc6f0a0014a97b778f67d46849 net: phylink: add pcs_inband_caps() method

:::::: TO: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
:::::: CC: Jakub Kicinski <kuba@kernel.org>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2026-02-08 17:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202602090100.W0vMAD7F-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=julia.lawall@inria.fr \
    --cc=oe-kbuild@lists.linux.dev \
    /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.