[PATCH 5/8] mtd: rawnand: qcom: make nandc_set_read_loc_first() more generic

sashiko-bot at kernel.org sashiko-bot at kernel.org
Thu Sep 24 13:10:03 PDT 2026


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

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

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

This commit modifies nandc_set_read_loc_first() to take a controller 
pointer rather than a chip pointer to make it more generic. It also 
intends to rename the function with a new prefix.

> In order to make the function more generic, change the declaration
> to get a 'qcom_nandc_controller' pointer directly, and update the
> callers accordingly. While at it, also change the function name to
> use a 'qpic_nandc' prefix.

> diff --git a/drivers/mtd/nand/raw/qcom_nandc.c b/drivers/mtd/nand/raw/qcom_nandc.c
> index 99fbf54580836..96a1a5a03de87 100644
> --- a/drivers/mtd/nand/raw/qcom_nandc.c
> +++ b/drivers/mtd/nand/raw/qcom_nandc.c
> @@ -150,8 +150,8 @@ static bool qcom_nandc_is_last_cw(struct nand_ecc_ctrl *ecc, int cw)
>  }
>  
>  /**
> - * nandc_set_read_loc_first() - to set read location first register
> - * @chip:		NAND Private Flash Chip Data
> + * qcom_nandc_set_read_loc_first() - to set read location first register
> + * @nandc:		NAND controller's private data
>   * @reg_base:		location register base
>   * @cw_offset:		code word offset
>   * @read_size:		code word read length
> @@ -159,11 +159,10 @@ static bool qcom_nandc_is_last_cw(struct nand_ecc_ctrl *ecc, int cw)
>   *
>   * This function will set location register value
>   */
> -static void nandc_set_read_loc_first(struct nand_chip *chip,
> -				     int reg_base, u32 cw_offset,
> -				     u32 read_size, u32 is_last_read_loc)
> +static void qcom_nandc_set_read_loc_first(struct qcom_nand_controller *nandc,
> +					  int reg_base, u32 cw_offset,
> +					  u32 read_size, u32 is_last_read_loc)

[Severity: Medium]
Does this implementation match the intended function name prefix? The commit 
message mentions using a 'qpic_nandc' prefix, but it is defined here as 
qcom_nandc_set_read_loc_first.

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



More information about the linux-mtd mailing list