Message ID | 20240221154549.2026073-1-arnd@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-75023-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp1119594dyc; Wed, 21 Feb 2024 07:46:35 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWyYAzgzIhisDwiDQzkoAL+BGrpTQlFlRCD2OEM0aZ7kQfk17NlTW11fWfteCr+RmyzQs0mNQlVjfKmg9yNFgxb5Kh1BA== X-Google-Smtp-Source: AGHT+IHGrn6Uh8bs/0Bj3Kjon9rrR/O7wLiW5oZYAEJs2/pOXAc46HqMY9jf3wKBtifIQdeUfhZI X-Received: by 2002:a05:6a20:2d09:b0:1a0:ceb1:8f65 with SMTP id g9-20020a056a202d0900b001a0ceb18f65mr828712pzl.4.1708530395454; Wed, 21 Feb 2024 07:46:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708530395; cv=pass; d=google.com; s=arc-20160816; b=HHMZyT1Jz6EQMM3F+1jL4Eg2MlL/rQR2o+akIPfk2dHeXVdXE3/s+MCkHjP5SjTw6b /7GKNK1Sxu6mJtkL1yXEuGx2kIJG2Yx7M5rfKV8ZAARHrhkS6t8nCi/43FafCXN9jfEV 2B0fTN24E2C+NlmIRGzP9cuSf0+ARR8dbEL9uwo7qk5Xiy0xXU5AymEaayO/KCix6NqT C1YgvoAo4OAQthPLhJPgpD7iC8J36rtWG/PclDV8vv8FPwQ0YiPWI2AjQYzH9IMQPRCe HI9aYQVtTfYI+sAHg8TZ8yyb+Qe65RYa46n8zyeNlaSvHJmHjwxWiM7zcigWwKN5QmZv BHHQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=I6ZtKdgLCvx1XPAa7SMOxop0Q2NoG9bWoXFAp/H8wbk=; fh=miBHPha9xM31KmFfoK6LHVK4KG0Us/LUrPWThsBbmw8=; b=vla9smNUY1t04awMvBAL3ydan0mmzMMoUCPj5Xd30X3F3KurjsYOl60QsCP1QfA7zT dlkCBLmMfHNPNmS0GSq/I/P4jnpg7hXamVCZHAteKGtlkQi7GbSzFW9QoOcv1+VcLfB9 Tq1E4kDc7MzN2YssAsQVfOjBe0rqksVaRIO2QFqv7Ov2F1CLSs2W1uribb2UaoqLym6s Zn8evYZRYJ8Jg1ZC4O+LZ+PLZLgFtMl3WTpNqZB2RRnhAMQKqRReG4jq01ZZFwTnUsSV 2prRWrc7SwYRRxXzzgSNl4NgGyqDspRZ4cEDiuZBJ5g9h68H9dgwGSUsvlkvxbQOW3Pd uWyg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=H+Cr9eoL; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-75023-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75023-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d21-20020aa78155000000b006e08c4f7d67si8217996pfn.114.2024.02.21.07.46.35 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 07:46:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-75023-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=H+Cr9eoL; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-75023-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75023-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id B6E9A28241E for <ouuuleilei@gmail.com>; Wed, 21 Feb 2024 15:46:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3E69181213; Wed, 21 Feb 2024 15:45:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="H+Cr9eoL" 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 97CCA80C18; Wed, 21 Feb 2024 15:45:56 +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=1708530356; cv=none; b=pKVeiy5Uqxmcmcsk8BomGXoc2dTNZRwIqEPxjIp0IB0CVX/6zYTx9+iCYUZJdPSMl8hWbMq+LGZ08uJ8qlGYQOUnJmSlQboR9/wKCmxRu87M83xilABmE6JExbqrCBsqic4SxCExvWfjgx23q9q0Sz7GwWPSkggz7LaMckNjyII= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708530356; c=relaxed/simple; bh=P/mpas3J/TkZfCO9L2DgIxqYbys+a0Vsm10ZNtd+lcI=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=l5CquHOroAwPWneqP1i4b2irSV+GzxXlHh9VFJHNoQ3VymDNPZf6rbuLw8Rob2SPrsqBEDWQ2oYeAAFrh/ECjscRpJDmtGscuC8HNQ0fuGLKipx/NZtH2kVsqryJGFO+loMRqyz994ZCvqXtTEXJf/ZYD9YVIFzSWhyuGhX7Muc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=H+Cr9eoL; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 530DFC433A6; Wed, 21 Feb 2024 15:45:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708530356; bh=P/mpas3J/TkZfCO9L2DgIxqYbys+a0Vsm10ZNtd+lcI=; h=From:To:Cc:Subject:Date:From; b=H+Cr9eoLl+fXedgpLYqZMW5afOoTadBK1bLxge/KlxopT+WqCKozCkU2qcX1fAjN8 Vq1xRPwdybtci4gMRXHIEYUxO+dq6p6L9dWxPs4qhOhk9/b30VB9tvupItkoa31+5l II9E+f2oAvzDWAxpIe/JQbIn2es8Gq+1bwNP59Jb83zlA6c2W84ziLOi93erh5MDuc Yy9BuUDI6qS0fEkxJXaMJmlPwaN2KxoKtKQJ/msnTfkwNWMklyJcIb1xlCri7pmKb4 ha9IcknixFdeKHRDb6RgtK4dznORynMDrgf4vcGFMhDQtIPtvYwb/RSfQFg5iYLTvb lnCBhOJN7z2wQ== From: Arnd Bergmann <arnd@kernel.org> To: Andrew Morton <akpm@linux-foundation.org>, David Hildenbrand <david@redhat.com> Cc: Arnd Bergmann <arnd@arndb.de>, Will Deacon <will@kernel.org>, "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>, Nick Piggin <npiggin@gmail.com>, Peter Zijlstra <peterz@infradead.org>, Nathan Chancellor <nathan@kernel.org>, Nick Desaulniers <ndesaulniers@google.com>, Bill Wendling <morbo@google.com>, Justin Stitt <justinstitt@google.com>, Ryan Roberts <ryan.roberts@arm.com>, "Vishal Moola (Oracle)" <vishal.moola@gmail.com>, Alistair Popple <apopple@nvidia.com>, linux-arch@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: [PATCH] mm/mmu_gather: change __tlb_remove_tlb_entry() to an inline function Date: Wed, 21 Feb 2024 16:45:21 +0100 Message-Id: <20240221154549.2026073-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791523967866360666 X-GMAIL-MSGID: 1791523967866360666 |
Series |
mm/mmu_gather: change __tlb_remove_tlb_entry() to an inline function
|
|
Commit Message
Arnd Bergmann
Feb. 21, 2024, 3:45 p.m. UTC
From: Arnd Bergmann <arnd@arndb.de> clang complains about tlb_remove_tlb_entries() not using the 'ptep' variable when __tlb_remove_tlb_entry() is an empty macro: include/asm-generic/tlb.h:627:10: error: parameter 'ptep' set but not used [-Werror,-Wunused-but-set-parameter] Change it to an equivalent inline function that avoids the warning since the compiler can see how the variable gets passed into it. Fixes: 66958b447695 ("mm/mmu_gather: add tlb_remove_tlb_entries()") Signed-off-by: Arnd Bergmann <arnd@arndb.de> --- include/asm-generic/tlb.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Comments
On 21.02.24 16:45, Arnd Bergmann wrote: > From: Arnd Bergmann <arnd@arndb.de> > Hi Arnd, > clang complains about tlb_remove_tlb_entries() not using the 'ptep' variable > when __tlb_remove_tlb_entry() is an empty macro: > > include/asm-generic/tlb.h:627:10: error: parameter 'ptep' set but not used [-Werror,-Wunused-but-set-parameter] > > Change it to an equivalent inline function that avoids the warning since > the compiler can see how the variable gets passed into it. > Ugh, quite an annoying clang behavior in this particular case. I wonder why no build bot complained so far. Thanks! > Fixes: 66958b447695 ("mm/mmu_gather: add tlb_remove_tlb_entries()") That commit id is not stable yet. So Andrew might want to fold it into that commit before moving it to mm-stable.
diff --git a/include/asm-generic/tlb.h b/include/asm-generic/tlb.h index bd00dd238b79..709830274b75 100644 --- a/include/asm-generic/tlb.h +++ b/include/asm-generic/tlb.h @@ -600,7 +600,9 @@ static inline void tlb_flush_p4d_range(struct mmu_gather *tlb, } #ifndef __tlb_remove_tlb_entry -#define __tlb_remove_tlb_entry(tlb, ptep, address) do { } while (0) +static inline void __tlb_remove_tlb_entry(struct mmu_gather *tlb, pte_t *ptep, unsigned long address) +{ +} #endif /**