All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert+renesas@glider.be>
To: Mark Brown <broonie@kernel.org>, Min Li <min.li.xe@renesas.com>,
	Lee Jones <lee@kernel.org>, Vladimir Oltean <olteanv@gmail.com>,
	Amit Kumar Mahapatra <amit.kumar-mahapatra@amd.com>,
	Michal Simek <michal.simek@amd.com>
Cc: linux-spi@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Geert Uytterhoeven <geert+renesas@glider.be>
Subject: [PATCH 1/6] mfd: rsmu_spi: Remove unneeded casts of void *
Date: Mon, 13 Mar 2023 11:58:33 +0100	[thread overview]
Message-ID: <ae84c1751e79cb49ab584557f4ecd835a8493d7c.1678704562.git.geert+renesas@glider.be> (raw)
In-Reply-To: <cover.1678704562.git.geert+renesas@glider.be>

There is no need to cast a "void *" to a different type of pointer.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/mfd/rsmu_spi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mfd/rsmu_spi.c b/drivers/mfd/rsmu_spi.c
index d2f3d8f1e05af054..2428aaa9aaed9e43 100644
--- a/drivers/mfd/rsmu_spi.c
+++ b/drivers/mfd/rsmu_spi.c
@@ -129,7 +129,7 @@ static int rsmu_write_page_register(struct rsmu_ddata *rsmu, u16 reg)
 
 static int rsmu_reg_read(void *context, unsigned int reg, unsigned int *val)
 {
-	struct rsmu_ddata *rsmu = spi_get_drvdata((struct spi_device *)context);
+	struct rsmu_ddata *rsmu = spi_get_drvdata(context);
 	u8 addr = (u8)(reg & RSMU_LOWER_ADDR_MASK);
 	int err;
 
@@ -146,7 +146,7 @@ static int rsmu_reg_read(void *context, unsigned int reg, unsigned int *val)
 
 static int rsmu_reg_write(void *context, unsigned int reg, unsigned int val)
 {
-	struct rsmu_ddata *rsmu = spi_get_drvdata((struct spi_device *)context);
+	struct rsmu_ddata *rsmu = spi_get_drvdata(context);
 	u8 addr = (u8)(reg & RSMU_LOWER_ADDR_MASK);
 	u8 data = (u8)val;
 	int err;
-- 
2.34.1


  reply	other threads:[~2023-03-13 10:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-13 10:58 [PATCH 0/6] spi: struct spi_device constification Geert Uytterhoeven
2023-03-13 10:58 ` Geert Uytterhoeven [this message]
2023-03-16 16:13   ` [PATCH 1/6] mfd: rsmu_spi: Remove unneeded casts of void * Lee Jones
2023-03-13 10:58 ` [PATCH 2/6] spi: fsl-dspi: Remove unneeded cast to same type Geert Uytterhoeven
2023-03-13 10:58 ` [PATCH 3/6] spi: Constify spi_get_ctldata()'s spi parameter Geert Uytterhoeven
2023-03-13 10:58 ` [PATCH 4/6] spi: Constify spi_get_drvdata()'s " Geert Uytterhoeven
2023-03-13 10:58 ` [PATCH 5/6] spi: Constify spi parameters of chip select APIs Geert Uytterhoeven
2023-03-13 10:58 ` [PATCH 6/6] spi: sh-msiof: Remove casts to drop constness Geert Uytterhoeven
2023-03-13 18:20 ` (subset) [PATCH 0/6] spi: struct spi_device constification Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ae84c1751e79cb49ab584557f4ecd835a8493d7c.1678704562.git.geert+renesas@glider.be \
    --to=geert+renesas@glider.be \
    --cc=amit.kumar-mahapatra@amd.com \
    --cc=broonie@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=michal.simek@amd.com \
    --cc=min.li.xe@renesas.com \
    --cc=olteanv@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.