mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] spi: spi-qpic-snand: remove interim 'dev_data' variable from qcom_spi_probe()
@ 2026-09-08 20:23 Gabor Juhos
  2026-09-09 17:31 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Gabor Juhos @ 2026-09-08 20:23 UTC (permalink / raw)
  To: Mark Brown; +Cc: linux-spi, linux-kernel, Gabor Juhos

The dev_data variable in the qcom_spi_probe() function is only used
to temporarily store a pointer of the device specific data before that
value gets assigned to 'snandc->props'. Remove the interim variable
and use 'snandc->props' directly instead in order to simplify the code.

No functional changes.

Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
---
 drivers/spi/spi-qpic-snand.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/spi/spi-qpic-snand.c b/drivers/spi/spi-qpic-snand.c
index 61b1f2eb19ce..9eafaea74f6b 100644
--- a/drivers/spi/spi-qpic-snand.c
+++ b/drivers/spi/spi-qpic-snand.c
@@ -1585,7 +1585,6 @@ static int qcom_spi_probe(struct platform_device *pdev)
 	struct qpic_spi_nand *qspi;
 	struct qpic_ecc *ecc;
 	struct resource *res;
-	const void *dev_data;
 	int ret;
 
 	ecc = devm_kzalloc(dev, sizeof(*ecc), GFP_KERNEL);
@@ -1613,14 +1612,12 @@ static int qcom_spi_probe(struct platform_device *pdev)
 	snandc->qspi->ctlr = ctlr;
 	snandc->qspi->ecc = ecc;
 
-	dev_data = of_device_get_match_data(dev);
-	if (!dev_data) {
+	snandc->props = of_device_get_match_data(dev);
+	if (!snandc->props) {
 		dev_err(&pdev->dev, "failed to get device data\n");
 		return -ENODEV;
 	}
 
-	snandc->props = dev_data;
-
 	snandc->core_clk = devm_clk_get_enabled(dev, "core");
 	if (IS_ERR(snandc->core_clk))
 		return PTR_ERR(snandc->core_clk);

---
base-commit: cb2ad3c020579bf51fb0d702db9cf64af9698377
change-id: 20260908-qpic-snand-drop-dev_data-var-f6e740cc0227

Best regards,
-- 
Gabor Juhos <j4g8y7@gmail.com>


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

* Re: [PATCH] spi: spi-qpic-snand: remove interim 'dev_data' variable from qcom_spi_probe()
  2026-09-08 20:23 [PATCH] spi: spi-qpic-snand: remove interim 'dev_data' variable from qcom_spi_probe() Gabor Juhos
@ 2026-09-09 17:31 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2026-09-09 17:31 UTC (permalink / raw)
  To: Gabor Juhos; +Cc: linux-spi, linux-kernel

On Tue, 08 Sep 2026 22:23:55 +0200, Gabor Juhos wrote:
> spi: spi-qpic-snand: remove interim 'dev_data' variable from qcom_spi_probe()

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-7.4

Thanks!

[1/1] spi: spi-qpic-snand: remove interim 'dev_data' variable from qcom_spi_probe()
      https://git.kernel.org/broonie/spi/c/44d39535cd4f

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] 2+ messages in thread

end of thread, other threads:[~2026-09-10 10:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-08 20:23 [PATCH] spi: spi-qpic-snand: remove interim 'dev_data' variable from qcom_spi_probe() Gabor Juhos
2026-09-09 17:31 ` 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®