From: Peter Zijlstra <peterz@infradead.org>
To: Zijun Hu <quic_zijuhu@quicinc.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Will Deacon <will@kernel.org>,
"Aneesh Kumar K.V" <aneesh.kumar@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Nick Piggin <npiggin@gmail.com>, Arnd Bergmann <arnd@arndb.de>,
Thomas Gleixner <tglx@linutronix.de>,
Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Danilo Krummrich <dakr@kernel.org>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>,
Johannes Berg <johannes@sipsolutions.net>,
Jamal Hadi Salim <jhs@mojatatu.com>,
Cong Wang <xiyou.wangcong@gmail.com>,
Jiri Pirko <jiri@resnulli.us>, Jason Gunthorpe <jgg@ziepe.ca>,
Leon Romanovsky <leon@kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <brgl@bgdev.pl>, Lee Jones <lee@kernel.org>,
Thomas Graf <tgraf@suug.ch>, Christoph Hellwig <hch@lst.de>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Robin Murphy <robin.murphy@arm.com>,
Miquel Raynal <miquel.raynal@bootlin.com>,
Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
Zijun Hu <zijun_hu@icloud.com>,
linux-arch@vger.kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org,
netdev@vger.kernel.org, linux-wireless@vger.kernel.org,
linux-rdma@vger.kernel.org, linux-gpio@vger.kernel.org,
linux-pm@vger.kernel.org, iommu@lists.linux.dev,
linux-mtd@lists.infradead.org
Subject: Re: [PATCH *-next 01/18] mm/mmu_gather: Remove needless return in void API tlb_remove_page()
Date: Fri, 21 Feb 2025 21:01:37 +0100 [thread overview]
Message-ID: <20250221200137.GH7373@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <20250221-rmv_return-v1-1-cc8dff275827@quicinc.com>
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@quicinc.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.
WARNING: multiple messages have this Message-ID (diff)
From: Peter Zijlstra <peterz@infradead.org>
To: Zijun Hu <quic_zijuhu@quicinc.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Will Deacon <will@kernel.org>,
"Aneesh Kumar K.V" <aneesh.kumar@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Nick Piggin <npiggin@gmail.com>, Arnd Bergmann <arnd@arndb.de>,
Thomas Gleixner <tglx@linutronix.de>,
Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Danilo Krummrich <dakr@kernel.org>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>,
Johannes Berg <johannes@sipsolutions.net>,
Jamal Hadi Salim <jhs@mojatatu.com>,
Cong Wang <xiyou.wangcong@gmail.com>,
Jiri Pirko <jiri@resnulli.us>, Jason Gunthorpe <jgg@ziepe.ca>,
Leon Romanovsky <leon@kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <brgl@bgdev.pl>, Lee Jones <lee@kernel.org>,
Thomas Graf <tgraf@suug.ch>, Christoph Hellwig <hch@lst.de>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Robin Murphy <robin.murphy@arm.com>,
Miquel Raynal <miquel.raynal@bootlin.com>,
Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
Zijun Hu <zijun_hu@icloud.com>,
linux-arch@vger.kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org,
netdev@vger.kernel.org, linux-wireless@vger.kernel.org,
linux-rdma@vger.kernel.org, linux-gpio@vger.kernel.org,
linux-pm@vger.kernel.org, iommu@lists.linux.dev,
linux-mtd@lists.infradead.org
Subject: Re: [PATCH *-next 01/18] mm/mmu_gather: Remove needless return in void API tlb_remove_page()
Date: Fri, 21 Feb 2025 21:01:37 +0100 [thread overview]
Message-ID: <20250221200137.GH7373@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <20250221-rmv_return-v1-1-cc8dff275827@quicinc.com>
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@quicinc.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.
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2025-02-21 20:02 UTC|newest]
Thread overview: 84+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-21 13:02 [PATCH *-next 00/18] Remove weird and needless 'return' for void APIs Zijun Hu
2025-02-21 13:02 ` Zijun Hu
2025-02-21 13:02 ` [PATCH *-next 01/18] mm/mmu_gather: Remove needless return in void API tlb_remove_page() Zijun Hu
2025-02-21 13:02 ` Zijun Hu
2025-02-21 20:01 ` Peter Zijlstra [this message]
2025-02-21 20:01 ` Peter Zijlstra
2025-02-22 11:00 ` Zijun Hu
2025-02-22 11:00 ` Zijun Hu
2025-02-24 13:23 ` Peter Zijlstra
2025-02-24 13:23 ` Peter Zijlstra
2025-02-24 14:45 ` Zijun Hu
2025-02-24 14:45 ` Zijun Hu
2025-02-25 17:27 ` Przemek Kitszel
2025-02-25 17:27 ` Przemek Kitszel
2025-02-26 11:30 ` Zijun Hu
2025-02-26 11:30 ` Zijun Hu
2025-02-25 15:16 ` David Howells
2025-02-25 15:16 ` David Howells
2025-02-26 11:45 ` Zijun Hu
2025-02-26 11:45 ` Zijun Hu
2025-02-21 13:02 ` [PATCH *-next 02/18] cpu: Remove needless return in void API suspend_enable_secondary_cpus() Zijun Hu
2025-02-21 13:02 ` Zijun Hu
2025-02-21 13:02 ` [PATCH *-next 03/18] crypto: api - Remove needless return in void API crypto_free_tfm() Zijun Hu
2025-02-21 13:02 ` Zijun Hu
2025-02-21 13:02 ` [PATCH *-next 04/18] crypto: scomp - Remove needless return in void API crypto_scomp_free_ctx() Zijun Hu
2025-02-21 13:02 ` Zijun Hu
2025-02-21 13:02 ` [PATCH *-next 05/18] sysfs: Remove needless return in void API sysfs_enable_ns() Zijun Hu
2025-02-21 13:02 ` Zijun Hu
2025-02-21 13:02 ` [PATCH *-next 06/18] skbuff: Remove needless return in void API consume_skb() Zijun Hu
2025-02-21 13:02 ` Zijun Hu
2025-02-21 13:02 ` [PATCH *-next 07/18] wifi: mac80211: Remove needless return in void API _ieee80211_hw_set() Zijun Hu
2025-02-21 13:02 ` Zijun Hu
2025-02-21 13:02 ` [PATCH *-next 08/18] net: sched: Remove needless return in void API qdisc_watchdog_schedule_ns() Zijun Hu
2025-02-21 13:02 ` Zijun Hu
2025-02-21 13:02 ` [PATCH *-next 09/18] ipv4/igmp: Remove needless return in void API ip_mc_dec_group() Zijun Hu
2025-02-21 13:02 ` Zijun Hu
2025-02-21 13:02 ` [PATCH *-next 10/18] IB/rdmavt: Remove needless return in void API rvt_mod_retry_timer() Zijun Hu
2025-02-21 13:02 ` Zijun Hu
2025-02-21 13:02 ` [PATCH *-next 11/18] ratelimit: Remove needless return in void API ratelimit_default_init() Zijun Hu
2025-02-21 13:02 ` Zijun Hu
2025-02-21 13:02 ` [PATCH *-next 12/18] siox: Remove needless return in void API siox_driver_unregister() Zijun Hu
2025-02-21 13:02 ` Zijun Hu
2025-02-21 13:02 ` [PATCH *-next 13/18] gpiolib: Remove needless return in two void APIs Zijun Hu
2025-02-21 13:02 ` Zijun Hu
2025-02-21 13:06 ` Bartosz Golaszewski
2025-02-21 13:06 ` Bartosz Golaszewski
2025-02-21 13:12 ` Zijun Hu
2025-02-21 13:12 ` Zijun Hu
2025-02-21 13:02 ` [PATCH *-next 14/18] PM: wakeup: Remove needless return in three " Zijun Hu
2025-02-21 13:02 ` Zijun Hu
2025-02-26 17:06 ` Rafael J. Wysocki
2025-02-26 17:06 ` Rafael J. Wysocki
2025-02-21 13:02 ` [PATCH *-next 15/18] mfd: db8500-prcmu: " Zijun Hu
2025-02-21 13:02 ` Zijun Hu
2025-02-27 23:12 ` Linus Walleij
2025-02-27 23:12 ` Linus Walleij
2025-03-13 13:03 ` (subset) " Lee Jones
2025-03-13 13:03 ` Lee Jones
2025-02-21 13:02 ` [PATCH *-next 16/18] rhashtable: " Zijun Hu
2025-02-21 13:02 ` Zijun Hu
2025-02-21 13:02 ` [PATCH *-next 17/18] dma-mapping: Remove needless return in five " Zijun Hu
2025-02-21 13:02 ` Zijun Hu
2025-02-21 13:02 ` [PATCH *-next 18/18] mtd: nand: Do not return void function in void function Zijun Hu
2025-02-21 13:02 ` Zijun Hu
2025-02-21 13:12 ` [PATCH *-next 00/18] Remove weird and needless 'return' for void APIs Greg Kroah-Hartman
2025-02-21 13:12 ` Greg Kroah-Hartman
2025-02-21 13:15 ` Zijun Hu
2025-02-21 13:15 ` Zijun Hu
2025-02-21 15:40 ` Arnd Bergmann
2025-02-21 15:40 ` Arnd Bergmann
2025-02-22 10:38 ` Zijun Hu
2025-02-22 10:38 ` Zijun Hu
2025-02-21 19:00 ` Stephen Hemminger
2025-02-21 19:00 ` Stephen Hemminger
2025-02-21 19:36 ` Johannes Berg
2025-02-21 19:36 ` Johannes Berg
2025-02-22 10:51 ` Zijun Hu
2025-02-22 10:51 ` Zijun Hu
2025-02-27 12:48 ` Zijun Hu
2025-02-27 12:48 ` Zijun Hu
2025-02-27 13:03 ` Peter Zijlstra
2025-02-27 13:03 ` Peter Zijlstra
2025-03-03 11:30 ` Zijun Hu
2025-03-03 11:30 ` Zijun Hu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250221200137.GH7373@noisy.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@kernel.org \
--cc=arnd@arndb.de \
--cc=brgl@bgdev.pl \
--cc=dakr@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=hch@lst.de \
--cc=herbert@gondor.apana.org.au \
--cc=horms@kernel.org \
--cc=iommu@lists.linux.dev \
--cc=jgg@ziepe.ca \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=johannes@sipsolutions.net \
--cc=kuba@kernel.org \
--cc=lee@kernel.org \
--cc=leon@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=miquel.raynal@bootlin.com \
--cc=netdev@vger.kernel.org \
--cc=npiggin@gmail.com \
--cc=pabeni@redhat.com \
--cc=quic_zijuhu@quicinc.com \
--cc=rafael@kernel.org \
--cc=richard@nod.at \
--cc=robin.murphy@arm.com \
--cc=tglx@linutronix.de \
--cc=tgraf@suug.ch \
--cc=vigneshr@ti.com \
--cc=will@kernel.org \
--cc=xiyou.wangcong@gmail.com \
--cc=zijun_hu@icloud.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.