Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7534055rdb; Wed, 3 Jan 2024 22:05:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IGc0KHR6iSj0M4pmuZ2je+Tgz9VvFODLZXSMNkRE4kzCF+zw13lS2ipb8PwAV88MRPRAHbH X-Received: by 2002:a05:6871:e028:b0:203:dfdc:a80a with SMTP id by40-20020a056871e02800b00203dfdca80amr143677oac.112.1704348351264; Wed, 03 Jan 2024 22:05:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704348351; cv=none; d=google.com; s=arc-20160816; b=H35waAWgpf1LPvebdNaNJxZS2X+6duW6oxvovri8+HJfWPM9hsKnqny6yP53k2ARh6 wfg+SrgyekNpGj5xWR/fL2F8WkC2LHuM4zPOw4UsQluV+tSB9diopFSC95eSs+zO5k1P Kk1en8aZEYuElfsx5wZhn8V57HVaCID2u7nSPmq6K6DusYAyuRlr7sgzzfMygoiEtmKo OoOcbBONY/J6gAb+Bbj4sshHPWRb+2ORvD2HC7tQu4Gzw/MkU9DA2p65JoDb+nWK4w9f O0yjQnhpwDXSnpJmLby5cEmhlQe/+wZ2uj1FmMRyW1AAP1CP4PeLK7XcltxiX0QbZPxj yOrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date; bh=J7lVH3aCWLzNG6ParpsAllzrIEgoV5MOINUHIKzCog4=; fh=CXxvHds09/pxTtYkfzL0t5PG4H0Dc0LYOxtE0q1Az2Q=; b=ScorkI2E0hwnW6QLZN0bDE+L2Xt6c32wgkPKOgtuuDzp6hqEpKSBrDilJwxXGsrgH4 JVmTkjP7FWdjWcAOU8+icj4PKhzfAOykr/hEMgLeyivN8VY1aQS7b/QbhaEtTOzGLVNF cjKsh3lGb4X5wB+XmTtvsCgzgij/Mn4yaGKUo5xgZocpSHDmXXauK1kmXiRE5qJ6cnoW gmbUISp5nwAVnagdloQZgDX1nSeTAOAKd5dnuejgzk/8O0RJWQbdyNpCNBGNWACgWVJs XDjwmnexir0URAJjPzHaixkiFqZzPha1datgjudbtEAzSk2USZTdZYZCo1PpdJ4Lpd+h tP6g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-16273-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16273-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id e5-20020a656885000000b005ceca000849si448858pgt.195.2024.01.03.22.05.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 22:05:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-16273-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-16273-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16273-linux.lists.archive=gmail.com@vger.kernel.org" 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id A2254B24D84 for ; Thu, 4 Jan 2024 06:05:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 735C718ECC; Thu, 4 Jan 2024 06:05:35 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from bmailout2.hostsharing.net (bmailout2.hostsharing.net [83.223.78.240]) (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 5FBFB1D68D; Thu, 4 Jan 2024 06:05:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=wunner.de Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=h08.hostsharing.net Received: from h08.hostsharing.net (h08.hostsharing.net [IPv6:2a01:37:1000::53df:5f1c:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "*.hostsharing.net", Issuer "RapidSSL TLS RSA CA G1" (verified OK)) by bmailout2.hostsharing.net (Postfix) with ESMTPS id 3C9412800B4B2; Thu, 4 Jan 2024 07:05:28 +0100 (CET) Received: by h08.hostsharing.net (Postfix, from userid 100393) id 1F6BD1D8B72; Thu, 4 Jan 2024 07:05:28 +0100 (CET) Date: Thu, 4 Jan 2024 07:05:28 +0100 From: Lukas Wunner To: Ira Weiny Cc: Dan Williams , Jonathan Cameron , Smita Koralahalli , Shiju Jose , Yazen Ghannam , Davidlohr Bueso , Dave Jiang , Alison Schofield , Vishal Verma , Ard Biesheuvel , linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-cxl@vger.kernel.org, Bjorn Helgaas Subject: Re: [PATCH v5 8/9] PCI: Define scoped based management functions Message-ID: <20240104060528.GA10504@wunner.de> References: <20231220-cxl-cper-v5-0-1bb8a4ca2c7a@intel.com> <20231220-cxl-cper-v5-8-1bb8a4ca2c7a@intel.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: <20231220-cxl-cper-v5-8-1bb8a4ca2c7a@intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) On Wed, Dec 20, 2023 at 04:17:35PM -0800, Ira Weiny wrote: > --- a/include/linux/pci.h > +++ b/include/linux/pci.h > @@ -1170,6 +1170,7 @@ int pci_get_interrupt_pin(struct pci_dev *dev, struct pci_dev **bridge); > u8 pci_common_swizzle(struct pci_dev *dev, u8 *pinp); > struct pci_dev *pci_dev_get(struct pci_dev *dev); > void pci_dev_put(struct pci_dev *dev); > +DEFINE_FREE(pci_dev_put, struct pci_dev *, if (_T) pci_dev_put(_T)) pci_dev_put() already performs a NULL pointer check internally. Why duplicate it here? Thanks, Lukas