From: Bjorn Helgaas <helgaas@kernel.org>
To: Sui Jingfeng <sui.jingfeng@linux.dev>
Cc: alsa-devel@alsa-project.org,
Sui Jingfeng <suijingfeng@loongson.cn>,
nouveau@lists.freedesktop.org, linux-kernel@vger.kernel.org,
dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org,
linux-pci@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>
Subject: Re: [PATCH 0/5] Add the pci_get_base_class() helper and use it
Date: Thu, 28 Sep 2023 16:56:43 -0500 [thread overview]
Message-ID: <20230928215643.GA506151@bhelgaas> (raw)
In-Reply-To: <20230825062714.6325-1-sui.jingfeng@linux.dev>
On Fri, Aug 25, 2023 at 02:27:09PM +0800, Sui Jingfeng wrote:
> From: Sui Jingfeng <suijingfeng@loongson.cn>
>
> There is no function that can be used to get all PCI(e) devices in a
> system by matching against its the PCI base class code only, while keep
> the sub-class code and the programming interface ignored. Therefore, add
> the pci_get_base_class() function to suit the need.
>
> For example, if an application want to process all PCI(e) display devices
> in a system, it can achieve such goal by writing the code as following:
>
> pdev = NULL;
> do {
> pdev = pci_get_base_class(PCI_BASE_CLASS_DISPLAY, pdev);
> if (!pdev)
> break;
>
> do_something_for_pci_display_device(pdev);
> } while (1);
>
> Sui Jingfeng (5):
> PCI: Add the pci_get_base_class() helper
> ALSA: hda/intel: Use pci_get_base_class() to reduce duplicated code
> drm/nouveau: Use pci_get_base_class() to reduce duplicated code
> drm/amdgpu: Use pci_get_base_class() to reduce duplicated code
> drm/radeon: Use pci_get_base_class() to reduce duplicated code
>
> drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 11 +++------
> drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c | 20 ++++-----------
> drivers/gpu/drm/nouveau/nouveau_acpi.c | 11 +++------
> drivers/gpu/drm/radeon/radeon_bios.c | 20 ++++-----------
> drivers/pci/search.c | 31 ++++++++++++++++++++++++
> include/linux/pci.h | 5 ++++
> sound/pci/hda/hda_intel.c | 16 ++++--------
> 7 files changed, 59 insertions(+), 55 deletions(-)
Applied to pci/enumeration for v6.7, thanks.
WARNING: multiple messages have this Message-ID (diff)
From: Bjorn Helgaas <helgaas@kernel.org>
To: Sui Jingfeng <sui.jingfeng@linux.dev>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org, nouveau@lists.freedesktop.org,
linux-pci@vger.kernel.org, alsa-devel@alsa-project.org,
Sui Jingfeng <suijingfeng@loongson.cn>
Subject: Re: [PATCH 0/5] Add the pci_get_base_class() helper and use it
Date: Thu, 28 Sep 2023 16:56:43 -0500 [thread overview]
Message-ID: <20230928215643.GA506151@bhelgaas> (raw)
In-Reply-To: <20230825062714.6325-1-sui.jingfeng@linux.dev>
On Fri, Aug 25, 2023 at 02:27:09PM +0800, Sui Jingfeng wrote:
> From: Sui Jingfeng <suijingfeng@loongson.cn>
>
> There is no function that can be used to get all PCI(e) devices in a
> system by matching against its the PCI base class code only, while keep
> the sub-class code and the programming interface ignored. Therefore, add
> the pci_get_base_class() function to suit the need.
>
> For example, if an application want to process all PCI(e) display devices
> in a system, it can achieve such goal by writing the code as following:
>
> pdev = NULL;
> do {
> pdev = pci_get_base_class(PCI_BASE_CLASS_DISPLAY, pdev);
> if (!pdev)
> break;
>
> do_something_for_pci_display_device(pdev);
> } while (1);
>
> Sui Jingfeng (5):
> PCI: Add the pci_get_base_class() helper
> ALSA: hda/intel: Use pci_get_base_class() to reduce duplicated code
> drm/nouveau: Use pci_get_base_class() to reduce duplicated code
> drm/amdgpu: Use pci_get_base_class() to reduce duplicated code
> drm/radeon: Use pci_get_base_class() to reduce duplicated code
>
> drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 11 +++------
> drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c | 20 ++++-----------
> drivers/gpu/drm/nouveau/nouveau_acpi.c | 11 +++------
> drivers/gpu/drm/radeon/radeon_bios.c | 20 ++++-----------
> drivers/pci/search.c | 31 ++++++++++++++++++++++++
> include/linux/pci.h | 5 ++++
> sound/pci/hda/hda_intel.c | 16 ++++--------
> 7 files changed, 59 insertions(+), 55 deletions(-)
Applied to pci/enumeration for v6.7, thanks.
WARNING: multiple messages have this Message-ID (diff)
From: Bjorn Helgaas <helgaas@kernel.org>
To: Sui Jingfeng <sui.jingfeng@linux.dev>
Cc: alsa-devel@alsa-project.org,
Sui Jingfeng <suijingfeng@loongson.cn>,
nouveau@lists.freedesktop.org, linux-kernel@vger.kernel.org,
dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org,
linux-pci@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>
Subject: Re: [Nouveau] [PATCH 0/5] Add the pci_get_base_class() helper and use it
Date: Thu, 28 Sep 2023 16:56:43 -0500 [thread overview]
Message-ID: <20230928215643.GA506151@bhelgaas> (raw)
In-Reply-To: <20230825062714.6325-1-sui.jingfeng@linux.dev>
On Fri, Aug 25, 2023 at 02:27:09PM +0800, Sui Jingfeng wrote:
> From: Sui Jingfeng <suijingfeng@loongson.cn>
>
> There is no function that can be used to get all PCI(e) devices in a
> system by matching against its the PCI base class code only, while keep
> the sub-class code and the programming interface ignored. Therefore, add
> the pci_get_base_class() function to suit the need.
>
> For example, if an application want to process all PCI(e) display devices
> in a system, it can achieve such goal by writing the code as following:
>
> pdev = NULL;
> do {
> pdev = pci_get_base_class(PCI_BASE_CLASS_DISPLAY, pdev);
> if (!pdev)
> break;
>
> do_something_for_pci_display_device(pdev);
> } while (1);
>
> Sui Jingfeng (5):
> PCI: Add the pci_get_base_class() helper
> ALSA: hda/intel: Use pci_get_base_class() to reduce duplicated code
> drm/nouveau: Use pci_get_base_class() to reduce duplicated code
> drm/amdgpu: Use pci_get_base_class() to reduce duplicated code
> drm/radeon: Use pci_get_base_class() to reduce duplicated code
>
> drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 11 +++------
> drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c | 20 ++++-----------
> drivers/gpu/drm/nouveau/nouveau_acpi.c | 11 +++------
> drivers/gpu/drm/radeon/radeon_bios.c | 20 ++++-----------
> drivers/pci/search.c | 31 ++++++++++++++++++++++++
> include/linux/pci.h | 5 ++++
> sound/pci/hda/hda_intel.c | 16 ++++--------
> 7 files changed, 59 insertions(+), 55 deletions(-)
Applied to pci/enumeration for v6.7, thanks.
next prev parent reply other threads:[~2023-09-28 21:56 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-25 6:27 [PATCH 0/5] Add the pci_get_base_class() helper and use it Sui Jingfeng
2023-08-25 6:27 ` [Nouveau] " Sui Jingfeng
2023-08-25 6:27 ` Sui Jingfeng
2023-08-25 6:27 ` [PATCH 1/5] PCI: Add the pci_get_base_class() helper Sui Jingfeng
2023-08-25 6:27 ` [Nouveau] " Sui Jingfeng
2023-08-25 6:27 ` Sui Jingfeng
2023-08-25 6:27 ` [PATCH 2/5] ALSA: hda/intel: Use pci_get_base_class() to reduce duplicated code Sui Jingfeng
2023-08-25 6:27 ` [Nouveau] " Sui Jingfeng
2023-08-25 6:27 ` Sui Jingfeng
2023-08-25 7:48 ` Takashi Iwai
2023-08-25 7:48 ` [Nouveau] " Takashi Iwai
2023-08-25 7:48 ` Takashi Iwai
2023-08-25 6:27 ` [PATCH 3/5] drm/nouveau: " Sui Jingfeng
2023-08-25 6:27 ` Sui Jingfeng
2023-08-25 6:27 ` [Nouveau] " Sui Jingfeng
2023-08-25 6:27 ` Sui Jingfeng
2023-08-25 6:27 ` [PATCH 4/5] drm/amdgpu: " Sui Jingfeng
2023-08-25 6:27 ` [Nouveau] " Sui Jingfeng
2023-08-25 6:27 ` Sui Jingfeng
2023-08-25 6:27 ` [PATCH 5/5] drm/radeon: " Sui Jingfeng
2023-08-25 6:27 ` [Nouveau] " Sui Jingfeng
2023-08-25 6:27 ` Sui Jingfeng
2023-08-25 13:18 ` [PATCH 0/5] Add the pci_get_base_class() helper and use it Deucher, Alexander
2023-08-25 13:18 ` [Nouveau] " Deucher, Alexander
2023-08-25 13:18 ` Deucher, Alexander
2023-09-20 2:46 ` suijingfeng
2023-09-20 2:46 ` [Nouveau] " suijingfeng
2023-09-20 2:46 ` suijingfeng
2023-09-28 21:56 ` Bjorn Helgaas [this message]
2023-09-28 21:56 ` [Nouveau] " Bjorn Helgaas
2023-09-28 21:56 ` Bjorn Helgaas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230928215643.GA506151@bhelgaas \
--to=helgaas@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=amd-gfx@lists.freedesktop.org \
--cc=bhelgaas@google.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=nouveau@lists.freedesktop.org \
--cc=sui.jingfeng@linux.dev \
--cc=suijingfeng@loongson.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.