lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250221200137.GH7373@noisy.programming.kicks-ass.net>
Date: Fri, 21 Feb 2025 21:01:37 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Zijun Hu <quic_zijuhu@...cinc.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Will Deacon <will@...nel.org>,
	"Aneesh Kumar K.V" <aneesh.kumar@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Nick Piggin <npiggin@...il.com>, Arnd Bergmann <arnd@...db.de>,
	Thomas Gleixner <tglx@...utronix.de>,
	Herbert Xu <herbert@...dor.apana.org.au>,
	"David S. Miller" <davem@...emloft.net>,
	"Rafael J. Wysocki" <rafael@...nel.org>,
	Danilo Krummrich <dakr@...nel.org>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Simon Horman <horms@...nel.org>,
	Johannes Berg <johannes@...solutions.net>,
	Jamal Hadi Salim <jhs@...atatu.com>,
	Cong Wang <xiyou.wangcong@...il.com>, Jiri Pirko <jiri@...nulli.us>,
	Jason Gunthorpe <jgg@...pe.ca>, Leon Romanovsky <leon@...nel.org>,
	Linus Walleij <linus.walleij@...aro.org>,
	Bartosz Golaszewski <brgl@...ev.pl>, Lee Jones <lee@...nel.org>,
	Thomas Graf <tgraf@...g.ch>, Christoph Hellwig <hch@....de>,
	Marek Szyprowski <m.szyprowski@...sung.com>,
	Robin Murphy <robin.murphy@....com>,
	Miquel Raynal <miquel.raynal@...tlin.com>,
	Richard Weinberger <richard@....at>,
	Vignesh Raghavendra <vigneshr@...com>,
	Zijun Hu <zijun_hu@...oud.com>, linux-arch@...r.kernel.org,
	linux-mm@...ck.org, linux-kernel@...r.kernel.org,
	linux-crypto@...r.kernel.org, netdev@...r.kernel.org,
	linux-wireless@...r.kernel.org, linux-rdma@...r.kernel.org,
	linux-gpio@...r.kernel.org, linux-pm@...r.kernel.org,
	iommu@...ts.linux.dev, linux-mtd@...ts.infradead.org
Subject: Re: [PATCH *-next 01/18] mm/mmu_gather: Remove needless return in
 void API tlb_remove_page()

On Fri, Feb 21, 2025 at 05:02:06AM -0800, Zijun Hu wrote:
> Remove needless 'return' in void API tlb_remove_page() since both the
> API and tlb_remove_page_size() are void functions.
> 
> Signed-off-by: Zijun Hu <quic_zijuhu@...cinc.com>
> ---
>  include/asm-generic/tlb.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/asm-generic/tlb.h b/include/asm-generic/tlb.h
> index e402aef79c93..812110813b84 100644
> --- a/include/asm-generic/tlb.h
> +++ b/include/asm-generic/tlb.h
> @@ -501,7 +501,7 @@ static __always_inline bool __tlb_remove_page(struct mmu_gather *tlb,
>   */
>  static inline void tlb_remove_page(struct mmu_gather *tlb, struct page *page)
>  {
> -	return tlb_remove_page_size(tlb, page, PAGE_SIZE);
> +	tlb_remove_page_size(tlb, page, PAGE_SIZE);
>  }

So I don't mind removing it, but note that that return enforces
tlb_remove_page_size() has void return type.

It might not be your preferred coding style, but it is not completely
pointless.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