[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20250328162242.3f7d3f0223efb9a20889b67b@linux-foundation.org>
Date: Fri, 28 Mar 2025 16:22:42 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Siddarth G <siddarthsgml@...il.com>
Cc: shuah@...nel.org, linux-kernel@...r.kernel.org,
linux-kselftest@...r.kernel.org, linux-mm@...ck.org, David Binderman
<dcb314@...mail.com>
Subject: Re: [PATCH] selftests/mm: Fix loss of information warnings
On Sat, 29 Mar 2025 03:30:37 +0530 Siddarth G <siddarthsgml@...il.com> 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?
Powered by blists - more mailing lists