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 876C0CE79AA for ; Tue, 19 Sep 2023 17:22:11 +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=liNK3S7m75HRdNc7/Sus6DMCS/KBsUKxoikZwR4dTxs=; b=z0K18LP5UpJOXr Aq6gE32Tie8dElcXuoTTXDAtcpRCDeFp0VDW8M/3hzbXUUWkywXZS/6wA30GPCwK91BQMRj0WEvYB 6Jwbxm8LqFqaYvs2/H3WLPoBLL+5BV4Jp/GqtDsOCPpAozE8inrGpoCDH5zr/u1+7f4iNhbgjYkOV KIDeTsuT9saPiJbydd2jsVFhwkTH6jENJZe+jWGRh+Ndtg+kquWBlnDHcnsMdRt6mi5f/QaCwtEem UfhxH0ydSF8+FOQaB8OLICIbx29N7kYN3DIu93nd1pBHYa0G0eKJ8VvL/UuVxwqjmbdbZOr2gRGtS oewrEuS4q5b5QFafDVrA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qieQ0-000vZZ-12; Tue, 19 Sep 2023 17:21:48 +0000 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qiePy-000vYW-1P for linux-arm-kernel@lists.infradead.org; Tue, 19 Sep 2023 17:21:47 +0000 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-40479f8325fso52182475e9.1 for ; Tue, 19 Sep 2023 10:21:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695144104; x=1695748904; 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=WCW05DYPpdGYyJU3IE/oUGPdifsWeWp895tHny3FRl8=; b=TlO6FRxMdbtb15Sc7azRpq/m+RO6f9lGccOFrxK9+KhdL+WgcKaXyfDgIYxubwMSAh mkOXXqq4GSJILdGAkIE/klssJRC8FRG8uaARQIY2cwCik+Ne00DJPIwwI+1bXgMKzsXU hBnxH9vyGmfoRikoNqHgTFzsH892SHXaeWM1Fi7FTHmlnrM6GydMv0CHW9cFpl9xHyff gdGCuot9HAEnTvQfXnaon8KRfimWhF/SiLuDmtnVhzHoSwQAtYnb2A/1TP3+1XaoGiwj NYQ/rWAAETK1c80xbbhaDbc8eUFHhelFZDAFD+BaXqR6DsiEsi/7pc1UNzHfqXfVQHp8 Awrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695144104; x=1695748904; 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=WCW05DYPpdGYyJU3IE/oUGPdifsWeWp895tHny3FRl8=; b=CYjMVbinCQu2ekD5GeEnHt7rUcRE2YF4AfAOdSsq8mCAWO1SCU2o5aSJD8MREbKipk fJ5qJY6YAro+4jmnGqFHqvPYsqGlBOeZUNkkceX0B4dso024JwR8v4rPsWR4PaIBFSGT ybaPdkvB4S81o/LA9ldhNVsW5XrdF7wnCjXkK797py5OwVu7jHgOwAJt1m9CBWVzEVVT LhLQDy+UMO90/0QP1krEaeysiHgOznwtJ+Q6h+T6KauGin3LfSXbY9ztlKZndyB5Wdy3 Kirc4TUXzBlCLBUnedPvhRs8zVyZ9ZgvyXUp7IuMr/WGdq6SVO6LELVI4WUtAaoJ0Ty8 /V1A== X-Gm-Message-State: AOJu0YzUZAGPP5LtSlpLE31fZkiX7e9dsRbwuTfUV+0N2pjyuCMaudZW oGIM0jOgeuKG8rzyk8zwb0THfvbvD4JDfg== X-Google-Smtp-Source: AGHT+IH2Km3ubh0lb33ebM1eHNMAYyqIfJqNboXqNuS/MKTzpkoELMt5NJJdos3JsfqGyHZjA2EDMA== X-Received: by 2002:adf:e506:0:b0:319:8bb3:ab83 with SMTP id j6-20020adfe506000000b003198bb3ab83mr226937wrm.66.1695144103504; Tue, 19 Sep 2023 10:21:43 -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 kg11-20020a17090776eb00b009a1a653770bsm8078550ejc.87.2023.09.19.10.21.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Sep 2023 10:21:43 -0700 (PDT) From: Jernej =?utf-8?B?xaBrcmFiZWM=?= To: Vinod Koul , Uwe =?ISO-8859-1?Q?Kleine=2DK=F6nig?= Cc: Chen-Yu Tsai , Samuel Holland , dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, kernel@pengutronix.de Subject: Re: [PATCH 45/59] dma: sun4i-dma: Convert to platform remove callback returning void Date: Tue, 19 Sep 2023 19:21:41 +0200 Message-ID: <1868017.tdWV9SEqCh@jernej-laptop> In-Reply-To: <20230919133207.1400430-46-u.kleine-koenig@pengutronix.de> References: <20230919133207.1400430-1-u.kleine-koenig@pengutronix.de> <20230919133207.1400430-46-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_102146_480188_509299BC X-CRM114-Status: GOOD ( 22.71 ) 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 15:31:53 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() is 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/dma/sun4i-dma.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > = > diff --git a/drivers/dma/sun4i-dma.c b/drivers/dma/sun4i-dma.c > index e86c8829513a..2e7f9b07fdd2 100644 > --- a/drivers/dma/sun4i-dma.c > +++ b/drivers/dma/sun4i-dma.c > @@ -1271,7 +1271,7 @@ static int sun4i_dma_probe(struct platform_device > *pdev) return ret; > } > = > -static int sun4i_dma_remove(struct platform_device *pdev) > +static void sun4i_dma_remove(struct platform_device *pdev) > { > struct sun4i_dma_dev *priv =3D platform_get_drvdata(pdev); > = > @@ -1282,8 +1282,6 @@ static int sun4i_dma_remove(struct platform_device > *pdev) dma_async_device_unregister(&priv->slave); > = > clk_disable_unprepare(priv->clk); > - > - return 0; > } > = > static const struct of_device_id sun4i_dma_match[] =3D { > @@ -1294,7 +1292,7 @@ MODULE_DEVICE_TABLE(of, sun4i_dma_match); > = > static struct platform_driver sun4i_dma_driver =3D { > .probe =3D sun4i_dma_probe, > - .remove =3D sun4i_dma_remove, > + .remove_new =3D sun4i_dma_remove, > .driver =3D { > .name =3D "sun4i-dma", > .of_match_table =3D sun4i_dma_match, _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel