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 DC8C0C25B46 for ; Mon, 23 Oct 2023 17:30:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230096AbjJWRas (ORCPT ); Mon, 23 Oct 2023 13:30:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233761AbjJWRa2 (ORCPT ); Mon, 23 Oct 2023 13:30:28 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61A831FF6 for ; Mon, 23 Oct 2023 10:29:35 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2F4F3C433C7; Mon, 23 Oct 2023 17:29:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1698082174; bh=2+hONU89DemXhRBKRzK5D1IJ54WGbWU18HcZam5AUhQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Q1GKrp8yyWW1ya6sXsQ16Xy3xZfZ1s0pVrmgvpfioRRt5f8Ru0ZlMykXvLQZlj60X RLMA/8K3/bcL0TtaYy5ASLUyCvO9kKzSWUufx3PvUOzeNMswxG24TPhwjOxsHr/RdJ zb4VDTUNsSl0X92FRYKRIGDn/tZN+CJMdWGSZ0Ha0avZqNTzpv6Ne6HPY//X4+Pw6N f99iqiqeq+mFveEqikIPQzGEiEQnB1GgIXuPquMoYqIi3Jd8y7SDFg+06Gn/gWd7O9 vdZjCF96ai9+iucZHyfd0iJYbzGO1PkuudjaQjCIk+hvz8X5S2lvQj2eEliopyhlus imvnc87ZG9vbA== Date: Mon, 23 Oct 2023 18:29:29 +0100 From: Will Deacon To: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= Cc: Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Lorenzo Pieralisi , Bjorn Helgaas , Rob Herring , linux-pci@vger.kernel.org, kernel@pengutronix.de Subject: Re: [PATCH] PCI: host-generic: Convert to platform remove callback returning void Message-ID: <20231023172929.GC4041@willie-the-truck> References: <20231020092107.2148311-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20231020092107.2148311-1-u.kleine-koenig@pengutronix.de> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On Fri, Oct 20, 2023 at 11:21:07AM +0200, 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 (mostly) ignored > 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. > > pci_host_common_remove() returned zero unconditionally. With that > converted to return void instead, the generic pci host driver can be > switched to .remove_new trivially. > > Signed-off-by: Uwe Kleine-König > --- > drivers/pci/controller/pci-host-common.c | 4 +--- > drivers/pci/controller/pci-host-generic.c | 2 +- > include/linux/pci-ecam.h | 2 +- > 3 files changed, 3 insertions(+), 5 deletions(-) Acked-by: Will Deacon Will