Skip to content

Commit 2e0d75f

Browse files
dlechbroonie
authored andcommitted
spi: axi-spi-engine: return void from spi_engine_compile_message()
In the AXI SPI Engine driver, the spi_engine_compile_message() function does not return any error and none of the callers check the return value. So we can change the return type to void and drop the return 0. Signed-off-by: David Lechner <dlechner@baylibre.com> Acked-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Nuno Sa <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20231204-axi-spi-engine-series-2-v1-1-063672323fce@baylibre.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 8e6a439 commit 2e0d75f

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

drivers/spi/spi-axi-spi-engine.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ static void spi_engine_gen_cs(struct spi_engine_program *p, bool dry,
218218
spi_engine_program_add_cmd(p, dry, SPI_ENGINE_CMD_ASSERT(1, mask));
219219
}
220220

221-
static int spi_engine_compile_message(struct spi_engine *spi_engine,
221+
static void spi_engine_compile_message(struct spi_engine *spi_engine,
222222
struct spi_message *msg, bool dry, struct spi_engine_program *p)
223223
{
224224
struct spi_device *spi = msg->spi;
@@ -273,8 +273,6 @@ static int spi_engine_compile_message(struct spi_engine *spi_engine,
273273

274274
if (!keep_cs)
275275
spi_engine_gen_cs(p, dry, spi, false);
276-
277-
return 0;
278276
}
279277

280278
static void spi_engine_xfer_next(struct spi_message *msg,

0 commit comments

Comments
 (0)