]> www.infradead.org Git - users/jedix/linux-maple.git/commit
selftests/mm: convert page_size to unsigned long
authorSiddarth G <siddarthsgml@gmail.com>
Thu, 3 Apr 2025 10:13:45 +0000 (15:43 +0530)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 12 May 2025 00:48:09 +0000 (17:48 -0700)
commit0bf19a357e0eaf03e757ac9482c45a797e40157a
treee9ac97402cb056d0cdd290543df710ffc4984556
parent26d4d18b79659054e451be9487937e31e63d0853
selftests/mm: convert page_size to unsigned long

Cppcheck warning:
int result is assigned to long long variable. If the variable is long long
to avoid loss of information, then you have loss of information.

This patch changes the type of page_size from 'unsigned int' to
'unsigned long' instead of using ULL suffixes. Changing hpage_size to
'unsigned long' was considered, but since gethugepage() expects an int,
this change was avoided.

Link: https://lkml.kernel.org/r/20250403101345.29226-1-siddarthsgml@gmail.com
Signed-off-by: Siddarth G <siddarthsgml@gmail.com>
Reported-by: David Binderman <dcb314@hotmail.com>
Closes: https://lore.kernel.org/all/AS8PR02MB10217315060BBFDB21F19643E9CA62@AS8PR02MB10217.eurprd02.prod.outlook.com/
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/selftests/mm/pagemap_ioctl.c