]> www.infradead.org Git - users/jedix/linux-maple.git/commit
spidev: Decrease indentation level in spidev_ioctl() SPI_IOC_RD_MODE*
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 24 Aug 2023 16:22:07 +0000 (19:22 +0300)
committerMark Brown <broonie@kernel.org>
Mon, 11 Sep 2023 00:31:49 +0000 (01:31 +0100)
commit12c8d7a76cd6100a2f35b9ef4b87d11128b9105b
tree56218c16788c220cef81bd78202fd0f26ec2b4b5
parent2d98bdad98aec8238a21712c22d97ff53f290c55
spidev: Decrease indentation level in spidev_ioctl() SPI_IOC_RD_MODE*

Instead of defining a local controller variable inside an indented
block, move the definition to the top of spidev_ioctl() and reuse
it in the SPI_IOC_RD_MODE* and SPI_IOC_WR_MODE* cases.

This drops unneeded indentation and reduces amount of LoCs.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
Link: https://lore.kernel.org/r/20230824162209.2890440-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spidev.c