linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: David Laight <David.Laight@aculab.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Yury Norov <yury.norov@gmail.com>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux Memory Management List <linux-mm@kvack.org>,
	Masahiro Yamada <masahiroy@kernel.org>,
	'Vincent Mailhol' <mailhol.vincent@wanadoo.fr>
Subject: Re: [PATCH next] linux/bits.h: Simplify GENMASK()
Date: Mon, 16 Dec 2024 07:28:52 +0800	[thread overview]
Message-ID: <202412160756.7tFtCu4g-lkp@intel.com> (raw)
In-Reply-To: <8423d75207f64e4081f0019601b4a016@AcuMS.aculab.com>

Hi David,

kernel test robot noticed the following build errors:

[auto build test ERROR on akpm-mm/mm-everything]
[also build test ERROR on linus/master v6.13-rc2]
[cannot apply to next-20241213 next-20241213]
[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-Laight/linux-bits-h-Simplify-GENMASK/20241216-040445
base:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link:    https://lore.kernel.org/r/8423d75207f64e4081f0019601b4a016%40AcuMS.aculab.com
patch subject: [PATCH next] linux/bits.h: Simplify GENMASK()
config: arm64-randconfig-004-20241216 (https://download.01.org/0day-ci/archive/20241216/202412160756.7tFtCu4g-lkp@intel.com/config)
compiler: clang version 15.0.7 (https://github.com/llvm/llvm-project 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241216/202412160756.7tFtCu4g-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/202412160756.7tFtCu4g-lkp@intel.com/

All errors (new ones prefixed by >>):

>> lib/test_bits.c:46:47: error: use of undeclared identifier '__uint128'
           KUNIT_EXPECT_EQ(test, 0x0000000000000001ull, GENMASK_U128(0, 0));
                                                        ^
   include/linux/bits.h:33:33: note: expanded from macro 'GENMASK_U128'
           (GENMASK_INPUT_CHECK(hi, lo) + __GENMASK_U128(hi, lo))
                                          ^
   include/uapi/linux/bits.h:15:44: note: expanded from macro '__GENMASK_U128'
   #define __GENMASK_U128(hi, lo) ___GENMASK((__uint128)1, hi, lo)
                                              ^
>> lib/test_bits.c:46:47: error: use of undeclared identifier '__uint128'
   include/linux/bits.h:33:33: note: expanded from macro 'GENMASK_U128'
           (GENMASK_INPUT_CHECK(hi, lo) + __GENMASK_U128(hi, lo))
                                          ^
   include/uapi/linux/bits.h:15:44: note: expanded from macro '__GENMASK_U128'
   #define __GENMASK_U128(hi, lo) ___GENMASK((__uint128)1, hi, lo)
                                              ^
>> lib/test_bits.c:46:47: error: use of undeclared identifier '__uint128'
   include/linux/bits.h:33:33: note: expanded from macro 'GENMASK_U128'
           (GENMASK_INPUT_CHECK(hi, lo) + __GENMASK_U128(hi, lo))
                                          ^
   include/uapi/linux/bits.h:15:44: note: expanded from macro '__GENMASK_U128'
   #define __GENMASK_U128(hi, lo) ___GENMASK((__uint128)1, hi, lo)
                                              ^
>> lib/test_bits.c:46:47: error: use of undeclared identifier '__uint128'
   include/linux/bits.h:33:33: note: expanded from macro 'GENMASK_U128'
           (GENMASK_INPUT_CHECK(hi, lo) + __GENMASK_U128(hi, lo))
                                          ^
   include/uapi/linux/bits.h:15:44: note: expanded from macro '__GENMASK_U128'
   #define __GENMASK_U128(hi, lo) ___GENMASK((__uint128)1, hi, lo)
                                              ^
   lib/test_bits.c:47:47: error: use of undeclared identifier '__uint128'
           KUNIT_EXPECT_EQ(test, 0x0000000000000003ull, GENMASK_U128(1, 0));
                                                        ^
   include/linux/bits.h:33:33: note: expanded from macro 'GENMASK_U128'
           (GENMASK_INPUT_CHECK(hi, lo) + __GENMASK_U128(hi, lo))
                                          ^
   include/uapi/linux/bits.h:15:44: note: expanded from macro '__GENMASK_U128'
   #define __GENMASK_U128(hi, lo) ___GENMASK((__uint128)1, hi, lo)
                                              ^
   lib/test_bits.c:47:47: error: use of undeclared identifier '__uint128'
   include/linux/bits.h:33:33: note: expanded from macro 'GENMASK_U128'
           (GENMASK_INPUT_CHECK(hi, lo) + __GENMASK_U128(hi, lo))
                                          ^
   include/uapi/linux/bits.h:15:44: note: expanded from macro '__GENMASK_U128'
   #define __GENMASK_U128(hi, lo) ___GENMASK((__uint128)1, hi, lo)
                                              ^
   lib/test_bits.c:47:47: error: use of undeclared identifier '__uint128'
   include/linux/bits.h:33:33: note: expanded from macro 'GENMASK_U128'
           (GENMASK_INPUT_CHECK(hi, lo) + __GENMASK_U128(hi, lo))
                                          ^
   include/uapi/linux/bits.h:15:44: note: expanded from macro '__GENMASK_U128'
   #define __GENMASK_U128(hi, lo) ___GENMASK((__uint128)1, hi, lo)
                                              ^
   lib/test_bits.c:47:47: error: use of undeclared identifier '__uint128'
   include/linux/bits.h:33:33: note: expanded from macro 'GENMASK_U128'
           (GENMASK_INPUT_CHECK(hi, lo) + __GENMASK_U128(hi, lo))
                                          ^
   include/uapi/linux/bits.h:15:44: note: expanded from macro '__GENMASK_U128'
   #define __GENMASK_U128(hi, lo) ___GENMASK((__uint128)1, hi, lo)
                                              ^
   lib/test_bits.c:48:47: error: use of undeclared identifier '__uint128'
           KUNIT_EXPECT_EQ(test, 0x0000000000000006ull, GENMASK_U128(2, 1));
                                                        ^
   include/linux/bits.h:33:33: note: expanded from macro 'GENMASK_U128'
           (GENMASK_INPUT_CHECK(hi, lo) + __GENMASK_U128(hi, lo))
                                          ^
   include/uapi/linux/bits.h:15:44: note: expanded from macro '__GENMASK_U128'
   #define __GENMASK_U128(hi, lo) ___GENMASK((__uint128)1, hi, lo)
                                              ^
   lib/test_bits.c:48:47: error: use of undeclared identifier '__uint128'
   include/linux/bits.h:33:33: note: expanded from macro 'GENMASK_U128'
           (GENMASK_INPUT_CHECK(hi, lo) + __GENMASK_U128(hi, lo))
                                          ^
   include/uapi/linux/bits.h:15:44: note: expanded from macro '__GENMASK_U128'
   #define __GENMASK_U128(hi, lo) ___GENMASK((__uint128)1, hi, lo)
                                              ^
   lib/test_bits.c:48:47: error: use of undeclared identifier '__uint128'
   include/linux/bits.h:33:33: note: expanded from macro 'GENMASK_U128'
           (GENMASK_INPUT_CHECK(hi, lo) + __GENMASK_U128(hi, lo))
                                          ^
   include/uapi/linux/bits.h:15:44: note: expanded from macro '__GENMASK_U128'
   #define __GENMASK_U128(hi, lo) ___GENMASK((__uint128)1, hi, lo)
                                              ^
   lib/test_bits.c:48:47: error: use of undeclared identifier '__uint128'
   include/linux/bits.h:33:33: note: expanded from macro 'GENMASK_U128'
           (GENMASK_INPUT_CHECK(hi, lo) + __GENMASK_U128(hi, lo))
                                          ^
   include/uapi/linux/bits.h:15:44: note: expanded from macro '__GENMASK_U128'
   #define __GENMASK_U128(hi, lo) ___GENMASK((__uint128)1, hi, lo)
                                              ^
   lib/test_bits.c:49:47: error: use of undeclared identifier '__uint128'
           KUNIT_EXPECT_EQ(test, 0x00000000ffffffffull, GENMASK_U128(31, 0));
                                                        ^
   include/linux/bits.h:33:33: note: expanded from macro 'GENMASK_U128'
           (GENMASK_INPUT_CHECK(hi, lo) + __GENMASK_U128(hi, lo))
                                          ^
   include/uapi/linux/bits.h:15:44: note: expanded from macro '__GENMASK_U128'
   #define __GENMASK_U128(hi, lo) ___GENMASK((__uint128)1, hi, lo)
                                              ^
   lib/test_bits.c:49:47: error: use of undeclared identifier '__uint128'
   include/linux/bits.h:33:33: note: expanded from macro 'GENMASK_U128'
           (GENMASK_INPUT_CHECK(hi, lo) + __GENMASK_U128(hi, lo))
                                          ^
   include/uapi/linux/bits.h:15:44: note: expanded from macro '__GENMASK_U128'
   #define __GENMASK_U128(hi, lo) ___GENMASK((__uint128)1, hi, lo)
                                              ^
   lib/test_bits.c:49:47: error: use of undeclared identifier '__uint128'
   include/linux/bits.h:33:33: note: expanded from macro 'GENMASK_U128'
           (GENMASK_INPUT_CHECK(hi, lo) + __GENMASK_U128(hi, lo))
                                          ^
   include/uapi/linux/bits.h:15:44: note: expanded from macro '__GENMASK_U128'
   #define __GENMASK_U128(hi, lo) ___GENMASK((__uint128)1, hi, lo)
                                              ^
   lib/test_bits.c:49:47: error: use of undeclared identifier '__uint128'
   include/linux/bits.h:33:33: note: expanded from macro 'GENMASK_U128'
           (GENMASK_INPUT_CHECK(hi, lo) + __GENMASK_U128(hi, lo))
                                          ^
   include/uapi/linux/bits.h:15:44: note: expanded from macro '__GENMASK_U128'
   #define __GENMASK_U128(hi, lo) ___GENMASK((__uint128)1, hi, lo)
                                              ^
   lib/test_bits.c:50:47: error: use of undeclared identifier '__uint128'
           KUNIT_EXPECT_EQ(test, 0x000000ffffe00000ull, GENMASK_U128(39, 21));
                                                        ^
   include/linux/bits.h:33:33: note: expanded from macro 'GENMASK_U128'


vim +/__uint128 +46 lib/test_bits.c

6d511020e13d5d6 Rikard Falkeborn  2020-08-11  41  
d7bcc37436c7d37 Anshuman Khandual 2024-08-22  42  static void genmask_u128_test(struct kunit *test)
d7bcc37436c7d37 Anshuman Khandual 2024-08-22  43  {
d7bcc37436c7d37 Anshuman Khandual 2024-08-22  44  #ifdef CONFIG_ARCH_SUPPORTS_INT128
d7bcc37436c7d37 Anshuman Khandual 2024-08-22  45  	/* Below 64 bit masks */
d7bcc37436c7d37 Anshuman Khandual 2024-08-22 @46  	KUNIT_EXPECT_EQ(test, 0x0000000000000001ull, GENMASK_U128(0, 0));
d7bcc37436c7d37 Anshuman Khandual 2024-08-22  47  	KUNIT_EXPECT_EQ(test, 0x0000000000000003ull, GENMASK_U128(1, 0));
d7bcc37436c7d37 Anshuman Khandual 2024-08-22  48  	KUNIT_EXPECT_EQ(test, 0x0000000000000006ull, GENMASK_U128(2, 1));
d7bcc37436c7d37 Anshuman Khandual 2024-08-22  49  	KUNIT_EXPECT_EQ(test, 0x00000000ffffffffull, GENMASK_U128(31, 0));
d7bcc37436c7d37 Anshuman Khandual 2024-08-22  50  	KUNIT_EXPECT_EQ(test, 0x000000ffffe00000ull, GENMASK_U128(39, 21));
d7bcc37436c7d37 Anshuman Khandual 2024-08-22  51  	KUNIT_EXPECT_EQ(test, 0xffffffffffffffffull, GENMASK_U128(63, 0));
d7bcc37436c7d37 Anshuman Khandual 2024-08-22  52  
d7bcc37436c7d37 Anshuman Khandual 2024-08-22  53  	/* Above 64 bit masks - only 64 bit portion can be validated once */
d7bcc37436c7d37 Anshuman Khandual 2024-08-22  54  	KUNIT_EXPECT_EQ(test, 0xffffffffffffffffull, GENMASK_U128(64, 0) >> 1);
d7bcc37436c7d37 Anshuman Khandual 2024-08-22  55  	KUNIT_EXPECT_EQ(test, 0x00000000ffffffffull, GENMASK_U128(81, 50) >> 50);
d7bcc37436c7d37 Anshuman Khandual 2024-08-22  56  	KUNIT_EXPECT_EQ(test, 0x0000000000ffffffull, GENMASK_U128(87, 64) >> 64);
d7bcc37436c7d37 Anshuman Khandual 2024-08-22  57  	KUNIT_EXPECT_EQ(test, 0x0000000000ff0000ull, GENMASK_U128(87, 80) >> 64);
d7bcc37436c7d37 Anshuman Khandual 2024-08-22  58  
d7bcc37436c7d37 Anshuman Khandual 2024-08-22  59  	KUNIT_EXPECT_EQ(test, 0xffffffffffffffffull, GENMASK_U128(127, 0) >> 64);
d7bcc37436c7d37 Anshuman Khandual 2024-08-22  60  	KUNIT_EXPECT_EQ(test, 0xffffffffffffffffull, (u64)GENMASK_U128(127, 0));
d7bcc37436c7d37 Anshuman Khandual 2024-08-22  61  	KUNIT_EXPECT_EQ(test, 0x0000000000000003ull, GENMASK_U128(127, 126) >> 126);
d7bcc37436c7d37 Anshuman Khandual 2024-08-22  62  	KUNIT_EXPECT_EQ(test, 0x0000000000000001ull, GENMASK_U128(127, 127) >> 127);
d7bcc37436c7d37 Anshuman Khandual 2024-08-22  63  #ifdef TEST_GENMASK_FAILURES
d7bcc37436c7d37 Anshuman Khandual 2024-08-22  64  	/* these should fail compilation */
d7bcc37436c7d37 Anshuman Khandual 2024-08-22  65  	GENMASK_U128(0, 1);
d7bcc37436c7d37 Anshuman Khandual 2024-08-22  66  	GENMASK_U128(0, 10);
d7bcc37436c7d37 Anshuman Khandual 2024-08-22  67  	GENMASK_U128(9, 10);
d7bcc37436c7d37 Anshuman Khandual 2024-08-22  68  #endif /* TEST_GENMASK_FAILURES */
d7bcc37436c7d37 Anshuman Khandual 2024-08-22  69  #endif /* CONFIG_ARCH_SUPPORTS_INT128 */
d7bcc37436c7d37 Anshuman Khandual 2024-08-22  70  }
d7bcc37436c7d37 Anshuman Khandual 2024-08-22  71  

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


       reply	other threads:[~2024-12-15 23:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <8423d75207f64e4081f0019601b4a016@AcuMS.aculab.com>
2024-12-15 23:28 ` kernel test robot [this message]
2024-12-16  4:03 ` kernel test robot

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=202412160756.7tFtCu4g-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=David.Laight@aculab.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=llvm@lists.linux.dev \
    --cc=mailhol.vincent@wanadoo.fr \
    --cc=masahiroy@kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=yury.norov@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox