From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 48997E732C4 for ; Thu, 28 Sep 2023 11:17:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232250AbjI1LRt (ORCPT ); Thu, 28 Sep 2023 07:17:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233333AbjI1LRc (ORCPT ); Thu, 28 Sep 2023 07:17:32 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 59B771BF2 for ; Thu, 28 Sep 2023 04:13:53 -0700 (PDT) Received: from [192.168.1.100] (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id C2DD76607336; Thu, 28 Sep 2023 12:13:50 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1695899631; bh=vt+eEJt4ajZtDOlxkU9Rl6zW9Xq2pnaSuLgWUp/+gks=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=j374uUjBLK6D6A7uRZtkk/gqQbKmOpzs5AluTgfHWamDrSJ6RqIfEskZ0R6Qe9abZ jW+Kok8c5w3pkWL2hQSVTkBIiUV4H9m4xAJ+g7audG6VSoXQfNSg7mqdeK/iNU6beS xxo7SE7lFTi1Z9QMmN1IpuPOO9QOFpmqrDaksykEShVSbBqT1PYk5aTpupCdVsep8o oe+dswcxhYhmu+wbXOpzlhvqhNGv41um7BwA/0E+WpexxxFaRwVc9c3GMakWKCTmAu xKKG2z0nOLFL8Jlxk/RVf0n4uy5lv22nn/N58q31OEBhiTTtWwYmrbSr02jv1RXfSl MO7xkkUGFwGzw== Message-ID: <0a9b601a-dad5-358c-0555-1c10d3136826@collabora.com> Date: Thu, 28 Sep 2023 13:13:47 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 Subject: Re: [PATCH 18/31] thermal: lvts: Convert to platform remove callback returning void Content-Language: en-US To: =?UTF-8?Q?Uwe_Kleine-K=c3=b6nig?= , "Rafael J. Wysocki" , Daniel Lezcano Cc: Amit Kucheria , Zhang Rui , Matthias Brugger , =?UTF-8?B?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= , Alexandre Mergnat , Balsam CHIHI , Chen-Yu Tsai , Chen Jiahao , linux-pm@vger.kernel.org, kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org References: <20230927193736.2236447-1-u.kleine-koenig@pengutronix.de> <20230927193736.2236447-19-u.kleine-koenig@pengutronix.de> From: AngeloGioacchino Del Regno In-Reply-To: <20230927193736.2236447-19-u.kleine-koenig@pengutronix.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Il 27/09/23 21:37, Uwe Kleine-König ha scritto: > 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 Reviewed-by: AngeloGioacchino Del Regno