From: Nate DeSimone <nathaniel.l.desimone@intel.com>
To: rafael@kernel.org
Cc: lenb@kernel.org, linux-acpi@vger.kernel.org, tony.luck@intel.com
Subject: Re: [PATCH v2 1/2] ACPI: FPDT: expose FBPT and S3PT subtables via sysfs
Date: Tue, 24 Mar 2026 16:20:44 -0700 [thread overview]
Message-ID: <20260324232045.763-1-nathaniel.l.desimone@intel.com> (raw)
In-Reply-To: <CAJZ5v0jmpQO=N=54z87ZzuOYWx_16S7xPgo4H_-zQ+VPGKRftQ@mail.gmail.com>
On Wed, 11 Mar 2026 14:18:13 +0100 Rafael J. Wysocki
<rafael@kernel.org> wrote:
> On Tue, Mar 10, 2026 at 5:35=E2=80=AFAM Nate DeSimone
> <nathaniel.l.desimone@intel.com> wrote:
> >
> > +static BIN_ATTR(FBPT, 0400, sysfs_bin_attr_simple_read, NULL, 0);
> > +static BIN_ATTR(S3PT, 0400, sysfs_bin_attr_simple_read, NULL, 0);
> > +
> > static struct kobject *fpdt_kobj;
> >
> > #if defined CONFIG_X86 && defined CONFIG_PHYS_ADDR_T_64BIT
> > @@ -254,9 +257,34 @@ static int fpdt_process_subtable(u64 address, u32 su=
> btable_type)
> > break;
> > }
> > }
> > +
> > + if (subtable_type =3D=3D SUBTABLE_FBPT) {
> > + bin_attr_FBPT.private =3D subtable_header;
> > + bin_attr_FBPT.size =3D length;
> > + result =3D sysfs_create_bin_file(fpdt_kobj, &bin_attr_FBP=
> T);
> > + if (result)
> > + goto err;
>
> Is failing the function the right thing to do here (and below).
>
> A failure to create the sysfs attribute is not critical I suppose, so
> would printing a message be sufficient?
Thank you for the feedback!
I have sent a new V3 patch series with the sysfs_create_bin_file() failure
handling changed from a hard error to a non-fatal warning.
> > + } else if (subtable_type =3D=3D SUBTABLE_S3PT) {
> > + bin_attr_S3PT.private =3D subtable_header;
> > + bin_attr_S3PT.size =3D length;
> > + result =3D sysfs_create_bin_file(fpdt_kobj, &bin_attr_S3P=
> T);
> > + if (result)
> > + goto err;
> > + }
> > +
> > return 0;
> >
> > err:
> > + if (bin_attr_FBPT.private) {
> > + sysfs_remove_bin_file(fpdt_kobj, &bin_attr_FBPT);
> > + bin_attr_FBPT.private =3D NULL;
> > + }
> > +
> > + if (bin_attr_S3PT.private) {
> > + sysfs_remove_bin_file(fpdt_kobj, &bin_attr_S3PT);
> > + bin_attr_S3PT.private =3D NULL;
> > + }
> > +
> > if (record_boot)
> > sysfs_remove_group(fpdt_kobj, &boot_attr_group);
> >
> >
> > base-commit: 8bf22c33e7a172fbc72464f4cc484d23a6b412ba
> > --
Best Regards,
-Nate
next prev parent reply other threads:[~2026-03-24 23:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-22 6:30 [PATCH v1] ACPI: FPDT: expose FBPT and S3PT subtables via sysfs Nate DeSimone
2026-02-23 17:54 ` Luck, Tony
2026-02-23 20:32 ` Nate DeSimone
2026-03-10 4:34 ` [PATCH v2 0/2] " Nate DeSimone
2026-03-10 4:34 ` [PATCH v2 1/2] " Nate DeSimone
2026-03-11 13:18 ` Rafael J. Wysocki
2026-03-24 23:20 ` Nate DeSimone [this message]
2026-03-10 4:34 ` [PATCH v2 2/2] Documentation: ABI: add FBPT and S3PT entries to sysfs-firmware-acpi Nate DeSimone
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=20260324232045.763-1-nathaniel.l.desimone@intel.com \
--to=nathaniel.l.desimone@intel.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=tony.luck@intel.com \
/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