[PATCH 1/8] mtd: rawnand: qcom: make check_flash_errors() more generic

sashiko-bot at kernel.org sashiko-bot at kernel.org
Thu Sep 24 13:09:31 PDT 2026


Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] mtd: rawnand: qcom: mismatch between commit message and function prefix
--

commit a83607e63ec53429dc425262093eef9dee3bfd4e
Author: Gabor Juhos <j4g8y7 at gmail.com>

mtd: rawnand: qcom: make check_flash_errors() more generic

The function gets a qcom_nand_host pointer as a parameter but it is
only used to extract the nand controller's private structure from that.
In order to make the function more generic, change the declaration to
get a qcom_nandc_controller pointer directly, and update the callers
accordingly.

> diff --git a/drivers/mtd/nand/raw/qcom_nandc.c b/drivers/mtd/nand/raw/qcom_nandc.c
> index d7642db2e2df1..12bfb14cd9a37 100644
> --- a/drivers/mtd/nand/raw/qcom_nandc.c
> +++ b/drivers/mtd/nand/raw/qcom_nandc.c
> @@ -449,10 +449,9 @@ struct read_stats {
>  };
>  
>  /* reads back FLASH_STATUS register set by the controller */
> -static int check_flash_errors(struct qcom_nand_host *host, int cw_cnt)
> +static int qcom_nandc_check_flash_errors(struct qcom_nand_controller *nandc,
> +					 int cw_cnt)
>  {

[Severity: Medium]
This isn't a bug, but there is a mismatch between the commit message and
the actual function renaming.

The commit message states the function will use the "qpic_nandc" prefix:
"While at it, also change the function name to use a 'qpic_nandc' prefix."

However, the code changes the name to qcom_nandc_check_flash_errors, using
the "qcom_nandc" prefix instead.

Could the commit message be updated to match the code, or should the
function be named qpic_nandc_check_flash_errors?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260924-qcom_nandc-share-more-code-v1-0-f3012199b161@gmail.com?part=1



More information about the linux-mtd mailing list