[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CA+CK2bASowj8quGMaUDsxpCKmhkqg0ySiuiAngty3z3zjbYFBw@mail.gmail.com>
Date: Thu, 4 Dec 2025 09:07:49 -0500
From: Pasha Tatashin <pasha.tatashin@...een.com>
To: Arnd Bergmann <arnd@...nel.org>
Cc: Hugh Dickins <hughd@...gle.com>, Andrew Morton <akpm@...ux-foundation.org>,
"Mike Rapoport (Microsoft)" <rppt@...nel.org>, Pratyush Yadav <pratyush@...nel.org>, Arnd Bergmann <arnd@...db.de>,
Baolin Wang <baolin.wang@...ux.alibaba.com>, Kairui Song <kasong@...cent.com>,
David Hildenbrand <david@...nel.org>, Christian Brauner <brauner@...nel.org>,
Kemeng Shi <shikemeng@...weicloud.com>, Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
Guo Weikang <guoweikang.kernel@...il.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: shmem: avoid build warning for CONFIG_SHMEM=n
On Thu, Dec 4, 2025 at 4:44 AM Arnd Bergmann <arnd@...nel.org> wrote:
>
> From: Arnd Bergmann <arnd@...db.de>
>
> The newly added 'flags' variable is unused and causes a warning if
> CONFIG_SHMEM is disabled, since the shmem_acct_size() macro it is passed
> into does nothing:
>
> mm/shmem.c: In function '__shmem_file_setup':
> mm/shmem.c:5816:23: error: unused variable 'flags' [-Werror=unused-variable]
> 5816 | unsigned long flags = (vm_flags & VM_NORESERVE) ? SHMEM_F_NORESERVE : 0;
> | ^~~~~
>
> Replace the macro with an equivalent inline function to get the
> argument checking.
>
> Fixes: 6ff1610ced56 ("mm: shmem: use SHMEM_F_* flags instead of VM_* flags")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
Reviewed-by: Pasha Tatashin <pasha.tatashin@...een.com>
Thanks,
Pasha
Powered by blists - more mailing lists