Chrome platform driver development
 help / color / mirror / Atom feed
From: Tzung-Bi Shih <tzungbi@kernel.org>
To: Sean Rhodes <sean@starlabs.systems>
Cc: "Hans de Goede" <hansg@kernel.org>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	"Corentin Chary" <corentin.chary@gmail.com>,
	"Luke D. Jones" <luke@ljones.dev>,
	"Denis Benato" <denis.benato@linux.dev>,
	"Prasanth Ksr" <prasanth.ksr@dell.com>,
	"Jorge Lopez" <jorge.lopez2@hp.com>,
	"Mark Pearson" <mpearson-lenovo@squebb.ca>,
	"Derek J. Clark" <derekjohn.clark@gmail.com>,
	"Joshua Grisham" <josh@joshuagrisham.com>,
	"Brian Norris" <briannorris@chromium.org>,
	"Julius Werner" <jwerner@chromium.org>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"Javier Martinez Canillas" <javierm@redhat.com>,
	"Kees Cook" <kees@kernel.org>,
	"Uwe Kleine-König" <u.kleine-koenig@baylibre.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Huacai Chen" <chenhuacai@kernel.org>,
	"Chen-Yu Tsai" <wenst@chromium.org>,
	"Florian Fainelli" <florian.fainelli@broadcom.com>,
	"Titouan Ameline de Cadeville" <titouan.ameline@gmail.com>,
	linux-kernel@vger.kernel.org,
	platform-driver-x86@vger.kernel.org, Dell.Client.Kernel@dell.com,
	chrome-platform@lists.linux.dev
Subject: Re: [PATCH v4 3/3] firmware: coreboot: Add CFR firmware attributes driver
Date: Mon, 13 Jul 2026 04:42:06 +0000	[thread overview]
Message-ID: <alRsnvNAECpMu0Y7@google.com> (raw)
In-Reply-To: <CABtds-39j-1r+XOB9gZPXFuiBumL3PjEco+2OFzz3CfXJqDjQw@mail.gmail.com>

On Fri, Jul 10, 2026 at 11:40:24AM -0500, Sean Rhodes wrote:
> diff --git a/drivers/firmware/coreboot/coreboot-cfr.c
...
> +#include <linux/array_size.h>
> +#include <linux/bitops.h>
> +#include <linux/cleanup.h>
> +#include <linux/ctype.h>
> +#include <linux/efi.h>
> +#include <linux/err.h>
> +#include <linux/io.h>
> +#include <linux/kdev_t.h>
> +#include <linux/kobject.h>
> +#include <linux/limits.h>
> +#include <linux/list.h>
> +#include <linux/device-id/coreboot.h>

Keep the list sorted.

> +#include <linux/module.h>
> +#include <linux/mutex.h>
> +#include <linux/slab.h>
> +#include <linux/string.h>
> +#include <linux/sysfs.h>
> +#include <linux/types.h>
> +
> +#include <linux/firmware_attributes.h>

Why this needs to be separated from the above list?

> +struct coreboot_cfr_drvdata {
> +	struct device *class_dev;
> +	struct kset *attrs_kset;
> +	struct list_head settings;
> +	/* Serializes EFI variable writes and the matching runtime apply hook. */
> +	struct mutex lock;
> +	bool pending_reboot;
> +};
> +
> +static struct coreboot_cfr_drvdata *coreboot_cfr_data;

Can't this be some drvdata so that it doesn't need to be global?

> +static char *coreboot_cfr_string_dup(const struct lb_cfr_varbinary *str)
> +{
> +	const char *data = (const char *)str + sizeof(*str);

(const char *)(str + 1)?  As the patch uses similar pattern otherwhere.

      reply	other threads:[~2026-07-13  4:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-10 16:40 [PATCH v4 3/3] firmware: coreboot: Add CFR firmware attributes driver Sean Rhodes
2026-07-13  4:42 ` Tzung-Bi Shih [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=alRsnvNAECpMu0Y7@google.com \
    --to=tzungbi@kernel.org \
    --cc=Dell.Client.Kernel@dell.com \
    --cc=briannorris@chromium.org \
    --cc=chenhuacai@kernel.org \
    --cc=chrome-platform@lists.linux.dev \
    --cc=corentin.chary@gmail.com \
    --cc=denis.benato@linux.dev \
    --cc=derekjohn.clark@gmail.com \
    --cc=florian.fainelli@broadcom.com \
    --cc=hansg@kernel.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=javierm@redhat.com \
    --cc=jorge.lopez2@hp.com \
    --cc=josh@joshuagrisham.com \
    --cc=jwerner@chromium.org \
    --cc=kees@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luke@ljones.dev \
    --cc=mpearson-lenovo@squebb.ca \
    --cc=mst@redhat.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=prasanth.ksr@dell.com \
    --cc=sean@starlabs.systems \
    --cc=titouan.ameline@gmail.com \
    --cc=tzimmermann@suse.de \
    --cc=u.kleine-koenig@baylibre.com \
    --cc=wenst@chromium.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