Received: by 2002:a05:7412:8d1c:b0:fa:4c10:6cad with SMTP id bj28csp46609rdb; Tue, 16 Jan 2024 14:34:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IHMpCy7cKJRZbHCjK4ugGyHDUoMyRJzff760JlgHJnq4AmPgt+TCuIqgsHiuWDzpmbbWuZv X-Received: by 2002:a2e:7317:0:b0:2cd:1d5d:322b with SMTP id o23-20020a2e7317000000b002cd1d5d322bmr3688440ljc.57.1705444465985; Tue, 16 Jan 2024 14:34:25 -0800 (PST) Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id s5-20020aa7d785000000b00559b90b54ecsi691000edq.191.2024.01.16.14.34.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jan 2024 14:34:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-28318-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-28318-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28318-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 554711F2A73F for ; Tue, 16 Jan 2024 22:32:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CB4723D3B3; Tue, 16 Jan 2024 21:40:30 +0000 (UTC) Received: from fgw21-7.mail.saunalahti.fi (fgw21-7.mail.saunalahti.fi [62.142.5.82]) (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 DDE1835F03 for ; Tue, 16 Jan 2024 21:40:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.142.5.82 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705441230; cv=none; b=f86n5B0wP2iP2DZtegv7VMBJdCbxTyjfmuGN7NaGPJ9wzDUw1ZBra4U9rUz3JO/ZqeTM2yeTgSZJTBDI7UpH2kl3GMNEcqjYHF9xug6bpXUzfQWZaPw7wKovNBDopuaiwbpobfbJRv2YV7Oi/CMxBI3X90GRIXAmwfQbWWJepgA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705441230; c=relaxed/simple; bh=tvdMsm9MAbU2KTmtR20qA5yN6GLHmSzIv222nnd1ZZ0=; h=Received:From:Date:To:Cc:Subject:Message-ID:References: MIME-Version:Content-Type:Content-Disposition:In-Reply-To; b=VtGCnnz3tRgYERog5NRkQKor0OcSYTQ36Z5Zfab1RloLSFDFvpNe7gHMIwwMBxb0ZApXcSh1An6Frq3nfJ28gmG7iWBpbsQAg7msLQ1LvKfhdoTNWW0zKrXmkZesJ6tEEdJ/EYhWQ8AKMUuu1HkoyrIJ5RzAMC1YJ5SYUz1a+hE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com; spf=fail smtp.mailfrom=gmail.com; arc=none smtp.client-ip=62.142.5.82 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=gmail.com Received: from localhost (88-113-24-108.elisa-laajakaista.fi [88.113.24.108]) by fgw21.mail.saunalahti.fi (Halon) with ESMTP id dc7f56ef-b4b7-11ee-abf4-005056bdd08f; Tue, 16 Jan 2024 23:40:26 +0200 (EET) From: andy.shevchenko@gmail.com Date: Tue, 16 Jan 2024 23:40:26 +0200 To: Philipp Stanner Cc: Jonathan Corbet , Hans de Goede , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Bjorn Helgaas , Sam Ravnborg , dakr@redhat.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-pci@vger.kernel.org Subject: Re: [PATCH 09/10] pci: devres: remove legacy pcim_release() Message-ID: References: <20240115144655.32046-2-pstanner@redhat.com> <20240115144655.32046-11-pstanner@redhat.com> 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=us-ascii Content-Disposition: inline In-Reply-To: <20240115144655.32046-11-pstanner@redhat.com> Mon, Jan 15, 2024 at 03:46:20PM +0100, Philipp Stanner kirjoitti: > Thanks to preceding cleanup steps, pcim_release() is now not needed > anymore and can be replaced by pcim_disable_device(), which is the exact > counterpart to pcim_enable_device(). > This permits removing further parts of the old devres API. > > Replace pcim_release() with pcim_disable_device(). > Remove the now surplus get_dr() function. .. > + devm_add_action(&pdev->dev, pcim_disable_device, pdev); No error check? > + return pci_enable_device(pdev); Maybe ret = pci_enable_device(...); if (ret) return ret; return devm_add_action_or_reset(...)? I could think of side effects of this, so perhaps the commit message and/or code needs a comment on why the above proposal can _not_ be used? -- With Best Regards, Andy Shevchenko