mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/1] hwmon: remove unnecessary (void*) conversions
@ 2023-01-11  2:07 XU pengfei
  2023-01-11  3:29 ` Guenter Roeck
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: XU pengfei @ 2023-01-11  2:07 UTC (permalink / raw)
  To: jdelvare, linux; +Cc: linux-hwmon, linux-kernel, XU pengfei

Pointer variables of void * type do not require type cast.

Signed-off-by: XU pengfei <xupengfei@nfschina.com>
---
 drivers/hwmon/ibmpex.c   | 2 +-
 drivers/hwmon/powr1220.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/hwmon/ibmpex.c b/drivers/hwmon/ibmpex.c
index 1837cccd993c..db066b368918 100644
--- a/drivers/hwmon/ibmpex.c
+++ b/drivers/hwmon/ibmpex.c
@@ -546,7 +546,7 @@ static void ibmpex_bmc_gone(int iface)
 
 static void ibmpex_msg_handler(struct ipmi_recv_msg *msg, void *user_msg_data)
 {
-	struct ibmpex_bmc_data *data = (struct ibmpex_bmc_data *)user_msg_data;
+	struct ibmpex_bmc_data *data = user_msg_data;
 
 	if (msg->msgid != data->tx_msgid) {
 		dev_err(data->bmc_device,
diff --git a/drivers/hwmon/powr1220.c b/drivers/hwmon/powr1220.c
index f77dc6db31ac..501337ee5aa3 100644
--- a/drivers/hwmon/powr1220.c
+++ b/drivers/hwmon/powr1220.c
@@ -174,7 +174,7 @@ static umode_t
 powr1220_is_visible(const void *data, enum hwmon_sensor_types type, u32
 		    attr, int channel)
 {
-	struct powr1220_data *chip_data = (struct powr1220_data *)data;
+	struct powr1220_data *chip_data = data;
 
 	if (channel >= chip_data->max_channels)
 		return 0;
-- 
2.18.2


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

end of thread, other threads:[~2023-01-11  8:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-11  2:07 [PATCH 1/1] hwmon: remove unnecessary (void*) conversions XU pengfei
2023-01-11  3:29 ` Guenter Roeck
2023-01-11  6:03   ` Ammar Faizi
2023-01-11  6:09     ` Ammar Faizi
2023-01-11  7:24 ` kernel test robot
2023-01-11  7:54 ` kernel test robot
2023-01-11  8:55 ` kernel test robot

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®