diff mbox series

drm/ssd130x: Make ssd130x_remove() return void

Message ID 20220425192306.59800-1-u.kleine-koenig@pengutronix.de (mailing list archive)
State Accepted, archived
Commit a4359b4e479b
Headers show
Series drm/ssd130x: Make ssd130x_remove() return void | expand

Commit Message

Uwe Kleine-König April 25, 2022, 7:23 p.m. UTC
This function returns zero unconditionally, so there isn't any benefit
of returning a value. Make it return void to be able to see at a glance
that the return value of ssd130x_i2c_remove() is always zero.

This patch is a preparation for making i2c remove callbacks return void.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/gpu/drm/solomon/ssd130x-i2c.c | 4 +++-
 drivers/gpu/drm/solomon/ssd130x.c     | 4 +---
 drivers/gpu/drm/solomon/ssd130x.h     | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)


base-commit: 3123109284176b1532874591f7c81f3837bbdc17

Comments

Javier Martinez Canillas April 26, 2022, 7:33 a.m. UTC | #1
Hello Uwe,

Thanks for your patch.

On 4/25/22 21:23, Uwe Kleine-König wrote:
> This function returns zero unconditionally, so there isn't any benefit
> of returning a value. Make it return void to be able to see at a glance
> that the return value of ssd130x_i2c_remove() is always zero.
> 
> This patch is a preparation for making i2c remove callbacks return void.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---

Acked-by: Javier Martinez Canillas <javierm@redhat.com>

and I'll push to drm-misc (drm-misc-next) now.
diff mbox series

Patch

diff --git a/drivers/gpu/drm/solomon/ssd130x-i2c.c b/drivers/gpu/drm/solomon/ssd130x-i2c.c
index 3126aeda4ced..54c8e2e4d9dd 100644
--- a/drivers/gpu/drm/solomon/ssd130x-i2c.c
+++ b/drivers/gpu/drm/solomon/ssd130x-i2c.c
@@ -43,7 +43,9 @@  static int ssd130x_i2c_remove(struct i2c_client *client)
 {
 	struct ssd130x_device *ssd130x = i2c_get_clientdata(client);
 
-	return ssd130x_remove(ssd130x);
+	ssd130x_remove(ssd130x);
+
+	return 0;
 }
 
 static void ssd130x_i2c_shutdown(struct i2c_client *client)
diff --git a/drivers/gpu/drm/solomon/ssd130x.c b/drivers/gpu/drm/solomon/ssd130x.c
index ce4dc20412e0..e6feb2a166a6 100644
--- a/drivers/gpu/drm/solomon/ssd130x.c
+++ b/drivers/gpu/drm/solomon/ssd130x.c
@@ -824,11 +824,9 @@  struct ssd130x_device *ssd130x_probe(struct device *dev, struct regmap *regmap)
 }
 EXPORT_SYMBOL_GPL(ssd130x_probe);
 
-int ssd130x_remove(struct ssd130x_device *ssd130x)
+void ssd130x_remove(struct ssd130x_device *ssd130x)
 {
 	drm_dev_unplug(&ssd130x->drm);
-
-	return 0;
 }
 EXPORT_SYMBOL_GPL(ssd130x_remove);
 
diff --git a/drivers/gpu/drm/solomon/ssd130x.h b/drivers/gpu/drm/solomon/ssd130x.h
index cd21cdccb566..f633bac84477 100644
--- a/drivers/gpu/drm/solomon/ssd130x.h
+++ b/drivers/gpu/drm/solomon/ssd130x.h
@@ -70,7 +70,7 @@  struct ssd130x_device {
 };
 
 struct ssd130x_device *ssd130x_probe(struct device *dev, struct regmap *regmap);
-int ssd130x_remove(struct ssd130x_device *ssd130x);
+void ssd130x_remove(struct ssd130x_device *ssd130x);
 void ssd130x_shutdown(struct ssd130x_device *ssd130x);
 
 #endif /* __SSD1307X_H__ */