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 C60E5C04AA7 for ; Wed, 20 Sep 2023 16:08:03 +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=mwvNF6eUMSeVqmWPdBFLHEtisBMa6qg4T8R9yUdWOcI=; b=4Hedw2nnRwDa8P u1FWf+gDsyMye80eGFfDw2u8InGCCUWzh4+s33X99BXvu8OgDAy4pQQzncG0YQQv4YlLsqMRcKkoU c7a4pyOawzYu2FNbgJ1N57R1myBH2VwJCD3iD1CC/HrQb5QAkqE1cG90uk8ilhF9v1kuT6FD8xra7 JP4Uz8E4vNmkyld2+LsIpmMtLEyjnP1vcFlh3xHdix7U2QBXcvAo6OrKWIJNjcG4SVDwXrG30FaKJ zfrVntRvY4pto/4yijvhxnNyb49Le1pGBXIFnI1LtEclRcpo4TjwwXdftenXBvbGF4cgJ986ARMe0 IBMW1JztQnBhRGfPTfaw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qizjl-003ap9-2u; Wed, 20 Sep 2023 16:07:37 +0000 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qizjj-003anh-18 for linux-arm-kernel@lists.infradead.org; Wed, 20 Sep 2023 16:07:36 +0000 Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-532aaba8747so3258939a12.3 for ; Wed, 20 Sep 2023 09:07:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695226051; x=1695830851; 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=Q835YQDxM8a/Ydr2pG5h6K5+mFIlQ7bWDlpZnNz4kb4=; b=NXQufxc9N501Ssz2/oqijwGPXc9qHtrw+2R3gVkiJHmQpKdboGOYaBadLa4Iyprs3V bhyzlFV16n+0VJO6Jug3mJ+22ecrEEKMACv5VJJKhZUci558sgxseWZ8fDYnV6tyiLxn rVRCs2ZG9JV9StU1BRZFaqyemK5idIRF0W03IM5w3XuG2d/9Zwu+I7JsQL04sPfFlzUC 1DEbaAd4OP5ixrnkIAvvG17Wr6sXmyukKfZapnzKBouPpcoq7g6tRGmbEvsprSVPFH8S mlLrRcaLoox1au0ArmU72AlOrniAkoTmmc8WLR/RudkkIWIHeANDyMruz75TaMajH0a9 ajdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695226051; x=1695830851; 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=Q835YQDxM8a/Ydr2pG5h6K5+mFIlQ7bWDlpZnNz4kb4=; b=mY7B4oUIC90Y7ZG5smWWWXkRKY791HLtUnel6R0KGbd14jgOG3PsuZ7cvwUNrF3yBr 481i+gimmI20SLVceSvt0yup+70wRQnkPEd8New3g372RSl4scGYRjY6GJDQq6LijDz/ 0+yUfTeMcP7nf98/62MQJOFnvyMb38Qt2+1GGNrh6go2oWdyt2zyG6xm8MIXcWnJBQrk bRCM6R8Oklb0hmXUbiiYwA9q7C2NE1O7mGQISusO0rCvYQSRCABrrpcE4qt9aEANgs02 cPfbrEcFytOPFLXNUYzGeL7vZ3FnyA4SXtGppvku7rxcVv6f/iy/rGPLTtq/e7rPH4VE jh5w== X-Gm-Message-State: AOJu0Yy0bsem+EyPPPCu1zeNbWH1EGCCb9bl6IR0+RrE65F+0jsMB/bx p+YTeuAB+8h7/Z1+TkO2Bo0= X-Google-Smtp-Source: AGHT+IF+rmJKa4uB821gWE6ZlcCqFgyUhV7B2Ym02NESinzdpuwM0CQ3PlLZxaP3wSctTJ6kAsqMhg== X-Received: by 2002:a17:907:b609:b0:9ae:61d:4248 with SMTP id vl9-20020a170907b60900b009ae061d4248mr2345778ejc.48.1695226051345; Wed, 20 Sep 2023 09:07:31 -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 y15-20020a1709060a8f00b0099cb1a2cab0sm9464544ejf.28.2023.09.20.09.07.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 09:07:31 -0700 (PDT) From: Jernej =?utf-8?B?xaBrcmFiZWM=?= To: Dmitry Torokhov , Uwe =?ISO-8859-1?Q?Kleine=2DK=F6nig?= Cc: Chen-Yu Tsai , Samuel Holland , linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, kernel@pengutronix.de Subject: Re: [PATCH 42/52] input: sun4i-ps2 - Convert to platform remove callback returning void Date: Wed, 20 Sep 2023 18:07:30 +0200 Message-ID: <3766083.kQq0lBPeGt@jernej-laptop> In-Reply-To: <20230920125829.1478827-43-u.kleine-koenig@pengutronix.de> References: <20230920125829.1478827-1-u.kleine-koenig@pengutronix.de> <20230920125829.1478827-43-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-20230920_090735_409013_09B577FC X-CRM114-Status: GOOD ( 22.60 ) 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 sreda, 20. september 2023 ob 14:58:19 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/input/serio/sun4i-ps2.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > = > diff --git a/drivers/input/serio/sun4i-ps2.c > b/drivers/input/serio/sun4i-ps2.c index eb262640192e..aec66d9f5176 100644 > --- a/drivers/input/serio/sun4i-ps2.c > +++ b/drivers/input/serio/sun4i-ps2.c > @@ -297,7 +297,7 @@ static int sun4i_ps2_probe(struct platform_device *pd= ev) > return error; > } > = > -static int sun4i_ps2_remove(struct platform_device *pdev) > +static void sun4i_ps2_remove(struct platform_device *pdev) > { > struct sun4i_ps2data *drvdata =3D platform_get_drvdata(pdev); > = > @@ -311,8 +311,6 @@ static int sun4i_ps2_remove(struct platform_device > *pdev) iounmap(drvdata->reg_base); > = > kfree(drvdata); > - > - return 0; > } > = > static const struct of_device_id sun4i_ps2_match[] =3D { > @@ -324,7 +322,7 @@ MODULE_DEVICE_TABLE(of, sun4i_ps2_match); > = > static struct platform_driver sun4i_ps2_driver =3D { > .probe =3D sun4i_ps2_probe, > - .remove =3D sun4i_ps2_remove, > + .remove_new =3D sun4i_ps2_remove, > .driver =3D { > .name =3D DRIVER_NAME, > .of_match_table =3D sun4i_ps2_match, _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel