drivers/spi/spi-geni-qcom.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-)
The function always returned 0 and had no error paths, so change its
return type to void. Drop the now-dead ret variable and error check
in spi_geni_prepare_message().
setup_fifo_params() is called for both GENI_SE_FIFO and GENI_SE_DMA
modes, so the "fifo" in the name is misleading. Rename it to
setup_spi_params() to better reflect its purpose of configuring SPI
mode parameters (CS, CPHA, CPOL, loopback, LSB-first).
No functional change.
Signed-off-by: Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com>
---
drivers/spi/spi-geni-qcom.c | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/drivers/spi/spi-geni-qcom.c b/drivers/spi/spi-geni-qcom.c
index 6c57f8309a3b..05abaf18a0f4 100644
--- a/drivers/spi/spi-geni-qcom.c
+++ b/drivers/spi/spi-geni-qcom.c
@@ -363,8 +363,8 @@ static int geni_spi_set_clock_and_bw(struct geni_se *se,
return 0;
}
-static int setup_fifo_params(struct spi_device *spi_slv,
- struct spi_controller *spi)
+static void setup_spi_params(struct spi_device *spi_slv,
+ struct spi_controller *spi)
{
struct spi_geni_master *mas = spi_controller_get_devdata(spi);
struct geni_se *se = &mas->se;
@@ -390,8 +390,6 @@ static int setup_fifo_params(struct spi_device *spi_slv,
trace_geni_spi_setup_params(mas->dev, chipselect, spi_slv->mode,
mode_changed, cs_changed);
-
- return 0;
}
static void
@@ -554,17 +552,14 @@ static int spi_geni_prepare_message(struct spi_controller *spi,
struct spi_message *spi_msg)
{
struct spi_geni_master *mas = spi_controller_get_devdata(spi);
- int ret;
switch (mas->cur_xfer_mode) {
case GENI_SE_FIFO:
case GENI_SE_DMA:
if (spi_geni_is_abort_still_pending(mas))
return -EBUSY;
- ret = setup_fifo_params(spi_msg->spi, spi);
- if (ret)
- dev_err(mas->dev, "Couldn't select mode %d\n", ret);
- return ret;
+ setup_spi_params(spi_msg->spi, spi);
+ return 0;
case GENI_GPI_DMA:
/* nothing to do for GPI DMA */
@@ -700,7 +695,7 @@ static int spi_geni_init(struct spi_geni_master *mas)
case 0:
mas->cur_xfer_mode = GENI_SE_FIFO;
geni_se_select_mode(se, GENI_SE_FIFO);
- /* setup_fifo_params assumes that these registers start with a zero value */
+ /* setup_spi_params assumes that these registers start with a zero value */
writel(0, se->base + SE_SPI_LOOPBACK);
writel(0, se->base + SE_SPI_DEMUX_SEL);
writel(0, se->base + SE_SPI_CPHA);
---
base-commit: 903c1cf6dff9964e71eda98a39e2e5d442050472
change-id: 20260824-spi-qcom-geni-cleanup-setup-fifo-params-55c5b814b69c
Best regards,
--
Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com>
On Mon, 24 Aug 2026 15:43:58 +0530, Viken Dadhaniya wrote:
> spi: qcom-geni: rename setup_fifo_params() to setup_spi_params() and make it void
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-7.4
Thanks!
[1/1] spi: qcom-geni: rename setup_fifo_params() to setup_spi_params() and make it void
https://git.kernel.org/broonie/spi/c/ed07cdb2b386
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
On 8/24/2026 3:43 PM, Viken Dadhaniya wrote: > The function always returned 0 and had no error paths, so change its > return type to void. Drop the now-dead ret variable and error check > in spi_geni_prepare_message(). > > setup_fifo_params() is called for both GENI_SE_FIFO and GENI_SE_DMA > modes, so the "fifo" in the name is misleading. Rename it to > setup_spi_params() to better reflect its purpose of configuring SPI > mode parameters (CS, CPHA, CPOL, loopback, LSB-first). > > No functional change. > > Signed-off-by: Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com> > --- Reviewed-by: Mukesh Kumar Savaliya <mukesh.savaliya@oss.qualcomm.com>
On 8/24/2026 3:43 PM, Viken Dadhaniya wrote: > The function always returned 0 and had no error paths, so change its > return type to void. Drop the now-dead ret variable and error check > in spi_geni_prepare_message(). > > setup_fifo_params() is called for both GENI_SE_FIFO and GENI_SE_DMA > modes, so the "fifo" in the name is misleading. Rename it to > setup_spi_params() to better reflect its purpose of configuring SPI > mode parameters (CS, CPHA, CPOL, loopback, LSB-first). > > No functional change. > > Signed-off-by: Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com> > ---Reviewed-by: Mukesh Kumar Savaliya <mukesh.savaliya@oss.qualcomm.com>
On 26-08-25 14:01:10, Mukesh Savaliya wrote: > > > On 8/24/2026 3:43 PM, Viken Dadhaniya wrote: > > The function always returned 0 and had no error paths, so change its > > return type to void. Drop the now-dead ret variable and error check > > in spi_geni_prepare_message(). > > > > setup_fifo_params() is called for both GENI_SE_FIFO and GENI_SE_DMA > > modes, so the "fifo" in the name is misleading. Rename it to > > setup_spi_params() to better reflect its purpose of configuring SPI > > mode parameters (CS, CPHA, CPOL, loopback, LSB-first). > > > > No functional change. > > > > Signed-off-by: Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com> > > ---Reviewed-by: Mukesh Kumar Savaliya <mukesh.savaliya@oss.qualcomm.com> FYI, there is a chance these might not be picked up by b4, when applying. Make sure when you reply with tags, they are actually part of the new message.
On 8/25/2026 3:39 PM, Abel Vesa wrote: > On 26-08-25 14:01:10, Mukesh Savaliya wrote: >> >> >> On 8/24/2026 3:43 PM, Viken Dadhaniya wrote: >>> The function always returned 0 and had no error paths, so change its >>> return type to void. Drop the now-dead ret variable and error check >>> in spi_geni_prepare_message(). >>> >>> setup_fifo_params() is called for both GENI_SE_FIFO and GENI_SE_DMA >>> modes, so the "fifo" in the name is misleading. Rename it to >>> setup_spi_params() to better reflect its purpose of configuring SPI >>> mode parameters (CS, CPHA, CPOL, loopback, LSB-first). >>> >>> No functional change. >>> >>> Signed-off-by: Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com> >>> ---Reviewed-by: Mukesh Kumar Savaliya <mukesh.savaliya@oss.qualcomm.com> > > FYI, there is a chance these might not be picked up by b4, when > applying. > > Make sure when you reply with tags, they are actually part of the new > message. Thanks Abel for pointing this ! i realized line got mixed.
On Tue, Aug 25, 2026 at 01:09:40PM +0300, Abel Vesa wrote: > On 26-08-25 14:01:10, Mukesh Savaliya wrote: > > > Signed-off-by: Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com> > > > ---Reviewed-by: Mukesh Kumar Savaliya <mukesh.savaliya@oss.qualcomm.com> > FYI, there is a chance these might not be picked up by b4, when > applying. > Make sure when you reply with tags, they are actually part of the new > message. Never mind b4, humans like me will also struggle to see what the new content was in the mail. Please resend, it'll make life easier.
On 8/24/26 12:13 PM, Viken Dadhaniya wrote: > The function always returned 0 and had no error paths, so change its > return type to void. Drop the now-dead ret variable and error check > in spi_geni_prepare_message(). > > setup_fifo_params() is called for both GENI_SE_FIFO and GENI_SE_DMA > modes, so the "fifo" in the name is misleading. Rename it to > setup_spi_params() to better reflect its purpose of configuring SPI > mode parameters (CS, CPHA, CPOL, loopback, LSB-first). > > No functional change. > > Signed-off-by: Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com> > --- Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Konrad
© 2016 - 2026 Red Hat, Inc.