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
Subject: Re: [PATCH net-next v7 3/3] net: dsa: yt921x: Add support for Motorcomm YT921x
Date: Sat, 6 Sep 2025 22:55:27 +0800	[thread overview]
Message-ID: <202509062201.7oDUWUsM-lkp@intel.com> (raw)

:::::: 
:::::: Manual check reason: "__compiletime_assert_NNN"
:::::: 

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20250905181728.3169479-4-mmyangfl@gmail.com>
References: <20250905181728.3169479-4-mmyangfl@gmail.com>
TO: David Yang <mmyangfl@gmail.com>
TO: netdev@vger.kernel.org
CC: David Yang <mmyangfl@gmail.com>
CC: Andrew Lunn <andrew@lunn.ch>
CC: Vladimir Oltean <olteanv@gmail.com>
CC: Eric Dumazet <edumazet@google.com>
CC: Jakub Kicinski <kuba@kernel.org>
CC: Paolo Abeni <pabeni@redhat.com>
CC: Rob Herring <robh@kernel.org>
CC: Krzysztof Kozlowski <krzk@kernel.org>
CC: Conor Dooley <conor+dt@kernel.org>
CC: Simon Horman <horms@kernel.org>
CC: Russell King <linux@armlinux.org.uk>
CC: devicetree@vger.kernel.org
CC: linux-kernel@vger.kernel.org

Hi David,

kernel test robot noticed the following build errors:

[auto build test ERROR on net/main]
[also build test ERROR on linus/master v6.17-rc4 next-20250905]
[cannot apply to net-next/main horms-ipvs/master]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/David-Yang/dt-bindings-net-dsa-yt921x-Add-Motorcomm-YT921x-switch-support/20250906-021942
base:   net/main
patch link:    https://lore.kernel.org/r/20250905181728.3169479-4-mmyangfl%40gmail.com
patch subject: [PATCH net-next v7 3/3] net: dsa: yt921x: Add support for Motorcomm YT921x
:::::: branch date: 20 hours ago
:::::: commit date: 20 hours ago
config: arm64-randconfig-r111-20250906 (https://download.01.org/0day-ci/archive/20250906/202509062201.7oDUWUsM-lkp@intel.com/config)
compiler: clang version 16.0.6 (https://github.com/llvm/llvm-project 7cbf1a2591520c2491aa35339f227775f4d3adf6)
reproduce: (https://download.01.org/0day-ci/archive/20250906/202509062201.7oDUWUsM-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/r/202509062201.7oDUWUsM-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/net/dsa/yt921x.c:1045:17: warning: unused variable 'dev' [-Wunused-variable]
           struct device *dev = to_device(priv);
                          ^
   drivers/net/dsa/yt921x.c:1110:17: warning: unused variable 'dev' [-Wunused-variable]
           struct device *dev = to_device(priv);
                          ^
   drivers/net/dsa/yt921x.c:1161:17: warning: unused variable 'dev' [-Wunused-variable]
           struct device *dev = to_device(priv);
                          ^
   drivers/net/dsa/yt921x.c:1579:17: warning: unused variable 'dev' [-Wunused-variable]
           struct device *dev = to_device(priv);
                          ^
   drivers/net/dsa/yt921x.c:1611:17: warning: unused variable 'dev' [-Wunused-variable]
           struct device *dev = to_device(priv);
                          ^
   drivers/net/dsa/yt921x.c:1636:17: warning: unused variable 'dev' [-Wunused-variable]
           struct device *dev = to_device(priv);
                          ^
   drivers/net/dsa/yt921x.c:1651:17: warning: unused variable 'dev' [-Wunused-variable]
           struct device *dev = to_device(priv);
                          ^
   drivers/net/dsa/yt921x.c:1668:17: warning: unused variable 'dev' [-Wunused-variable]
           struct device *dev = to_device(priv);
                          ^
   drivers/net/dsa/yt921x.c:1686:17: warning: unused variable 'dev' [-Wunused-variable]
           struct device *dev = to_device(priv);
                          ^
   drivers/net/dsa/yt921x.c:1849:17: warning: unused variable 'dev' [-Wunused-variable]
           struct device *dev = to_device(priv);
                          ^
   drivers/net/dsa/yt921x.c:1867:17: warning: unused variable 'dev' [-Wunused-variable]
           struct device *dev = to_device(priv);
                          ^
   drivers/net/dsa/yt921x.c:1900:17: warning: unused variable 'dev' [-Wunused-variable]
           struct device *dev = to_device(priv);
                          ^
   drivers/net/dsa/yt921x.c:2148:17: warning: unused variable 'dev' [-Wunused-variable]
           struct device *dev = to_device(priv);
                          ^
   drivers/net/dsa/yt921x.c:2187:17: warning: unused variable 'dev' [-Wunused-variable]
           struct device *dev = to_device(priv);
                          ^
   drivers/net/dsa/yt921x.c:2259:2: warning: variable 'ctrl' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized]
           default:
           ^~~~~~~
   drivers/net/dsa/yt921x.c:2269:2: note: uninitialized use occurs here
           ctrl |= YT921X_PORT_RX_MAC_EN | YT921X_PORT_TX_MAC_EN;
           ^~~~
   drivers/net/dsa/yt921x.c:2240:10: note: initialize the variable 'ctrl' to silence this warning
           u32 ctrl;
                   ^
                    = 0
   drivers/net/dsa/yt921x.c:2390:3: warning: variable 'ctrl' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized]
                   default:
                   ^~~~~~~
   drivers/net/dsa/yt921x.c:2395:17: note: uninitialized use occurs here
                                                mask, ctrl);
                                                      ^~~~
   drivers/net/dsa/yt921x.c:2348:10: note: initialize the variable 'ctrl' to silence this warning
           u32 ctrl;
                   ^
                    = 0
   drivers/net/dsa/yt921x.c:2557:17: warning: unused variable 'dev' [-Wunused-variable]
           struct device *dev = to_device(priv);
                          ^
