Thread (14 messages) 14 messages, 6 authors, 2023-10-02

RE: [PATCH 22/23] gpio: xilinx: Convert to platform remove callback returning void

From: "Datta, Shubhrajyoti" <shubhrajyoti.datta@amd.com>
Date: 2023-09-28 08:32:49
Also in: linux-gpio, lkml

[AMD Official Use Only - General]

Hi ,
Thanks for the patch
-----Original Message-----
From: Uwe Kleine-König <redacted>
Sent: Thursday, September 28, 2023 12:37 PM
To: Linus Walleij <redacted>; Bartosz Golaszewski
[off-list ref]
Cc: Datta, Shubhrajyoti <shubhrajyoti.datta@amd.com>; Neeli, Srinivas
[off-list ref]; Simek, Michal [off-list ref]; Andy
Shevchenko [off-list ref]; linux-gpio@vger.kernel.org; linux-arm-
kernel@lists.infradead.org; linux-kernel@vger.kernel.org
Subject: [PATCH 22/23] gpio: xilinx: Convert to platform remove callback
returning void

Caution: This message originated from an External Source. Use proper caution
when opening attachments, clicking links, or responding.


The .remove() callback for a platform driver returns an int which makes many
driver authors wrongly assume it's possible to do error handling by returning
an error code. However the value returned is ignored (apart from emitting a
warning) and this typically results in resource leaks.

To improve here there is a quest to make the remove callback return void. In
the first step of this quest all drivers are converted to .remove_new(), which
already returns void. Eventually after all drivers are converted, .remove_new()
will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove callback
to the void returning variant.

Signed-off-by: Uwe Kleine-König <redacted>
Reviewed-by: Shubhrajyoti Datta <shubhrajyoti.datta@amd.com>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help