From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: "David E. Box" <david.e.box@linux.intel.com>
Cc: corbet@lwn.net, bhelgaas@google.com, kuurtb@gmail.com,
Hans de Goede <hdegoede@redhat.com>,
vkoul@kernel.org, yung-chuan.liao@linux.intel.com,
pierre-louis.bossart@linux.dev, sanyog.r.kale@intel.com,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
dakr@kernel.org, dan.j.williams@intel.com,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
linux-doc@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
linux-pci@vger.kernel.org, platform-driver-x86@vger.kernel.org,
Dell.Client.Kernel@dell.com, linux-sound@vger.kernel.org
Subject: Re: [PATCH 4/7] pci: doe: Replace sysfs visibility macro
Date: Sat, 26 Apr 2025 16:06:56 +0300 (EEST) [thread overview]
Message-ID: <a8581a58-e994-ff5e-6bdc-ca9efe319da1@linux.intel.com> (raw)
In-Reply-To: <5546db361d2d474b97d80345473628d0e5a55093.camel@linux.intel.com>
[-- Attachment #1: Type: text/plain, Size: 1851 bytes --]
On Fri, 25 Apr 2025, David E. Box wrote:
> On Fri, 2025-04-25 at 13:57 +0300, Ilpo Järvinen wrote:
> > On Wed, 23 Apr 2025, David E. Box wrote:
> >
> > > Replace deprecated DEFINE_SIMPLE_SYSFS_GROUP_VISIBLE() call with the new
> > > DEFINE_SYSFS_GROUP_VISIBILITY() helper for the pci_doe_features_sysfs group
> > > in drivers/pci/doe.c.
> > >
> > > Signed-off-by: David E. Box <david.e.box@linux.intel.com>
> > > ---
> > > drivers/pci/doe.c | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/pci/doe.c b/drivers/pci/doe.c
> > > index aae9a8a00406..18b355506dc1 100644
> > > --- a/drivers/pci/doe.c
> > > +++ b/drivers/pci/doe.c
> > > @@ -119,7 +119,7 @@ static bool pci_doe_features_sysfs_group_visible(struct
> > > kobject *kobj)
> > >
> > > return !xa_empty(&pdev->doe_mbs);
> > > }
> > > -DEFINE_SIMPLE_SYSFS_GROUP_VISIBLE(pci_doe_features_sysfs)
> > > +DEFINE_SYSFS_GROUP_VISIBILITY(pci_doe_features_sysfs)
> >
> > Hi David,
> >
> > Is it intentional to not have semicolon at the end?
>
> Hi Ilpo,
>
> I was just doing a straight name swap and didn't not notice the lack of a
> semicolon. Of course, since DEFINE_SYSFS_GROUP_VISIBILITY() expands to a
> function definition, a trailing semicolon isn't necessary.
>
> I suspect the issue is with the other instances where it was added, which makes
> the usage inconsistent. What would you suggest?
Hi,
When I saw that lack of semicolon, my first assumption was there's
something special here that _requires_ leaving the semicolon out, which
turned out untrue after an unnecessary roundtrip to read the macro. So IMO
it would be better to have the semicolon there to tell the reader there's
nothing of special interest here.
Also, you used semicolon in the example. :-)
--
i.
next prev parent reply other threads:[~2025-04-26 13:07 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-23 17:50 [PATCH 0/7] sysfs: Introduce macros for attribute groups with visibility control David E. Box
2025-04-23 17:50 ` [PATCH 1/7] sysfs: Rename attribute group visibility macros David E. Box
2025-04-24 1:26 ` Dan Williams
2025-04-23 17:50 ` [PATCH 2/7] sysfs: Introduce macros to simplify creation of visible attribute groups David E. Box
2025-04-24 1:32 ` Dan Williams
2025-04-23 17:50 ` [PATCH 3/7] docs: sysfs.rst: document additional attribute group macros David E. Box
2025-04-24 1:34 ` Dan Williams
2025-04-23 17:50 ` [PATCH 4/7] pci: doe: Replace sysfs visibility macro David E. Box
2025-04-24 1:35 ` Dan Williams
2025-04-25 10:57 ` Ilpo Järvinen
2025-04-25 18:13 ` David E. Box
2025-04-26 13:06 ` Ilpo Järvinen [this message]
2025-04-23 17:50 ` [PATCH 5/7] soundwire: sysfs: Use ATTRIBUTE_GROUP_VISIBLE() David E. Box
2025-04-24 1:37 ` Dan Williams
2025-04-23 17:50 ` [PATCH 6/7] platform/x86/dell: alienware-wmi: update sysfs visibility macros David E. Box
2025-04-23 18:31 ` Kurt Borja
2025-04-24 3:01 ` Dan Williams
2025-04-23 17:50 ` [PATCH 7/7] sysfs: Remove transitional attribute group alias macros David E. Box
2025-04-24 3:02 ` Dan Williams
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=a8581a58-e994-ff5e-6bdc-ca9efe319da1@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=Dell.Client.Kernel@dell.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=bhelgaas@google.com \
--cc=corbet@lwn.net \
--cc=dakr@kernel.org \
--cc=dan.j.williams@intel.com \
--cc=david.e.box@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=hdegoede@redhat.com \
--cc=kuurtb@gmail.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=pierre-louis.bossart@linux.dev \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=sanyog.r.kale@intel.com \
--cc=vkoul@kernel.org \
--cc=yung-chuan.liao@linux.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;
as well as URLs for NNTP newsgroup(s).