[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250221-rmv_return-v1-18-cc8dff275827@quicinc.com>
Date: Fri, 21 Feb 2025 05:02:23 -0800
From: Zijun Hu <quic_zijuhu@...cinc.com>
To: 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>,
Peter Zijlstra
<peterz@...radead.org>, Arnd Bergmann <arnd@...db.de>,
Thomas Gleixner
<tglx@...utronix.de>,
Herbert Xu <herbert@...dor.apana.org.au>,
"David S.
Miller" <davem@...emloft.net>,
Greg Kroah-Hartman
<gregkh@...uxfoundation.org>,
"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>
CC: 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>,
Zijun Hu
<quic_zijuhu@...cinc.com>
Subject: [PATCH *-next 18/18] mtd: nand: Do not return void function in
void function
In the following three void APIs:
nanddev_pos_next_lun()
nanddev_pos_next_eraseblock()
nanddev_pos_next_page()
For void function void func(...), convert weird statement:
return func(...);
"to":
func(...);
return;
Signed-off-by: Zijun Hu <quic_zijuhu@...cinc.com>
---
include/linux/mtd/nand.h | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index 0e2f228e8b4a..8e3f6cca0b24 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -863,8 +863,10 @@ static inline void nanddev_pos_next_target(struct nand_device *nand,
static inline void nanddev_pos_next_lun(struct nand_device *nand,
struct nand_pos *pos)
{
- if (pos->lun >= nand->memorg.luns_per_target - 1)
- return nanddev_pos_next_target(nand, pos);
+ if (pos->lun >= nand->memorg.luns_per_target - 1) {
+ nanddev_pos_next_target(nand, pos);
+ return;
+ }
pos->lun++;
pos->page = 0;
@@ -883,8 +885,10 @@ static inline void nanddev_pos_next_lun(struct nand_device *nand,
static inline void nanddev_pos_next_eraseblock(struct nand_device *nand,
struct nand_pos *pos)
{
- if (pos->eraseblock >= nand->memorg.eraseblocks_per_lun - 1)
- return nanddev_pos_next_lun(nand, pos);
+ if (pos->eraseblock >= nand->memorg.eraseblocks_per_lun - 1) {
+ nanddev_pos_next_lun(nand, pos);
+ return;
+ }
pos->eraseblock++;
pos->page = 0;
@@ -902,8 +906,10 @@ static inline void nanddev_pos_next_eraseblock(struct nand_device *nand,
static inline void nanddev_pos_next_page(struct nand_device *nand,
struct nand_pos *pos)
{
- if (pos->page >= nand->memorg.pages_per_eraseblock - 1)
- return nanddev_pos_next_eraseblock(nand, pos);
+ if (pos->page >= nand->memorg.pages_per_eraseblock - 1) {
+ nanddev_pos_next_eraseblock(nand, pos);
+ return;
+ }
pos->page++;
}
--
2.34.1
Powered by blists - more mailing lists