linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc: mpc8349emitx: Make mcu_gpiochip_remove() return void
@ 2021-10-21 10:56 Uwe Kleine-König
  2021-11-02 10:12 ` Michael Ellerman
  0 siblings, 1 reply; 2+ messages in thread
From: Uwe Kleine-König @ 2021-10-21 10:56 UTC (permalink / raw)
  To: Scott Wood, Michael Ellerman; +Cc: Paul Mackerras, linuxppc-dev, kernel

Up to now mcu_gpiochip_remove() returns zero unconditionally. Make it
return void instead which makes it easier to see in the callers that
there is no error to handle.

Also the return value of i2c remove callbacks is ignored anyway.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c b/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c
index 409481016928..bb789f33c70e 100644
--- a/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c
+++ b/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c
@@ -135,11 +135,10 @@ static int mcu_gpiochip_add(struct mcu *mcu)
 	return gpiochip_add_data(gc, mcu);
 }
 
-static int mcu_gpiochip_remove(struct mcu *mcu)
+static void mcu_gpiochip_remove(struct mcu *mcu)
 {
 	kfree(mcu->gc.label);
 	gpiochip_remove(&mcu->gc);
-	return 0;
 }
 
 static int mcu_probe(struct i2c_client *client)
@@ -198,9 +197,7 @@ static int mcu_remove(struct i2c_client *client)
 		glob_mcu = NULL;
 	}
 
-	ret = mcu_gpiochip_remove(mcu);
-	if (ret)
-		return ret;
+	mcu_gpiochip_remove(mcu);
 	kfree(mcu);
 	return 0;
 }
-- 
2.30.2


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

* Re: [PATCH] powerpc: mpc8349emitx: Make mcu_gpiochip_remove() return void
  2021-10-21 10:56 [PATCH] powerpc: mpc8349emitx: Make mcu_gpiochip_remove() return void Uwe Kleine-König
@ 2021-11-02 10:12 ` Michael Ellerman
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2021-11-02 10:12 UTC (permalink / raw)
  To: Scott Wood, Michael Ellerman, Uwe Kleine-König
  Cc: Paul Mackerras, linuxppc-dev, kernel

On Thu, 21 Oct 2021 12:56:57 +0200, Uwe Kleine-König wrote:
> Up to now mcu_gpiochip_remove() returns zero unconditionally. Make it
> return void instead which makes it easier to see in the callers that
> there is no error to handle.
> 
> Also the return value of i2c remove callbacks is ignored anyway.
> 
> 
> [...]

Applied to powerpc/next.

[1/1] powerpc: mpc8349emitx: Make mcu_gpiochip_remove() return void
      https://git.kernel.org/powerpc/c/5d354dc35ebb0b224d627264c60f60dbda3a1bc3

cheers

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

end of thread, other threads:[~2021-11-02 11:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-21 10:56 [PATCH] powerpc: mpc8349emitx: Make mcu_gpiochip_remove() return void Uwe Kleine-König
2021-11-02 10:12 ` Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).