mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] spi: qcom-geni: rename setup_fifo_params() to setup_spi_params() and make it void
@ 2026-08-24 10:13 Viken Dadhaniya
  2026-08-24 12:55 ` Konrad Dybcio
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Viken Dadhaniya @ 2026-08-24 10:13 UTC (permalink / raw)
  To: Mark Brown; +Cc: linux-arm-msm, linux-spi, linux-kernel, Viken Dadhaniya

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>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] spi: qcom-geni: rename setup_fifo_params() to setup_spi_params() and make it void
  2026-08-24 10:13 [PATCH] spi: qcom-geni: rename setup_fifo_params() to setup_spi_params() and make it void Viken Dadhaniya
@ 2026-08-24 12:55 ` Konrad Dybcio
  2026-08-25  8:31 ` Mukesh Savaliya
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Konrad Dybcio @ 2026-08-24 12:55 UTC (permalink / raw)
  To: Viken Dadhaniya, Mark Brown; +Cc: linux-arm-msm, linux-spi, linux-kernel

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] spi: qcom-geni: rename setup_fifo_params() to setup_spi_params() and make it void
  2026-08-24 10:13 [PATCH] spi: qcom-geni: rename setup_fifo_params() to setup_spi_params() and make it void Viken Dadhaniya
  2026-08-24 12:55 ` Konrad Dybcio
@ 2026-08-25  8:31 ` Mukesh Savaliya
  2026-08-25 10:09   ` Abel Vesa
  2026-08-25 12:58 ` Mukesh Savaliya
  2026-08-31 17:51 ` Mark Brown
  3 siblings, 1 reply; 8+ messages in thread
From: Mukesh Savaliya @ 2026-08-25  8:31 UTC (permalink / raw)
  To: Viken Dadhaniya, Mark Brown; +Cc: linux-arm-msm, linux-spi, linux-kernel



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>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] spi: qcom-geni: rename setup_fifo_params() to setup_spi_params() and make it void
  2026-08-25  8:31 ` Mukesh Savaliya
@ 2026-08-25 10:09   ` Abel Vesa
  2026-08-25 13:00     ` Mark Brown
  2026-08-25 13:12     ` Mukesh Savaliya
  0 siblings, 2 replies; 8+ messages in thread
From: Abel Vesa @ 2026-08-25 10:09 UTC (permalink / raw)
  To: Mukesh Savaliya
  Cc: Viken Dadhaniya, Mark Brown, linux-arm-msm, linux-spi, linux-kernel

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.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] spi: qcom-geni: rename setup_fifo_params() to setup_spi_params() and make it void
  2026-08-24 10:13 [PATCH] spi: qcom-geni: rename setup_fifo_params() to setup_spi_params() and make it void Viken Dadhaniya
  2026-08-24 12:55 ` Konrad Dybcio
  2026-08-25  8:31 ` Mukesh Savaliya
@ 2026-08-25 12:58 ` Mukesh Savaliya
  2026-08-31 17:51 ` Mark Brown
  3 siblings, 0 replies; 8+ messages in thread
From: Mukesh Savaliya @ 2026-08-25 12:58 UTC (permalink / raw)
  To: Viken Dadhaniya, Mark Brown; +Cc: linux-arm-msm, linux-spi, linux-kernel



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>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] spi: qcom-geni: rename setup_fifo_params() to setup_spi_params() and make it void
  2026-08-25 10:09   ` Abel Vesa
@ 2026-08-25 13:00     ` Mark Brown
  2026-08-25 13:12     ` Mukesh Savaliya
  1 sibling, 0 replies; 8+ messages in thread
From: Mark Brown @ 2026-08-25 13:00 UTC (permalink / raw)
  To: Abel Vesa
  Cc: Mukesh Savaliya, Viken Dadhaniya, linux-arm-msm, linux-spi, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 556 bytes --]

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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] spi: qcom-geni: rename setup_fifo_params() to setup_spi_params() and make it void
  2026-08-25 10:09   ` Abel Vesa
  2026-08-25 13:00     ` Mark Brown
@ 2026-08-25 13:12     ` Mukesh Savaliya
  1 sibling, 0 replies; 8+ messages in thread
From: Mukesh Savaliya @ 2026-08-25 13:12 UTC (permalink / raw)
  To: Abel Vesa
  Cc: Viken Dadhaniya, Mark Brown, linux-arm-msm, linux-spi, linux-kernel



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.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] spi: qcom-geni: rename setup_fifo_params() to setup_spi_params() and make it void
  2026-08-24 10:13 [PATCH] spi: qcom-geni: rename setup_fifo_params() to setup_spi_params() and make it void Viken Dadhaniya
                   ` (2 preceding siblings ...)
  2026-08-25 12:58 ` Mukesh Savaliya
@ 2026-08-31 17:51 ` Mark Brown
  3 siblings, 0 replies; 8+ messages in thread
From: Mark Brown @ 2026-08-31 17:51 UTC (permalink / raw)
  To: Viken Dadhaniya; +Cc: linux-arm-msm, linux-spi, linux-kernel

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-09-01 21:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-24 10:13 [PATCH] spi: qcom-geni: rename setup_fifo_params() to setup_spi_params() and make it void Viken Dadhaniya
2026-08-24 12:55 ` Konrad Dybcio
2026-08-25  8:31 ` Mukesh Savaliya
2026-08-25 10:09   ` Abel Vesa
2026-08-25 13:00     ` Mark Brown
2026-08-25 13:12     ` Mukesh Savaliya
2026-08-25 12:58 ` Mukesh Savaliya
2026-08-31 17:51 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®