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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8B9BDCE79A9 for ; Tue, 19 Sep 2023 17:59:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=umVuDyvY2k1zDw5vLtj81uwHLGwGM0RCSW09i471lDI=; b=cYk+PSl/bXuWa0 xcS1zc5uGxQK/E7YKkhys1Gs3hT1sOIiZe0GjkLF+j87g3dSEf8EVVzps8mx23A6vBiW6vti3BOl8 5Od75ehuJzlizHigds9kFbf0oXlCVxyoLIyi8shibh+zRgH0rpMxOedx1vQTFuCGhbsZstbmqB+of uPaZ8ySUdNK9ihXsdU+728jqSclHoo6XvTXZk4YPNmLn5PCnoaH9pNvTE1HpnUhoTEPqGK4hbPYJz c9n8sbCx2T9ZuYU5LC8e2XL2KRrTmW0xJyqcvax7az18JqLA8YXqIpFPNw76U0CMCODlRjiFrT93K 18nK2jmmDVH3RDTgu9ZA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qiezt-0011Cc-0D; Tue, 19 Sep 2023 17:58:53 +0000 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qiezq-0011BK-2N for linux-arm-kernel@lists.infradead.org; Tue, 19 Sep 2023 17:58:51 +0000 Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-99c93638322so15725966b.1 for ; Tue, 19 Sep 2023 10:58:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695146327; x=1695751127; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=u1NRUeCHZVcU7vFnB9mFf3Vt372PLclrw8mQfXYBE3E=; b=LCjoZCNNCi/84Xa+IQMDtib7NXOhQph1jVwE2UF0ewQPJF+IAZcDBLg+SuZx9gGOTy 6bFIVglJ4f3qDFVAN7vR3mARBkUNLw5BF+98nCygljboHHx4ScZfMdvI3w/ahCGOeADD UVLuEnzNvUUQoKaPq95hBLizptyzxX1Erml8yYApiLW8Cvb59xFpLP+ubAenjR4yVoaF jpV6EXJEFdZi64vJSofCCdfmCphGtix0bTDWslYUeF50xsPbJ3BxfqDgqAXtnjmvoJdN mVEzT7cBB+0o6yppuE90ZXjCMk7uWY52VImzhvaGeW2ubVr0eqiPacbqQdINcqPl/fUI PZyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695146327; x=1695751127; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=u1NRUeCHZVcU7vFnB9mFf3Vt372PLclrw8mQfXYBE3E=; b=EozQ826TILGyrc8zQ7zKJoO/jbkJ1wiHBnzeYqfQoPA+8CbRJphcsJidMlY0oQMBPu HSvOfiXCEHcjCiOeLaSWB2AVgq2FmCDuD3iGnoF+iW0EKSrAp8WZI51r7ygc0+ANZ7FX 452hoA/TOXKVS9tQBRXQ2iB5p2EvwCmgo1ttw1Ktyu3D0wgNWIbGL8mS5Ip0zSBbNL4J s3MIA4sbEMH/5ES+RSu6d4+CjVXIXL4GeBKv6AloxcewKtJK0UIviMxaHB2o7CCIb0J8 nOQ7sslH95FFU6SFZo4s2/iO4E55mQ6muoEQY+sIwma2+uWsdB6E6+HFqp+flkj4wjYy CZIg== X-Gm-Message-State: AOJu0YzN/ZkfZhSG3pZbGN7QoBAkKDwH28Xz2yTOTBt913WYVSXWrXld xc07ehPOxeTAJErIRSxYNasLROIEnO6UJZ95 X-Google-Smtp-Source: AGHT+IEiBbBQwup9WppiUmb+sqxSKYGgUrzhNxvYEKeXarSza67dv9jMX7VWYr8RD6NZ6k7/WFS3xA== X-Received: by 2002:a17:907:25cd:b0:9ad:e62c:4517 with SMTP id ae13-20020a17090725cd00b009ade62c4517mr4196555ejc.34.1695146326452; Tue, 19 Sep 2023 10:58:46 -0700 (PDT) Received: from jernej-laptop.localnet (82-149-12-148.dynamic.telemach.net. [82.149.12.148]) by smtp.gmail.com with ESMTPSA id d25-20020aa7d5d9000000b005288f0e547esm7697627eds.55.2023.09.19.10.58.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Sep 2023 10:58:46 -0700 (PDT) From: Jernej =?utf-8?B?xaBrcmFiZWM=?= To: Jonathan Cameron , Uwe =?ISO-8859-1?Q?Kleine=2DK=F6nig?= Cc: Lars-Peter Clausen , Chen-Yu Tsai , Samuel Holland , "Rafael J. Wysocki" , Damien Le Moal , Mark Brown , Ido Schimmel , Heiko Stuebner , Daniel Lezcano , Rob Herring , linux-iio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, kernel@pengutronix.de Subject: Re: [PATCH 24/49] iio: adc: sun4i-gpadc-iio: Convert to platform remove callback returning void Date: Tue, 19 Sep 2023 19:58:44 +0200 Message-ID: <2243607.iZASKD2KPV@jernej-laptop> In-Reply-To: <20230919174931.1417681-25-u.kleine-koenig@pengutronix.de> References: <20230919174931.1417681-1-u.kleine-koenig@pengutronix.de> <20230919174931.1417681-25-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230919_105850_771382_2577DC62 X-CRM114-Status: GOOD ( 22.36 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Dne torek, 19. september 2023 ob 19:49:06 CEST je Uwe Kleine-K=F6nig napisa= l(a): > 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=F6nig Acked-by: Jernej Skrabec Best regards, Jernej > --- > drivers/iio/adc/sun4i-gpadc-iio.c | 8 +++----- > 1 file changed, 3 insertions(+), 5 deletions(-) > = > diff --git a/drivers/iio/adc/sun4i-gpadc-iio.c > b/drivers/iio/adc/sun4i-gpadc-iio.c index 25bba96367a8..100ecced5fc1 1006= 44 > --- a/drivers/iio/adc/sun4i-gpadc-iio.c > +++ b/drivers/iio/adc/sun4i-gpadc-iio.c > @@ -669,7 +669,7 @@ static int sun4i_gpadc_probe(struct platform_device > *pdev) return ret; > } > = > -static int sun4i_gpadc_remove(struct platform_device *pdev) > +static void sun4i_gpadc_remove(struct platform_device *pdev) > { > struct iio_dev *indio_dev =3D platform_get_drvdata(pdev); > struct sun4i_gpadc_iio *info =3D iio_priv(indio_dev); > @@ -678,12 +678,10 @@ static int sun4i_gpadc_remove(struct platform_device > *pdev) pm_runtime_disable(&pdev->dev); > = > if (!IS_ENABLED(CONFIG_THERMAL_OF)) > - return 0; > + return; > = > if (!info->no_irq) > iio_map_array_unregister(indio_dev); > - > - return 0; > } > = > static const struct platform_device_id sun4i_gpadc_id[] =3D { > @@ -702,7 +700,7 @@ static struct platform_driver sun4i_gpadc_driver =3D { > }, > .id_table =3D sun4i_gpadc_id, > .probe =3D sun4i_gpadc_probe, > - .remove =3D sun4i_gpadc_remove, > + .remove_new =3D sun4i_gpadc_remove, > }; > MODULE_DEVICE_TABLE(of, sun4i_gpadc_of_id); _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel