[PATCH RFC 06/16] spi: amlogic: spifc-a4: Consume dummy cycles directly

sashiko-bot at kernel.org sashiko-bot at kernel.org
Wed Nov 25 09:59:12 PST 2026


Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] spi: amlogic: unused dummy_cycle and aml_sfc_is_xio_op() in
  spifc-a4
--

commit d55fa85d06375ffce26e0f147adc64d4704ca984
Author: Miquel Raynal <miquel.raynal at bootlin.com>

spi: amlogic: spifc-a4: Consume dummy cycles directly

This commit enables the dummy_cycles spi-mem capability and updates the
driver to use op->dummy.ncycles directly instead of converting from
op->dummy.nbytes.

> diff --git a/drivers/spi/spi-amlogic-spifc-a4.c b/drivers/spi/spi-amlogic-spifc-a4.c
> index 16346f50c7d99..ac06ea735133b 100644
> --- a/drivers/spi/spi-amlogic-spifc-a4.c
> +++ b/drivers/spi/spi-amlogic-spifc-a4.c
> @@ -361,13 +361,8 @@ static int aml_sfc_send_cmd_addr_dummy(struct aml_sfc *sfc, const struct spi_mem
>  	if (ret)
>  		return ret;
>  
> -	if (op->dummy.nbytes) {
> -		/*  Dummy buswidth configuration is not supported */
> -		if (aml_sfc_is_xio_op(op))
> -			dummy_cycle = op->dummy.nbytes * 8 / op->data.buswidth;
> -		else
> -			dummy_cycle = op->dummy.nbytes * 8;
> -		cmd = CMD_DUMMY(sfc->cs_sel, dummy_cycle - 1);
> +	if (op->dummy.ncycles) {
> +		cmd = CMD_DUMMY(sfc->cs_sel, op->dummy.ncycles - 1);
>  		return regmap_write(sfc->regmap_base, SFC_CMD, cmd);
>  	}

[Severity: Medium]
Does removing this block leave the local variable dummy_cycle in
aml_sfc_send_cmd_addr_dummy() and the static helper aml_sfc_is_xio_op()
unused, causing -Wunused-variable and -Wunused-function warnings (and a
build failure with CONFIG_WERROR=y)?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261125-macronix-upstreaming-spi-mem-cycles-v1-0-fd036402fd37@bootlin.com?part=6



More information about the linux-mtd mailing list