Received: by 2002:ab2:788f:0:b0:1ee:8f2e:70ae with SMTP id b15csp152678lqi; Wed, 6 Mar 2024 12:49:48 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVJfNk57hqNrse6ijsm3UrD2HJXa0PMu8NfgeCTVEwCM4n0e2UbYTN1PbTcHFPMSES697DPJvZN8kdQhFxpvREtYgt+vWbOwtYz2jzuCA== X-Google-Smtp-Source: AGHT+IHHkmnF14D+rkm9IIdYXBUeyhkwRar9vn9SxaFw6LI8FGPlgCKZ2+sD+yfLZe2KghbuyPyl X-Received: by 2002:a05:620a:2a11:b0:788:42f9:5328 with SMTP id o17-20020a05620a2a1100b0078842f95328mr2256080qkp.59.1709758187803; Wed, 06 Mar 2024 12:49:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709758187; cv=pass; d=google.com; s=arc-20160816; b=LWYB/UVXEyrLhDvzIWt7f6lBBduSdcOOqHcagCGEgeTqlV99Mh/xmV6OuH/HzLfXrD BMhJBD2VwV9BNv7lX1/sPoWZlmATyWpe2SmasUBSu+C5VK55QUl7Kg5xHXGTOitUVNZO uYnz+YrfOFHabDu0jZ3BKvzwCLKijaVuljkeCPWU108POteJ/7h58dWIMPJ5d2A199og 9MOfI+mOF1cKXqm2S6u6ys/wHxeZDG0x4zuYq+pvhdqOcdslvnk2oyr3xjNy2Q46GdlD CcL/MFBORjPlCOjJJ0oekEGhsU6cFjBTgy6Sg0Na220bjut8ANZoyH96yXtkUC5G8vll 8Osw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Ow2bJDZHIOf/6igE/KhcehTJAmDzHvpWjmUZu+Rns58=; fh=WQ+tvQfT0hqMgZqeMeUT/1IcROPDKM/Mn4O3ZVLX3bg=; b=jS+Ijd9/Wyc+91cusStf+s54UqivlfR9hgox6VsVUuyP2sXUVotExxXigQeKwQFGD5 np90PiMZlR01B3rAie6Q9ZV2hRjWcfhcDAHw2UPrFCD53mekd1qxitxlWg2lVUxJGjCa mRFW+AW1MD5aonJgrikG8fv5AjyrpnW52oNROJgoHOcSp5XiDktX9cJV2B4Rv52mf49W SOAqBgbtr18Z9UckY+kjr4BiCo85rvG3qA5rqf6c+G1KH6PQyz/QzAk5+JZEXK4gi4/i EeTkxl28+n2JLGMozF9s2b4i90AiK3Lnkx7rwlI3RQVP9aP08p6vNZhyXB16CTuru34r wZ3Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=KcoqCCIO; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-94570-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-94570-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id x6-20020a05620a098600b0078846497017si22180qkx.528.2024.03.06.12.49.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 12:49:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-94570-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=KcoqCCIO; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-94570-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-94570-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 87CD01C20D56 for ; Wed, 6 Mar 2024 20:49:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 986B817543; Wed, 6 Mar 2024 20:49:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="KcoqCCIO" Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E5A5014A82 for ; Wed, 6 Mar 2024 20:49:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.249 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709758179; cv=none; b=k4NO2U+dOsfXK28WGRBT439XKlFZJfLJyrVdkA0/OUBhVifHr+HM/1s8ChRqPky5u5K+XAbFb/BNMGMfmvkPaZqLcao7pe3Gxtz2DLb3znu0MLQWccrKUO5SaWqttUPKW61Y2mzIk7pVKH3krLkGrE6jW18VIOKnYcgv5M5f0zM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709758179; c=relaxed/simple; bh=LK0gBJGkoaxvPUcQkbcW85MwC6l95SvrK86Yk7Qjrwc=; h=Date:From:To:CC:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=mb9sVGGKu3EaM8Yrss6JHJX/1p0rxuKME+TKOJAkqwvRtnP9/22BW1UOYnKtuq7E8nHpMLLNR5w8nPKHXBOBrt/9sX/69Q6vaDnDyVhq4pwfprcWcML/K+gkCnqlenH4vSGbozxh8M2mekJVgNGwt/+L2msv1HzGXJOQS6xcZT4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=KcoqCCIO; arc=none smtp.client-ip=198.47.23.249 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 426KnHKZ077609; Wed, 6 Mar 2024 14:49:17 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1709758157; bh=Ow2bJDZHIOf/6igE/KhcehTJAmDzHvpWjmUZu+Rns58=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=KcoqCCIOLbX4YeHIzuGlPoM0Wmev536JdwEHJdqMpPotaPzqUVIFATkbAxWOu0r0/ UXSga6WDTSeBhe2frLfGB1xA3ZwZZZObLUAPAKSRrJw/cOCgJKaWOMnIj/DkPrH1FR ZlZo5h7vVgknJN26leqPFq8gFjWP+kiOeL7RHtvk= Received: from DLEE110.ent.ti.com (dlee110.ent.ti.com [157.170.170.21]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 426KnH7J010115 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 6 Mar 2024 14:49:17 -0600 Received: from DLEE109.ent.ti.com (157.170.170.41) by DLEE110.ent.ti.com (157.170.170.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 6 Mar 2024 14:49:17 -0600 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Wed, 6 Mar 2024 14:49:17 -0600 Received: from localhost (uda0133052.dhcp.ti.com [128.247.81.232]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 426KnHQl052746; Wed, 6 Mar 2024 14:49:17 -0600 Date: Wed, 6 Mar 2024 14:49:17 -0600 From: Nishanth Menon To: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= CC: Philipp Zabel , Tero Kristo , Santosh Shilimkar , , , Subject: Re: [PATCH 3/3] reset: ti-sci: Convert to platform remove callback returning void Message-ID: <20240306204917.l4vlp6hjotkwa5ig@stingy> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 On 22:32-20240305, Uwe Kleine-K?nig wrote: > 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 > --- Thanks. Reviewed-by: Nishanth Menon > drivers/reset/reset-ti-sci.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/reset/reset-ti-sci.c b/drivers/reset/reset-ti-sci.c > index cc01fa5b0bea..d384da0982fa 100644 > --- a/drivers/reset/reset-ti-sci.c > +++ b/drivers/reset/reset-ti-sci.c > @@ -235,20 +235,18 @@ static int ti_sci_reset_probe(struct platform_device *pdev) > return reset_controller_register(&data->rcdev); > } > > -static int ti_sci_reset_remove(struct platform_device *pdev) > +static void ti_sci_reset_remove(struct platform_device *pdev) > { > struct ti_sci_reset_data *data = platform_get_drvdata(pdev); > > reset_controller_unregister(&data->rcdev); > > idr_destroy(&data->idr); > - > - return 0; > } > > static struct platform_driver ti_sci_reset_driver = { > .probe = ti_sci_reset_probe, > - .remove = ti_sci_reset_remove, > + .remove_new = ti_sci_reset_remove, > .driver = { > .name = "ti-sci-reset", > .of_match_table = ti_sci_reset_of_match, > -- > 2.43.0 > -- Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D