From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com
Subject: Re: [PATCH 4/7] minmax: Simplify signedness check
Date: Fri, 26 Jul 2024 03:28:32 +0800 [thread overview]
Message-ID: <202407260319.rmgaXdIl-lkp@intel.com> (raw)
::::::
:::::: Manual check reason: "low confidence static check first_new_problem: arch/arm64/kvm/hyp/nvhe/page_alloc.c:121:21: sparse: sparse: bad integer constant expression"
::::::
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <03601661326c4efba4e618ead15fa0e2@AcuMS.aculab.com>
References: <03601661326c4efba4e618ead15fa0e2@AcuMS.aculab.com>
TO: David Laight <David.Laight@ACULAB.COM>
TO: "'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>
TO: "'Linus Torvalds'" <torvalds@linuxfoundation.org>
CC: "'Matthew Wilcox (Oracle)'" <willy@infradead.org>
CC: "'Christoph Hellwig'" <hch@infradead.org>
CC: "'Andrew Morton'" <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
CC: "'Andy Shevchenko'" <andriy.shevchenko@linux.intel.com>
CC: "'Dan Carpenter'" <dan.carpenter@linaro.org>
CC: "'Arnd Bergmann'" <arnd@kernel.org>
CC: "'Jason@zx2c4.com'" <Jason@zx2c4.com>
CC: "'pedro.falcato@gmail.com'" <pedro.falcato@gmail.com>
CC: "'Mateusz Guzik'" <mjguzik@gmail.com>
Hi David,
kernel test robot noticed the following build warnings:
[auto build test WARNING on linux/master]
[also build test WARNING on linus/master v6.10 next-20240725]
[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/minmax-Put-all-the-clamp-definitions-together/20240724-224832
base: linux/master
patch link: https://lore.kernel.org/r/03601661326c4efba4e618ead15fa0e2%40AcuMS.aculab.com
patch subject: [PATCH 4/7] minmax: Simplify signedness check
:::::: branch date: 29 hours ago
:::::: commit date: 29 hours ago
config: arm64-randconfig-r132-20240725 (https://download.01.org/0day-ci/archive/20240726/202407260319.rmgaXdIl-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 14.1.0
reproduce: (https://download.01.org/0day-ci/archive/20240726/202407260319.rmgaXdIl-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/202407260319.rmgaXdIl-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> arch/arm64/kvm/hyp/nvhe/page_alloc.c:121:21: sparse: sparse: bad integer constant expression
>> arch/arm64/kvm/hyp/nvhe/page_alloc.c:121:21: sparse: sparse: static assertion failed: "min(p, buddy) signedness error, fix types or consider umin() before min_t()"
vim +121 arch/arm64/kvm/hyp/nvhe/page_alloc.c
914cde58a03cc5 Quentin Perret 2021-06-08 92
8e17c66249e9ea Quentin Perret 2021-03-19 93 static void __hyp_attach_page(struct hyp_pool *pool,
8e17c66249e9ea Quentin Perret 2021-03-19 94 struct hyp_page *p)
8e17c66249e9ea Quentin Perret 2021-03-19 95 {
72a5bc0f153ce8 Quentin Perret 2022-11-10 96 phys_addr_t phys = hyp_page_to_phys(p);
87ec0606733e1a Quentin Perret 2021-06-08 97 unsigned short order = p->order;
8e17c66249e9ea Quentin Perret 2021-03-19 98 struct hyp_page *buddy;
8e17c66249e9ea Quentin Perret 2021-03-19 99
8e17c66249e9ea Quentin Perret 2021-03-19 100 memset(hyp_page_to_virt(p), 0, PAGE_SIZE << p->order);
8e17c66249e9ea Quentin Perret 2021-03-19 101
72a5bc0f153ce8 Quentin Perret 2022-11-10 102 /* Skip coalescing for 'external' pages being freed into the pool. */
72a5bc0f153ce8 Quentin Perret 2022-11-10 103 if (phys < pool->range_start || phys >= pool->range_end)
72a5bc0f153ce8 Quentin Perret 2022-11-10 104 goto insert;
72a5bc0f153ce8 Quentin Perret 2022-11-10 105
8e17c66249e9ea Quentin Perret 2021-03-19 106 /*
8e17c66249e9ea Quentin Perret 2021-03-19 107 * Only the first struct hyp_page of a high-order page (otherwise known
8e17c66249e9ea Quentin Perret 2021-03-19 108 * as the 'head') should have p->order set. The non-head pages should
8e17c66249e9ea Quentin Perret 2021-03-19 109 * have p->order = HYP_NO_ORDER. Here @p may no longer be the head
21ea457842759a Julia Lawall 2022-03-18 110 * after coalescing, so make sure to mark it HYP_NO_ORDER proactively.
8e17c66249e9ea Quentin Perret 2021-03-19 111 */
8e17c66249e9ea Quentin Perret 2021-03-19 112 p->order = HYP_NO_ORDER;
23baf831a32c04 Kirill A. Shutemov 2023-03-15 113 for (; (order + 1) <= pool->max_order; order++) {
8e17c66249e9ea Quentin Perret 2021-03-19 114 buddy = __find_buddy_avail(pool, p, order);
8e17c66249e9ea Quentin Perret 2021-03-19 115 if (!buddy)
8e17c66249e9ea Quentin Perret 2021-03-19 116 break;
8e17c66249e9ea Quentin Perret 2021-03-19 117
21ea457842759a Julia Lawall 2022-03-18 118 /* Take the buddy out of its list, and coalesce with @p */
914cde58a03cc5 Quentin Perret 2021-06-08 119 page_remove_from_list(buddy);
8e17c66249e9ea Quentin Perret 2021-03-19 120 buddy->order = HYP_NO_ORDER;
8e17c66249e9ea Quentin Perret 2021-03-19 @121 p = min(p, buddy);
8e17c66249e9ea Quentin Perret 2021-03-19 122 }
8e17c66249e9ea Quentin Perret 2021-03-19 123
72a5bc0f153ce8 Quentin Perret 2022-11-10 124 insert:
8e17c66249e9ea Quentin Perret 2021-03-19 125 /* Mark the new head, and insert it */
8e17c66249e9ea Quentin Perret 2021-03-19 126 p->order = order;
914cde58a03cc5 Quentin Perret 2021-06-08 127 page_add_to_list(p, &pool->free_area[order]);
8e17c66249e9ea Quentin Perret 2021-03-19 128 }
8e17c66249e9ea Quentin Perret 2021-03-19 129
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2024-07-25 19:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-25 19:28 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-07-25 20:02 [PATCH 4/7] minmax: Simplify signedness check kernel test robot
2024-07-24 14:26 [PATCH 0/7] minmax: reduce compilation time David Laight
2024-07-24 14:30 ` [PATCH 4/7] minmax: Simplify signedness check David Laight
2024-07-24 16:48 ` Arnd Bergmann
2024-07-24 20:02 ` Linus Torvalds
2024-07-25 9:00 ` David Laight
2024-07-25 17:02 ` Linus Torvalds
2024-07-26 9:43 ` Lorenzo Stoakes
2024-07-26 12:57 ` David Laight
2024-07-26 13:27 ` Lorenzo Stoakes
2024-07-25 13:24 ` kernel test robot
2024-07-25 16:39 ` David Laight
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=202407260319.rmgaXdIl-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.