From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 26127C433E0 for ; Wed, 20 Jan 2021 17:40:11 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A180A20705 for ; Wed, 20 Jan 2021 17:40:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A180A20705 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=wzaW83hdAxm6DdxS3/uBob0wkr1ba1HXStQvKb287Ww=; b=wBDoNQ789SayWnB13MR3SA0UL IRjLVDvKXJYVODIdVgq28Y2LlOnlN0FzBq2RjRWqejnvf4HEO+J6qADBy0DfVySPot68rYefXppHL 5RnzrH0S9IgV02ir114zFTO6a2fCBFs14ErIkuo8bcMoHNbYZv4b+ZTvDkLlx8dBjIuZcPixuDZbo 0PHRsGrO/UHgc8HJoaT/DTNe3pN5ccc3Y59tZt4XzNlge4fyRmoXeBqHbajIQiwpcMFUlT991VFtO jlADiKVJ1ceC0prndDsymfaoLF90O3S+relcx2RkpbnpDqLw/tsvVEhYU2ot2h2ksrVZ4XB9Vt9nH +ufouxdhQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2HQR-0002W0-PG; Wed, 20 Jan 2021 17:37:47 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2HPR-00028n-0w for linux-arm-kernel@lists.infradead.org; Wed, 20 Jan 2021 17:37:00 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 116FC23122; Wed, 20 Jan 2021 17:36:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1611164204; bh=DEWJsXFSV81jlOBYgr3LEPW3UawvblxwfW/J9Ed78ic=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VpQVclVXlxSy0Xj5C7hS2E1F4PoDjtit84Uz02J2rq+/QVqCfZtq7tyCx5+xqaGkx Q4U5Xz2/Dqs206JdOTX6hIowJzsptc1Xi564azFWvGsbVVlQf/Gst6qKY6OkzZL9Zq P9eqggQdSqPisehrzCZmupr2rY1pJqtK67kijhnTmBNcBtdEhPi2fScZPX3PYbh6PQ lVep4qzAp7FiRs+7aTJXmmsQgW4+sIwBsP0HqAlpYGaup7TYLg8knbq4/FZqtTb7ac qwfZ/sTOEaBhym7q5/L4qu0dcevjkjJUmH0BA1fURJRgVg8zoAhF4S23jkfLndhPiK HvHfwILoYBO4w== From: Will Deacon To: linux-kernel@vger.kernel.org Subject: [PATCH v4 8/8] mm: Mark anonymous struct field of 'struct vm_fault' as 'const' Date: Wed, 20 Jan 2021 17:36:12 +0000 Message-Id: <20210120173612.20913-9-will@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210120173612.20913-1-will@kernel.org> References: <20210120173612.20913-1-will@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210120_123645_178443_BCA1BFBF X-CRM114-Status: GOOD ( 13.33 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nick Desaulniers , kernel-team@android.com, Jan Kara , Minchan Kim , Catalin Marinas , Linus Torvalds , Hugh Dickins , linux-mm@kvack.org, Vinayak Menon , "Kirill A . Shutemov" , Andrew Morton , Will Deacon , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The fields of this struct are only ever read after being initialised, so mark it 'const' before somebody tries to modify it again. Cc: Kirill A. Shutemov Cc: Linus Torvalds Signed-off-by: Will Deacon --- include/linux/mm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/mm.h b/include/linux/mm.h index e0f056753bef..7ff3d9817d38 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -514,7 +514,7 @@ static inline bool fault_flag_allow_retry_first(unsigned int flags) * pgoff should be used in favour of virtual_address, if possible. */ struct vm_fault { - struct { + const struct { struct vm_area_struct *vma; /* Target VMA */ gfp_t gfp_mask; /* gfp mask to be used for allocations */ pgoff_t pgoff; /* Logical page offset based on vma */ -- 2.30.0.284.gd98b1dd5eaa7-goog _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel