linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lukas Wunner <lukas@wunner.de>
To: Alistair Francis <alistair23@gmail.com>
Cc: bhelgaas@google.com, linux-pci@vger.kernel.org,
	Jonathan.Cameron@huawei.com, alex.williamson@redhat.com,
	christian.koenig@amd.com, kch@nvidia.com,
	gregkh@linuxfoundation.org, logang@deltatee.com,
	linux-kernel@vger.kernel.org, chaitanyak@nvidia.com,
	rdunlap@infradead.org,
	Alistair Francis <alistair.francis@wdc.com>
Subject: Re: [PATCH v14 3/4] PCI/DOE: Expose the DOE features via sysfs
Date: Sun, 4 Aug 2024 08:32:18 +0200	[thread overview]
Message-ID: <Zq8gciQnRjDZwSTK@wunner.de> (raw)
In-Reply-To: <20240710023310.480713-3-alistair.francis@wdc.com>

On Wed, Jul 10, 2024 at 12:33:09PM +1000, Alistair Francis wrote:
> v14:
>  - Revert back to v12 with extra pci_remove_resource_files() call
> v13:
>  - Drop pci_doe_sysfs_init() and use pci_doe_sysfs_group
>      - As discussed in https://lore.kernel.org/all/20231019165829.GA1381099@bhelgaas/
>        we can just modify pci_doe_sysfs_group at the DOE init and let
>        device_add() handle the sysfs attributes.
> v12:
>  - Drop pci_doe_features_sysfs_attr_visible()
> v11:
>  - Gracefully handle multiple entried of same feature
>  - Minor fixes and code cleanups

Hm, it looks like the review comments I left for v11 were never addressed :(

https://lore.kernel.org/all/ZmxvnLDBhkWPrXGK@wunner.de/
https://lore.kernel.org/all/Zm2RmWnSWEEX8WtV@wunner.de/

In particular, pci_{create,remove}_resource_files() is not the right place
to dynamically add attributes.  Move the calls of pci_doe_sysfs_init()
and pci_doe_sysfs_teardown() to pci_device_add() and pci_destroy_dev(),
respectively.  This is also what I'm doing for dynamic CMA attributes
and what Mariusz is doing for LEDs added on enumeration:

https://lore.kernel.org/all/77f549685f994981c010aebb1e9057aa3555b18a.1719771133.git.lukas@wunner.de/
(search for pci_cma_publish)

https://lore.kernel.org/all/20240711083009.5580-3-mariusz.tkaczyk@linux.intel.com/
(search for pci_npem_create and pci_npem_remove)

Thanks,

Lukas

  parent reply	other threads:[~2024-08-04  6:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-10  2:33 [PATCH v14 1/4] PCI/DOE: Rename DOE protocol to feature Alistair Francis
2024-07-10  2:33 ` [PATCH v14 2/4] PCI/DOE: Rename Discovery Response Data Object Contents to type Alistair Francis
2024-07-10  2:33 ` [PATCH v14 3/4] PCI/DOE: Expose the DOE features via sysfs Alistair Francis
2024-07-10 13:29   ` Jonathan Cameron
2024-07-15 23:37   ` Alistair Francis
2024-07-17 16:12     ` Jonathan Cameron
2024-08-04  6:32   ` Lukas Wunner [this message]
2024-08-06  6:37     ` Alistair Francis
2024-07-10  2:33 ` [PATCH v14 4/4] PCI/DOE: Allow enabling DOE without CXL Alistair Francis

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=Zq8gciQnRjDZwSTK@wunner.de \
    --to=lukas@wunner.de \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=alex.williamson@redhat.com \
    --cc=alistair.francis@wdc.com \
    --cc=alistair23@gmail.com \
    --cc=bhelgaas@google.com \
    --cc=chaitanyak@nvidia.com \
    --cc=christian.koenig@amd.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kch@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=logang@deltatee.com \
    --cc=rdunlap@infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).