]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
spi: Drop redundant 'cs' variable declaration in __spi_add_device()
authorLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Wed, 20 May 2026 09:13:42 +0000 (10:13 +0100)
committerMark Brown <broonie@kernel.org>
Thu, 21 May 2026 15:58:01 +0000 (16:58 +0100)
Remove the redundant local variable 'cs' definition declared within the
chipselect GPIO configuration block.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Link: https://patch.msgid.link/20260520091342.68029-1-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi.c

index 0576bd00d3ef2c789010f8d81b110ed9c3ea95ab..fe7e3b3b98fc897ee1e8e35dc1a98a8444d5e45c 100644 (file)
@@ -732,8 +732,6 @@ static int __spi_add_device(struct spi_device *spi, struct spi_device *parent)
        }
 
        if (ctlr->cs_gpiods) {
-               u8 cs;
-
                for (idx = 0; idx < spi->num_chipselect; idx++) {
                        cs = spi_get_chipselect(spi, idx);
                        spi_set_csgpiod(spi, idx, ctlr->cs_gpiods[cs]);