>> drivers/net/dsa/yt921x.c:1712:10: error: call to '__compiletime_assert_1340' declared with 'error' attribute: FIELD_PREP: value too large for the field
                   ctrl = YT921X_PORT_VLAN_CTRL_CVID(pvid);
                          ^
   drivers/net/dsa/yt921x.h:363:43: note: expanded from macro 'YT921X_PORT_VLAN_CTRL_CVID'
   #define   YT921X_PORT_VLAN_CTRL_CVID(x)                 FIELD_PREP(YT921X_PORT_VLAN_CTRL_CVID_M, (x))
                                                           ^
   include/linux/bitfield.h:115:3: note: expanded from macro 'FIELD_PREP'
                   __BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: ");    \
                   ^
   include/linux/bitfield.h:68:3: note: expanded from macro '__BF_FIELD_CHECK'
                   BUILD_BUG_ON_MSG(__builtin_constant_p(_val) ?           \
                   ^
   note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/compiler_types.h:560:2: note: expanded from macro '_compiletime_assert'
           __compiletime_assert(condition, msg, prefix, suffix)
           ^
   include/linux/compiler_types.h:553:4: note: expanded from macro '__compiletime_assert'
                           prefix ## suffix();                             \
                           ^
   <scratch space>:15:1: note: expanded from here
   __compiletime_assert_1340
   ^
   17 warnings and 1 error generated.


vim +1712 drivers/net/dsa/yt921x.c

aa100a55442187 David Yang 2025-09-06  1696  
aa100a55442187 David Yang 2025-09-06  1697  static int
aa100a55442187 David Yang 2025-09-06  1698  yt921x_vlan_filtering(struct yt921x_priv *priv, int port, bool vlan_filtering)
aa100a55442187 David Yang 2025-09-06  1699  {
aa100a55442187 David Yang 2025-09-06  1700  	struct dsa_switch *ds = &priv->ds;
aa100a55442187 David Yang 2025-09-06  1701  	struct dsa_port *dp = dsa_to_port(ds, port);
aa100a55442187 David Yang 2025-09-06  1702  	u16 pvid;
aa100a55442187 David Yang 2025-09-06  1703  	u32 mask;
aa100a55442187 David Yang 2025-09-06  1704  	u32 ctrl;
aa100a55442187 David Yang 2025-09-06  1705  	int res;
aa100a55442187 David Yang 2025-09-06  1706  
aa100a55442187 David Yang 2025-09-06  1707  	mask = YT921X_PORT_VLAN_CTRL_CVID_M;
aa100a55442187 David Yang 2025-09-06  1708  	if (!vlan_filtering || !dp->bridge) {
aa100a55442187 David Yang 2025-09-06  1709  		ctrl = YT921X_PORT_VLAN_CTRL_CVID(YT921X_VID_UNWARE);
aa100a55442187 David Yang 2025-09-06  1710  	} else {
aa100a55442187 David Yang 2025-09-06  1711  		br_vlan_get_pvid(dp->bridge->dev, &pvid);
aa100a55442187 David Yang 2025-09-06 @1712  		ctrl = YT921X_PORT_VLAN_CTRL_CVID(pvid);
aa100a55442187 David Yang 2025-09-06  1713  	}
aa100a55442187 David Yang 2025-09-06  1714  	res = yt921x_reg_update_bits(priv, YT921X_PORTn_VLAN_CTRL(port),
aa100a55442187 David Yang 2025-09-06  1715  				     mask, ctrl);
aa100a55442187 David Yang 2025-09-06  1716  	if (res)
aa100a55442187 David Yang 2025-09-06  1717  		return res;
aa100a55442187 David Yang 2025-09-06  1718  
aa100a55442187 David Yang 2025-09-06  1719  	mask = YT921X_PORT_VLAN_CTRL1_CVLAN_DROP_TAGGED |
aa100a55442187 David Yang 2025-09-06  1720  	       YT921X_PORT_VLAN_CTRL1_CVLAN_DROP_UNTAGGED;
aa100a55442187 David Yang 2025-09-06  1721  	ctrl = 0;
aa100a55442187 David Yang 2025-09-06  1722  	if (vlan_filtering) {
aa100a55442187 David Yang 2025-09-06  1723  		/* Do not drop tagged frames here; let VLAN_IGR_FILTER do it */
aa100a55442187 David Yang 2025-09-06  1724  		if (!pvid)
aa100a55442187 David Yang 2025-09-06  1725  			ctrl |= YT921X_PORT_VLAN_CTRL1_CVLAN_DROP_UNTAGGED;
aa100a55442187 David Yang 2025-09-06  1726  	}
aa100a55442187 David Yang 2025-09-06  1727  	res = yt921x_reg_update_bits(priv, YT921X_PORTn_VLAN_CTRL1(port),
aa100a55442187 David Yang 2025-09-06  1728  				     mask, ctrl);
aa100a55442187 David Yang 2025-09-06  1729  	if (res)
aa100a55442187 David Yang 2025-09-06  1730  		return res;
aa100a55442187 David Yang 2025-09-06  1731  
aa100a55442187 David Yang 2025-09-06  1732  	res = yt921x_reg_toggle_bits(priv, YT921X_VLAN_IGR_FILTER,
aa100a55442187 David Yang 2025-09-06  1733  				     YT921X_VLAN_IGR_FILTER_PORTn(port),
aa100a55442187 David Yang 2025-09-06  1734  				     vlan_filtering);
aa100a55442187 David Yang 2025-09-06  1735  	if (res)
aa100a55442187 David Yang 2025-09-06  1736  		return res;
aa100a55442187 David Yang 2025-09-06  1737  
aa100a55442187 David Yang 2025-09-06  1738  	/* Turn on / off VLAN awareness */
aa100a55442187 David Yang 2025-09-06  1739  	mask = YT921X_PORT_IGR_TPIDn_CTAG_M;
aa100a55442187 David Yang 2025-09-06  1740  	if (!vlan_filtering)
aa100a55442187 David Yang 2025-09-06  1741  		ctrl = 0;
aa100a55442187 David Yang 2025-09-06  1742  	else
aa100a55442187 David Yang 2025-09-06  1743  		ctrl = YT921X_PORT_IGR_TPIDn_CTAG(0);
aa100a55442187 David Yang 2025-09-06  1744  	res = yt921x_reg_update_bits(priv, YT921X_PORTn_IGR_TPID(port),
aa100a55442187 David Yang 2025-09-06  1745  				     mask, ctrl);
aa100a55442187 David Yang 2025-09-06  1746  	if (res)
aa100a55442187 David Yang 2025-09-06  1747  		return res;
aa100a55442187 David Yang 2025-09-06  1748  
aa100a55442187 David Yang 2025-09-06  1749  	return 0;
aa100a55442187 David Yang 2025-09-06  1750  }
aa100a55442187 David Yang 2025-09-06  1751  

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

             reply	other threads:[~2025-09-06 14:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-06 14:55 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-09-05 18:17 [PATCH net-next v7 0/3] net: dsa: yt921x: Add support for Motorcomm YT921x David Yang
2025-09-05 18:17 ` [PATCH net-next v7 3/3] " David Yang
2025-09-06  8:19   ` kernel test robot
2025-09-08 13:00   ` Andrew Lunn
2025-09-08 13:10     ` Yangfl
2025-09-08 13:30       ` Andrew Lunn

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=202509062201.7oDUWUsM-lkp@intel.com \
    --to=lkp@intel.com \
    --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.