Subject: Re: [PATCH net-next] net: atlantic: aq_utils_obj_{set|clear} optimizations

From: kernel test robot <[email-masked]>
Date: Tue, 2 Jun 2026 22:49:38 +0200

Hi Lei,

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/Lei-Zhu/net-atlantic-aq_utils_obj_-set-clear-optimizations/20260602-174147
base:   net-next/main
patch link:    https://lore.kernel.org/r/20260602092949.263270-1-zhulei_szu%40163.com
patch subject: [PATCH net-next] net: atlantic: aq_utils_obj_{set|clear} optimizations
config: x86_64-rhel-9.4-rust (https://download.01.org/0day-ci/archive/20260602/[email-masked]/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
rustc: rustc 1.88.0 (6b00bc388 2025-06-23)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260602/[email-masked]/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 <[email-masked]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email-masked]/

All errors (new ones prefixed by >>):

   In file included from drivers/net/ethernet/aquantia/atlantic/aq_main.c:10:
   In file included from drivers/net/ethernet/aquantia/atlantic/aq_main.h:12:
   In file included from drivers/net/ethernet/aquantia/atlantic/aq_common.h:17:
>> drivers/net/ethernet/aquantia/atlantic/aq_utils.h:21:38: error: incompatible pointer types passing 'unsigned long *' to parameter of type 'int *' [-Werror,-Wincompatible-pointer-types]
      21 |         } while (!atomic_try_cmpxchg(flags, &flags_old, flags_new));
         |                                             ^~~~~~~~~~
   include/linux/atomic/atomic-instrumented.h:1275:38: note: passing argument to parameter 'old' here
    1275 | atomic_try_cmpxchg(atomic_t *v, int *old, int new)
         |                                      ^
   In file included from drivers/net/ethernet/aquantia/atlantic/aq_main.c:10:
   In file included from drivers/net/ethernet/aquantia/atlantic/aq_main.h:12:
   In file included from drivers/net/ethernet/aquantia/atlantic/aq_common.h:17:
   drivers/net/ethernet/aquantia/atlantic/aq_utils.h:31:38: error: incompatible pointer types passing 'unsigned long *' to parameter of type 'int *' [-Werror,-Wincompatible-pointer-types]
      31 |         } while (!atomic_try_cmpxchg(flags, &flags_old, flags_new));
         |                                             ^~~~~~~~~~
   include/linux/atomic/atomic-instrumented.h:1275:38: note: passing argument to parameter 'old' here
    1275 | atomic_try_cmpxchg(atomic_t *v, int *old, int new)
         |                                      ^
   2 errors generated.
--
   In file included from drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c:10:
   In file included from drivers/net/ethernet/aquantia/atlantic/hw_atl/../aq_hw.h:15:
   In file included from drivers/net/ethernet/aquantia/atlantic/hw_atl/../aq_common.h:17:
>> drivers/net/ethernet/aquantia/atlantic/hw_atl/../aq_utils.h:21:38: error: incompatible pointer types passing 'unsigned long *' to parameter of type 'int *' [-Werror,-Wincompatible-pointer-types]
      21 |         } while (!atomic_try_cmpxchg(flags, &flags_old, flags_new));
         |                                             ^~~~~~~~~~
   include/linux/atomic/atomic-instrumented.h:1275:38: note: passing argument to parameter 'old' here
    1275 | atomic_try_cmpxchg(atomic_t *v, int *old, int new)
         |                                      ^
   In file included from drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c:10:
   In file included from drivers/net/ethernet/aquantia/atlantic/hw_atl/../aq_hw.h:15:
   In file included from drivers/net/ethernet/aquantia/atlantic/hw_atl/../aq_common.h:17:
   drivers/net/ethernet/aquantia/atlantic/hw_atl/../aq_utils.h:31:38: error: incompatible pointer types passing 'unsigned long *' to parameter of type 'int *' [-Werror,-Wincompatible-pointer-types]
      31 |         } while (!atomic_try_cmpxchg(flags, &flags_old, flags_new));
         |                                             ^~~~~~~~~~
   include/linux/atomic/atomic-instrumented.h:1275:38: note: passing argument to parameter 'old' here
    1275 | atomic_try_cmpxchg(atomic_t *v, int *old, int new)
         |                                      ^
   2 errors generated.

vim +21 drivers/net/ethernet/aquantia/atlantic/aq_utils.h

    13	
    14	static inline void aq_utils_obj_set(atomic_t *flags, u32 mask)
    15	{
    16		unsigned long flags_old, flags_new;
    17	
    18		flags_old = atomic_read(flags);
    19		do {
    20			flags_new = flags_old | (mask);
  > 21		} while (!atomic_try_cmpxchg(flags, &flags_old, flags_new));
    22	}
    23	

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