All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
Cc: oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH net-next 07/10] net: mvneta: convert to phylink EEE implementation
Date: Thu, 12 Dec 2024 08:54:49 +0800	[thread overview]
Message-ID: <202412120802.VcALKEWs-lkp@intel.com> (raw)
In-Reply-To: <E1tKefs-006SN1-PG@rmk-PC.armlinux.org.uk>

Hi Russell,

kernel test robot noticed the following build errors:

[auto build test ERROR on net-next/main]

url:    https://github.com/intel-lab-lkp/linux/commits/Russell-King-Oracle/net-mdio-add-definition-for-clock-stop-capable-bit/20241210-022608
base:   net-next/main
patch link:    https://lore.kernel.org/r/E1tKefs-006SN1-PG%40rmk-PC.armlinux.org.uk
patch subject: [PATCH net-next 07/10] net: mvneta: convert to phylink EEE implementation
config: arm-randconfig-002-20241210 (https://download.01.org/0day-ci/archive/20241212/202412120802.VcALKEWs-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241212/202412120802.VcALKEWs-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/202412120802.VcALKEWs-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from arch/arm/include/asm/ptrace.h:13,
                    from arch/arm/include/asm/irqflags.h:7,
                    from include/linux/irqflags.h:18,
                    from arch/arm/include/asm/bitops.h:28,
                    from include/linux/bitops.h:68,
                    from include/linux/kernel.h:23,
                    from include/linux/clk.h:13,
                    from drivers/net/ethernet/marvell/mvneta.c:14:
   In function 'u32_encode_bits',
       inlined from 'u32_replace_bits' at include/linux/bitfield.h:201:1,
       inlined from 'mvneta_mac_enable_tx_lpi' at drivers/net/ethernet/marvell/mvneta.c:4333:9:
>> include/linux/bitfield.h:178:17: error: call to '__field_overflow' declared with attribute error: value doesn't fit into mask
     178 |                 __field_overflow();                                     \
         |                 ^~~~~~~~~~~~~~~~~~
   include/linux/bitfield.h:198:9: note: in expansion of macro '____MAKE_OP'
     198 |         ____MAKE_OP(u##size,u##size,,)
         |         ^~~~~~~~~~~
   include/linux/bitfield.h:201:1: note: in expansion of macro '__MAKE_OP'
     201 | __MAKE_OP(32)
         | ^~~~~~~~~
   In function 'field_multiplier',
       inlined from 'field_mask' at include/linux/bitfield.h:171:17,
       inlined from 'u32_encode_bits' at include/linux/bitfield.h:201:1,
       inlined from 'u32_replace_bits' at include/linux/bitfield.h:201:1,
       inlined from 'mvneta_mac_enable_tx_lpi' at drivers/net/ethernet/marvell/mvneta.c:4333:9:
>> include/linux/bitfield.h:166:17: error: call to '__bad_mask' declared with attribute error: bad bitfield mask
     166 |                 __bad_mask();
         |                 ^~~~~~~~~~~~
   In function 'u32_encode_bits',
       inlined from 'u32_replace_bits' at include/linux/bitfield.h:201:1,
       inlined from 'mvneta_mac_enable_tx_lpi' at drivers/net/ethernet/marvell/mvneta.c:4333:9:
>> include/linux/bitfield.h:178:17: error: call to '__field_overflow' declared with attribute error: value doesn't fit into mask
     178 |                 __field_overflow();                                     \
         |                 ^~~~~~~~~~~~~~~~~~
   include/linux/bitfield.h:198:9: note: in expansion of macro '____MAKE_OP'
     198 |         ____MAKE_OP(u##size,u##size,,)
         |         ^~~~~~~~~~~
   include/linux/bitfield.h:201:1: note: in expansion of macro '__MAKE_OP'
     201 | __MAKE_OP(32)
         | ^~~~~~~~~
   In function 'field_multiplier',
       inlined from 'field_mask' at include/linux/bitfield.h:171:17,
       inlined from 'u32_encode_bits' at include/linux/bitfield.h:201:1,
       inlined from 'u32_replace_bits' at include/linux/bitfield.h:201:1,
       inlined from 'mvneta_mac_enable_tx_lpi' at drivers/net/ethernet/marvell/mvneta.c:4333:9:
>> include/linux/bitfield.h:166:17: error: call to '__bad_mask' declared with attribute error: bad bitfield mask
     166 |                 __bad_mask();
         |                 ^~~~~~~~~~~~
   In function 'field_multiplier',
       inlined from 'u32_encode_bits' at include/linux/bitfield.h:201:1,
       inlined from 'u32_replace_bits' at include/linux/bitfield.h:201:1,
       inlined from 'mvneta_mac_enable_tx_lpi' at drivers/net/ethernet/marvell/mvneta.c:4333:9:
>> include/linux/bitfield.h:166:17: error: call to '__bad_mask' declared with attribute error: bad bitfield mask
     166 |                 __bad_mask();
         |                 ^~~~~~~~~~~~
   In function 'field_multiplier',
       inlined from 'field_mask' at include/linux/bitfield.h:171:17,
       inlined from 'u32_encode_bits' at include/linux/bitfield.h:201:1,
       inlined from 'u32_replace_bits' at include/linux/bitfield.h:201:1,
       inlined from 'mvneta_mac_enable_tx_lpi' at drivers/net/ethernet/marvell/mvneta.c:4338:9:
>> include/linux/bitfield.h:166:17: error: call to '__bad_mask' declared with attribute error: bad bitfield mask
     166 |                 __bad_mask();
         |                 ^~~~~~~~~~~~
   In function 'u32_encode_bits',
       inlined from 'u32_replace_bits' at include/linux/bitfield.h:201:1,
       inlined from 'mvneta_mac_enable_tx_lpi' at drivers/net/ethernet/marvell/mvneta.c:4338:9:
>> include/linux/bitfield.h:178:17: error: call to '__field_overflow' declared with attribute error: value doesn't fit into mask
     178 |                 __field_overflow();                                     \
         |                 ^~~~~~~~~~~~~~~~~~
   include/linux/bitfield.h:198:9: note: in expansion of macro '____MAKE_OP'
     198 |         ____MAKE_OP(u##size,u##size,,)
         |         ^~~~~~~~~~~
   include/linux/bitfield.h:201:1: note: in expansion of macro '__MAKE_OP'
     201 | __MAKE_OP(32)
         | ^~~~~~~~~
   In function 'field_multiplier',
       inlined from 'field_mask' at include/linux/bitfield.h:171:17,
       inlined from 'u32_encode_bits' at include/linux/bitfield.h:201:1,
       inlined from 'u32_replace_bits' at include/linux/bitfield.h:201:1,
       inlined from 'mvneta_mac_enable_tx_lpi' at drivers/net/ethernet/marvell/mvneta.c:4338:9:
>> include/linux/bitfield.h:166:17: error: call to '__bad_mask' declared with attribute error: bad bitfield mask
     166 |                 __bad_mask();
         |                 ^~~~~~~~~~~~
   In function 'field_multiplier',
       inlined from 'u32_encode_bits' at include/linux/bitfield.h:201:1,
       inlined from 'u32_replace_bits' at include/linux/bitfield.h:201:1,
       inlined from 'mvneta_mac_enable_tx_lpi' at drivers/net/ethernet/marvell/mvneta.c:4338:9:
>> include/linux/bitfield.h:166:17: error: call to '__bad_mask' declared with attribute error: bad bitfield mask
     166 |                 __bad_mask();
         |                 ^~~~~~~~~~~~


vim +178 include/linux/bitfield.h

e2192de59e457ae Johannes Berg   2023-01-18  120  
e2192de59e457ae Johannes Berg   2023-01-18  121  /**
e2192de59e457ae Johannes Berg   2023-01-18  122   * FIELD_PREP_CONST() - prepare a constant bitfield element
e2192de59e457ae Johannes Berg   2023-01-18  123   * @_mask: shifted mask defining the field's length and position
e2192de59e457ae Johannes Berg   2023-01-18  124   * @_val:  value to put in the field
e2192de59e457ae Johannes Berg   2023-01-18  125   *
e2192de59e457ae Johannes Berg   2023-01-18  126   * FIELD_PREP_CONST() masks and shifts up the value.  The result should
e2192de59e457ae Johannes Berg   2023-01-18  127   * be combined with other fields of the bitfield using logical OR.
e2192de59e457ae Johannes Berg   2023-01-18  128   *
e2192de59e457ae Johannes Berg   2023-01-18  129   * Unlike FIELD_PREP() this is a constant expression and can therefore
e2192de59e457ae Johannes Berg   2023-01-18  130   * be used in initializers. Error checking is less comfortable for this
e2192de59e457ae Johannes Berg   2023-01-18  131   * version, and non-constant masks cannot be used.
e2192de59e457ae Johannes Berg   2023-01-18  132   */
e2192de59e457ae Johannes Berg   2023-01-18  133  #define FIELD_PREP_CONST(_mask, _val)					\
e2192de59e457ae Johannes Berg   2023-01-18  134  	(								\
e2192de59e457ae Johannes Berg   2023-01-18  135  		/* mask must be non-zero */				\
e2192de59e457ae Johannes Berg   2023-01-18  136  		BUILD_BUG_ON_ZERO((_mask) == 0) +			\
e2192de59e457ae Johannes Berg   2023-01-18  137  		/* check if value fits */				\
e2192de59e457ae Johannes Berg   2023-01-18  138  		BUILD_BUG_ON_ZERO(~((_mask) >> __bf_shf(_mask)) & (_val)) + \
e2192de59e457ae Johannes Berg   2023-01-18  139  		/* check if mask is contiguous */			\
e2192de59e457ae Johannes Berg   2023-01-18  140  		__BF_CHECK_POW2((_mask) + (1ULL << __bf_shf(_mask))) +	\
e2192de59e457ae Johannes Berg   2023-01-18  141  		/* and create the value */				\
e2192de59e457ae Johannes Berg   2023-01-18  142  		(((typeof(_mask))(_val) << __bf_shf(_mask)) & (_mask))	\
e2192de59e457ae Johannes Berg   2023-01-18  143  	)
e2192de59e457ae Johannes Berg   2023-01-18  144  
3e9b3112ec74f19 Jakub Kicinski  2016-08-31  145  /**
3e9b3112ec74f19 Jakub Kicinski  2016-08-31  146   * FIELD_GET() - extract a bitfield element
3e9b3112ec74f19 Jakub Kicinski  2016-08-31  147   * @_mask: shifted mask defining the field's length and position
7240767450d6d83 Masahiro Yamada 2017-10-03  148   * @_reg:  value of entire bitfield
3e9b3112ec74f19 Jakub Kicinski  2016-08-31  149   *
3e9b3112ec74f19 Jakub Kicinski  2016-08-31  150   * FIELD_GET() extracts the field specified by @_mask from the
3e9b3112ec74f19 Jakub Kicinski  2016-08-31  151   * bitfield passed in as @_reg by masking and shifting it down.
3e9b3112ec74f19 Jakub Kicinski  2016-08-31  152   */
3e9b3112ec74f19 Jakub Kicinski  2016-08-31  153  #define FIELD_GET(_mask, _reg)						\
3e9b3112ec74f19 Jakub Kicinski  2016-08-31  154  	({								\
3e9b3112ec74f19 Jakub Kicinski  2016-08-31  155  		__BF_FIELD_CHECK(_mask, _reg, 0U, "FIELD_GET: ");	\
3e9b3112ec74f19 Jakub Kicinski  2016-08-31  156  		(typeof(_mask))(((_reg) & (_mask)) >> __bf_shf(_mask));	\
3e9b3112ec74f19 Jakub Kicinski  2016-08-31  157  	})
3e9b3112ec74f19 Jakub Kicinski  2016-08-31  158  
e7d4a95da86e0b0 Johannes Berg   2018-06-20  159  extern void __compiletime_error("value doesn't fit into mask")
00b0c9b82663ac4 Al Viro         2017-12-14  160  __field_overflow(void);
00b0c9b82663ac4 Al Viro         2017-12-14  161  extern void __compiletime_error("bad bitfield mask")
00b0c9b82663ac4 Al Viro         2017-12-14  162  __bad_mask(void);
00b0c9b82663ac4 Al Viro         2017-12-14  163  static __always_inline u64 field_multiplier(u64 field)
00b0c9b82663ac4 Al Viro         2017-12-14  164  {
00b0c9b82663ac4 Al Viro         2017-12-14  165  	if ((field | (field - 1)) & ((field | (field - 1)) + 1))
00b0c9b82663ac4 Al Viro         2017-12-14 @166  		__bad_mask();
00b0c9b82663ac4 Al Viro         2017-12-14  167  	return field & -field;
00b0c9b82663ac4 Al Viro         2017-12-14  168  }
00b0c9b82663ac4 Al Viro         2017-12-14  169  static __always_inline u64 field_mask(u64 field)
00b0c9b82663ac4 Al Viro         2017-12-14  170  {
00b0c9b82663ac4 Al Viro         2017-12-14  171  	return field / field_multiplier(field);
00b0c9b82663ac4 Al Viro         2017-12-14  172  }
e31a50162feb352 Alex Elder      2020-03-12  173  #define field_max(field)	((typeof(field))field_mask(field))
00b0c9b82663ac4 Al Viro         2017-12-14  174  #define ____MAKE_OP(type,base,to,from)					\
00b0c9b82663ac4 Al Viro         2017-12-14  175  static __always_inline __##type type##_encode_bits(base v, base field)	\
00b0c9b82663ac4 Al Viro         2017-12-14  176  {									\
e7d4a95da86e0b0 Johannes Berg   2018-06-20  177  	if (__builtin_constant_p(v) && (v & ~field_mask(field)))	\
00b0c9b82663ac4 Al Viro         2017-12-14 @178  		__field_overflow();					\
00b0c9b82663ac4 Al Viro         2017-12-14  179  	return to((v & field_mask(field)) * field_multiplier(field));	\
00b0c9b82663ac4 Al Viro         2017-12-14  180  }									\
00b0c9b82663ac4 Al Viro         2017-12-14  181  static __always_inline __##type type##_replace_bits(__##type old,	\
00b0c9b82663ac4 Al Viro         2017-12-14  182  					base val, base field)		\
00b0c9b82663ac4 Al Viro         2017-12-14  183  {									\
00b0c9b82663ac4 Al Viro         2017-12-14  184  	return (old & ~to(field)) | type##_encode_bits(val, field);	\
00b0c9b82663ac4 Al Viro         2017-12-14  185  }									\
00b0c9b82663ac4 Al Viro         2017-12-14  186  static __always_inline void type##p_replace_bits(__##type *p,		\
00b0c9b82663ac4 Al Viro         2017-12-14  187  					base val, base field)		\
00b0c9b82663ac4 Al Viro         2017-12-14  188  {									\
00b0c9b82663ac4 Al Viro         2017-12-14  189  	*p = (*p & ~to(field)) | type##_encode_bits(val, field);	\
00b0c9b82663ac4 Al Viro         2017-12-14  190  }									\
00b0c9b82663ac4 Al Viro         2017-12-14  191  static __always_inline base type##_get_bits(__##type v, base field)	\
00b0c9b82663ac4 Al Viro         2017-12-14  192  {									\
00b0c9b82663ac4 Al Viro         2017-12-14  193  	return (from(v) & field)/field_multiplier(field);		\
00b0c9b82663ac4 Al Viro         2017-12-14  194  }
00b0c9b82663ac4 Al Viro         2017-12-14  195  #define __MAKE_OP(size)							\
00b0c9b82663ac4 Al Viro         2017-12-14  196  	____MAKE_OP(le##size,u##size,cpu_to_le##size,le##size##_to_cpu)	\
00b0c9b82663ac4 Al Viro         2017-12-14  197  	____MAKE_OP(be##size,u##size,cpu_to_be##size,be##size##_to_cpu)	\
00b0c9b82663ac4 Al Viro         2017-12-14  198  	____MAKE_OP(u##size,u##size,,)
37a3862e1238262 Johannes Berg   2018-06-20  199  ____MAKE_OP(u8,u8,,)
00b0c9b82663ac4 Al Viro         2017-12-14  200  __MAKE_OP(16)
00b0c9b82663ac4 Al Viro         2017-12-14  201  __MAKE_OP(32)
00b0c9b82663ac4 Al Viro         2017-12-14  202  __MAKE_OP(64)
00b0c9b82663ac4 Al Viro         2017-12-14  203  #undef __MAKE_OP
00b0c9b82663ac4 Al Viro         2017-12-14  204  #undef ____MAKE_OP
00b0c9b82663ac4 Al Viro         2017-12-14  205  

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

  parent reply	other threads:[~2024-12-12  0:55 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-09 14:22 [PATCH net-next 00/10] net: add phylink managed EEE support Russell King (Oracle)
2024-12-09 14:23 ` [PATCH net-next 01/10] net: mdio: add definition for clock stop capable bit Russell King (Oracle)
2024-12-10  2:21   ` Andrew Lunn
2024-12-09 14:23 ` [PATCH net-next 02/10] net: phy: add support for querying PHY clock stop capability Russell King (Oracle)
2024-12-10  3:00   ` Andrew Lunn
2024-12-09 14:23 ` [PATCH net-next 03/10] net: phy: add configuration of rx clock stop mode Russell King (Oracle)
2024-12-10  3:03   ` Andrew Lunn
2024-12-10  3:11   ` Andrew Lunn
2024-12-10  9:51     ` Russell King (Oracle)
2024-12-10 23:15       ` Andrew Lunn
2024-12-09 14:23 ` [PATCH net-next 04/10] net: phylink: add phylink_link_is_up() helper Russell King (Oracle)
2024-12-10  3:03   ` Andrew Lunn
2024-12-09 14:23 ` [PATCH net-next 05/10] net: phylink: add EEE management Russell King (Oracle)
2024-12-10  3:18   ` Andrew Lunn
2024-12-13  9:37   ` Simon Horman
2024-12-14 23:38   ` Heiner Kallweit
2025-01-02 16:39     ` Russell King (Oracle)
2024-12-09 14:23 ` [PATCH net-next 06/10] net: phylink: allow MAC driver to validate eee params Russell King (Oracle)
2024-12-10  3:21   ` Andrew Lunn
2024-12-10  9:58     ` Russell King (Oracle)
2024-12-10 13:58       ` Russell King (Oracle)
2024-12-09 14:23 ` [PATCH net-next 07/10] net: mvneta: convert to phylink EEE implementation Russell King (Oracle)
2024-12-10  3:25   ` Andrew Lunn
2024-12-12  0:54   ` kernel test robot [this message]
2024-12-13 10:04   ` Simon Horman
2024-12-13 10:22     ` Simon Horman
2024-12-13 10:51       ` Russell King (Oracle)
2024-12-09 14:23 ` [PATCH net-next 08/10] net: mvpp2: add " Russell King (Oracle)
2024-12-10  3:27   ` Andrew Lunn
2024-12-09 14:23 ` [PATCH net-next 09/10] net: lan743x: use netdev in lan743x_phylink_mac_link_down() Russell King (Oracle)
2024-12-10  3:28   ` Andrew Lunn
2024-12-09 14:24 ` [PATCH net-next 10/10] net: lan743x: convert to phylink managed EEE Russell King (Oracle)
2024-12-10  3:37   ` Andrew Lunn
2024-12-10 10:07     ` Russell King (Oracle)
2024-12-10 14:57   ` kernel test robot
2024-12-12  1:31   ` kernel test robot
2024-12-09 18:35 ` [PATCH net-next 00/10] net: add phylink managed EEE support Christian Marangi
2024-12-09 18:59   ` Russell King (Oracle)
2024-12-11 12:07 ` Russell King (Oracle)

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=202412120802.VcALKEWs-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=rmk+kernel@armlinux.org.uk \
    /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.