From: "Summers, Stuart" <stuart.summers@intel.com>
To: "intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
"Roper, Matthew D" <matthew.d.roper@intel.com>
Cc: "Vivi, Rodrigo" <rodrigo.vivi@intel.com>
Subject: Re: [PATCH 0/2] Reduce duplicate code for simple configfs attributes
Date: Wed, 2 Dec 2026 16:30:36 +0000 [thread overview]
Message-ID: <3487a0434dd7bcf8797cc87fce19364323dfd10d.camel@intel.com> (raw)
In-Reply-To: <20261201-configfs_simplify-v1-0-c90660854833@intel.com>
I still need to look over all the details, but is there a reason we
don't go with the solution I had posted a while back on similar?
https://patchwork.freedesktop.org/patch/758151/?series=165879&rev=10
I think this is essentially doing the same thing you're doing here with
maybe a few more functions. I was planning to repost that today now
that we've merged the basic debug based files.
Thanks,
Stuart
On Tue, 2026-12-01 at 16:23 -0800, Matt Roper wrote:
> Many of our configfs attributes representing simple integer or
> boolean
> values have nearly duplicate implementations, both for the
> getter/setter
> filesystem callbacks, and for the general lookup functions which
> expose
> the underlying values to the rest of the Xe driver. We expect many
> more
> "simple" configfs attributes to show up in the future, so let's move
> some of the common boilerplate into macros that can generate the
> common
> code in a consistent manner. This will avoid minor behavioral
> inconsistencies or copy/paste errors like we've had in the past that
> are
> easy to overlook.
>
> These patches are mostly just refactoring, but there is one slight
> functional change introduced here --- the enable_vram_page_offline
> attribute now prints out as 0/1 in the same manner as our other
> boolean
> attributes, rather than breaking the pattern by printing yes/no
> strings.
>
> Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
> ---
> Matt Roper (2):
> drm/xe/configfs: Reduce attribute getters/setters duplication
> via macros
> drm/xe/configfs: Consolidate duplicated configfs lookup
> boilerplate
>
> drivers/gpu/drm/xe/xe_configfs.c | 318 +++++++++++------------------
> ----------
> 1 file changed, 85 insertions(+), 233 deletions(-)
> ---
> base-commit: f41e77417fa4877273fbd673b967e0571e1421c6
> change-id: 20261201-configfs_simplify-d0e2225be6b3
>
> Best regards,
prev parent reply other threads:[~2026-12-02 16:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-02 0:23 [PATCH 0/2] Reduce duplicate code for simple configfs attributes Matt Roper
2026-12-02 0:23 ` [PATCH 1/2] drm/xe/configfs: Reduce attribute getters/setters duplication via macros Matt Roper
2026-12-02 0:23 ` [PATCH 2/2] drm/xe/configfs: Consolidate duplicated configfs lookup boilerplate Matt Roper
2026-12-02 1:14 ` ✗ CI.checkpatch: warning for Reduce duplicate code for simple configfs attributes Patchwork
2026-12-02 1:17 ` ✓ CI.KUnit: success " Patchwork
2026-12-02 1:52 ` ✓ Xe.CI.BAT: " Patchwork
2026-12-02 16:30 ` Summers, Stuart [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=3487a0434dd7bcf8797cc87fce19364323dfd10d.camel@intel.com \
--to=stuart.summers@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.d.roper@intel.com \
--cc=rodrigo.vivi@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 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.