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 v5] PCI/DOE: Expose the DOE protocols via sysfs
Date: Sat, 12 Aug 2023 10:07:59 +0200 [thread overview]
Message-ID: <20230812080759.GB9469@wunner.de> (raw)
In-Reply-To: <20230812004453.1241736-1-alistair.francis@wdc.com>
On Fri, Aug 11, 2023 at 08:44:53PM -0400, Alistair Francis wrote:
> + ret = devm_device_add_group(&pdev->dev, &pci_dev_doe_proto_group);
> + if (ret) {
> + pci_err(pdev, "can't create DOE goup: %d\n", ret);
> + return ret;
> + }
You cannot use devm_* functions in the PCI core.
Anything done through devm_* will be undone when the device's driver
unbinds. User space can unbind and rebind the driver at any time
through sysfs. They'll lose your DOE attributes the first time
they do this because of your use of devm_device_add_group().
Thanks,
Lukas
prev parent reply other threads:[~2023-08-12 8:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-12 0:44 Alistair Francis
2023-08-12 2:36 ` Randy Dunlap
2023-08-12 8:07 ` Lukas Wunner [this message]
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=20230812080759.GB9469@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
all inboxes | Powered by JetHome®