[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <8f36be7c-6052-4c5d-85ff-0eed27cf1456@icloud.com>
Date: Sat, 22 Feb 2025 19:00:28 +0800
From: Zijun Hu <zijun_hu@...oud.com>
To: Peter Zijlstra <peterz@...radead.org>, 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>,
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 2025/2/22 04:01, Peter Zijlstra wrote:
>> */
>> 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.
>
tlb_remove_page_size() is void function already. (^^)
> It might not be your preferred coding style, but it is not completely
> pointless.
based on below C spec such as C17 description. i guess language C does
not like this usage "return void function in void function";
C spec such as C17 have this description about return
statement:
6.8.6.4:
A return statement with an expression shall not appear in a function
whose return type is void. A return statement without an expression
shall only appear in a function whose return type is void.
Powered by blists - more mailing lists