From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A52362DC767 for ; Thu, 4 Dec 2025 10:55:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764845718; cv=none; b=XAa9M8k5C5ynED3aOMMCpyF5sgLIaPS4xtrTTwjLNN52RoiAPStg5AIVRoIXhhEVrAi3scHShR6KR/IigZd/vtHSJyx+UP3bS/KQeS6ZyV+8JfqhvW7mZrsGoWWkeK4Xnn15q2YE7MzxejZM8Z1donJJKo22jTI4EIvhErmH1F4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764845718; c=relaxed/simple; bh=7Dsi44OL6986BCsrNs/dEnIGMujSmD0SLBP7kqki3wo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=fscvzB3Ab8zip1JTfUuQBQ/IRZokYbHGXcKGG8D+K7zYnRCayEvHJlARrtZOpyjILqWaUrg2JNTefKSMyn7NVw3gqb2edJjXiDav1/6+JuoJjfGkzHgToyzBw1beCNpjcYdhSk2IPn2d2ajb6Fdw6vu11r5NNhGvTb4htMVlx/s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=O9/F9Nfv; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="O9/F9Nfv" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 92DD0C4CEFB; Thu, 4 Dec 2025 10:55:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1764845718; bh=7Dsi44OL6986BCsrNs/dEnIGMujSmD0SLBP7kqki3wo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=O9/F9Nfvabkdx+TVxTXKQECnQQkoHJqg3GhzVPQndm7LPIDHeoSG0Q2BKbYI6SYQ7 +pvTYHFbARYdl9w8v6bakU26fWXPiB2UfbFRFs4Sma6WnkROOrgikJrNi0GUaQJU9X qHB7p3Oc7Wa8+6QXf5/Q/bMJhi/lDp/Zv7t9JHLVhlcE8DraD5r6Ilmk+AC+rTsQd+ YziAX5HrBBq39c8pO1kYtKuVkVfT+8nZhPcv/XYU8g/W1B/3wCkT1/0RitvZ14qRnJ Qx9TQaCSUCWGgP9md5nGufkNfeBY90FRjVnCkf1vgTUBGRhRyiI6ZO1BGuF0QkJL39 KirNZPazUghsQ== Date: Thu, 4 Dec 2025 12:55:09 +0200 From: Mike Rapoport To: "David Hildenbrand (Red Hat)" Cc: Arnd Bergmann , Hugh Dickins , Andrew Morton , Pratyush Yadav , Pasha Tatashin , Arnd Bergmann , Baolin Wang , Kairui Song , Christian Brauner , Lorenzo Stoakes , Kemeng Shi , Guo Weikang , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] [v2] mm: shmem: avoid build warning for CONFIG_SHMEM=n Message-ID: References: <20251204102905.1048000-1-arnd@kernel.org> <93782526-c198-4590-b96b-c4f630b8ecbb@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <93782526-c198-4590-b96b-c4f630b8ecbb@kernel.org> On Thu, Dec 04, 2025 at 11:34:24AM +0100, David Hildenbrand (Red Hat) wrote: > On 12/4/25 11:28, Arnd Bergmann wrote: > > From: Arnd Bergmann > > > > 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 two macros with equivalent inline functions tto get the > > argument checking. > > > > Fixes: 6ff1610ced56 ("mm: shmem: use SHMEM_F_* flags instead of VM_* flags") > > That's still not upstream, right? > > $ git tag --contains 6ff1610ced56 > mm-everything-2025-11-29-19-43 > mm-everything-2025-12-03-23-49 > next-20251201 > next-20251203 > next-20251204 > > So we can likely just squash it into the problematic commit before > proceeding with it? It's mm-nonmm-stable, I don't think fixups can go there. > Thanks Arnd! > > -- > Cheers > > David -- Sincerely yours, Mike.