Re: [PATCH] selftests/mm: Fix loss of information warnings

From: Andrew Morton
Date: Fri Mar 28 2025 - 19:22:56 EST


On Sat, 29 Mar 2025 03:30:37 +0530 Siddarth G <siddarthsgml@xxxxxxxxx> wrote:

> Cppcheck reported a style 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.
>
> Changing the type of page_size from 'unsigned int' to 'unsigned long long'
> was considered. But that might cause new conversion issues in other
> parts of the code where calculations involving 'page_size' are assigned
> to int variables. So we approach by appending ULL suffixes

I think that approach remains preferable. Keep changing things to
`unsigned long' until the warnings stop?