[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240220110128.3cadbcc2@xps-13>
Date: Tue, 20 Feb 2024 11:01:28 +0100
From: Miquel Raynal <miquel.raynal@...tlin.com>
To: William Zhang <william.zhang@...adcom.com>
Cc: Linux MTD List <linux-mtd@...ts.infradead.org>, Linux ARM List
<linux-arm-kernel@...ts.infradead.org>, Broadcom Kernel List
<bcm-kernel-feedback-list@...adcom.com>, f.fainelli@...il.com,
kursad.oney@...adcom.com, joel.peshkin@...adcom.com,
anand.gore@...adcom.com, dregan@...l.com, kamal.dasu@...adcom.com,
tomer.yacoby@...adcom.com, dan.beygelman@...adcom.com, David Regan
<dregan@...adcom.com>, Dan Carpenter <dan.carpenter@...aro.org>,
linux-kernel@...r.kernel.org, Vignesh Raghavendra <vigneshr@...com>, Brian
Norris <computersforpeace@...il.com>, Richard Weinberger <richard@....at>
Subject: Re: [PATCH v5 11/12] mtd: rawnand: brcmnand: exec_op helper
functions return type fixes
Hi,
william.zhang@...adcom.com wrote on Wed, 7 Feb 2024 12:22:56 -0800:
> From: David Regan <dregan@...adcom.com>
>
> fix return type for exec_op reset and status detect helper functions
Please make a correct sentence (Fic, detect?, '.').
> Reported-by: Dan Carpenter <dan.carpenter@...aro.org>
> Closes: http://lists.infradead.org/pipermail/linux-mtd/2023-December/102423.html
> Fixes: 3c8260ce7663 ("mtd: rawnand: brcmnand: exec_op implementation")
> Signed-off-by: David Regan <dregan@...adcom.com>
> Signed-off-by: William Zhang <william.zhang@...adcom.com>
> Reviewed-by: William Zhang <william.zhang@...adcom.com>
>
> ---
>
> Changes in v5: None
> Changes in v4:
> - Fix the commit id in the fixes tag
>
> Changes in v3: None
> Changes in v2:
> - Added to patch series
>
> drivers/mtd/nand/raw/brcmnand/brcmnand.c | 15 +++++++++------
> 1 file changed, 9 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/mtd/nand/raw/brcmnand/brcmnand.c b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
> index 8c1489ff7bd6..7ce2b267676f 100644
> --- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c
> +++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
> @@ -625,7 +625,7 @@ enum {
> /* Only for v7.2 */
> #define ACC_CONTROL_ECC_EXT_SHIFT 13
>
> -static u8 brcmnand_status(struct brcmnand_host *host);
> +static int brcmnand_status(struct brcmnand_host *host);
>
> static inline bool brcmnand_non_mmio_ops(struct brcmnand_controller *ctrl)
> {
> @@ -1749,7 +1749,7 @@ static int brcmnand_waitfunc(struct nand_chip *chip)
> INTFC_FLASH_STATUS;
> }
>
> -static u8 brcmnand_status(struct brcmnand_host *host)
> +static int brcmnand_status(struct brcmnand_host *host)
> {
> struct nand_chip *chip = &host->chip;
> struct mtd_info *mtd = nand_to_mtd(chip);
> @@ -1760,7 +1760,7 @@ static u8 brcmnand_status(struct brcmnand_host *host)
> return brcmnand_waitfunc(chip);
> }
>
> -static u8 brcmnand_reset(struct brcmnand_host *host)
> +static int brcmnand_reset(struct brcmnand_host *host)
> {
> struct nand_chip *chip = &host->chip;
>
> @@ -2492,11 +2492,14 @@ static int brcmnand_exec_op(struct nand_chip *chip,
>
> if (brcmnand_op_is_status(op)) {
> status = op->instrs[1].ctx.data.buf.in;
> - *status = brcmnand_status(host);
> + ret = brcmnand_status(host);
> + if (ret < 0)
> + return ret;
> +
> + *status = ret & 0xFF;
>
> return 0;
> - }
> - else if (brcmnand_op_is_reset(op)) {
> + } else if (brcmnand_op_is_reset(op)) {
This is another change, please make it in another patch. Also while you
are at it, there are probably other checkpatch warnings that can be
fixed, if you want.
> ret = brcmnand_reset(host);
> if (ret < 0)
> return ret;
Thanks,
Miquèl
Powered by blists - more mailing lists