From: "Ernst, Justin" <justin.ernst@hpe.com>
To: Rikard Falkeborn <rikard.falkeborn@gmail.com>,
Hans de Goede <hdegoede@redhat.com>,
Mark Gross <mgross@linux.intel.com>,
Frank Seidel <frank@f-seidel.de>,
"David E. Box" <david.e.box@linux.intel.com>
Cc: Alexander Duyck <alexander.h.duyck@linux.intel.com>,
"platform-driver-x86@vger.kernel.org"
<platform-driver-x86@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Travis, Mike" <mike.travis@hpe.com>
Subject: RE: [PATCH 4/4] x86/platform/uv: Constify static attribute_group struct
Date: Mon, 7 Jun 2021 14:34:58 +0000 [thread overview]
Message-ID: <AT5PR8401MB1300493C7B3FF4533549019587389@AT5PR8401MB1300.NAMPRD84.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <20210605203807.60547-5-rikard.falkeborn@gmail.com>
> The only use of base_attr_group and hubless_base_attr_group is to pass
> their addresses to sysfs_create_group() and sysfs_remove_group(), both
> which takes pointers to const attribute_group structs. Make them const
> to allow the compiler to put them in read-only memory.
>
> Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Thank you for the patch.
Reviewed-by: Justin Ernst <justin.ernst@hpe.com>
> ---
> drivers/platform/x86/uv_sysfs.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/platform/x86/uv_sysfs.c b/drivers/platform/x86/uv_sysfs.c
> index 7badcfa3f384..956a354b57c1 100644
> --- a/drivers/platform/x86/uv_sysfs.c
> +++ b/drivers/platform/x86/uv_sysfs.c
> @@ -778,7 +778,7 @@ static struct attribute *base_attrs[] = {
> NULL,
> };
>
> -static struct attribute_group base_attr_group = {
> +static const struct attribute_group base_attr_group = {
> .attrs = base_attrs
> };
>
> @@ -823,7 +823,7 @@ static struct attribute *hubless_base_attrs[] = {
> NULL,
> };
>
> -static struct attribute_group hubless_base_attr_group = {
> +static const struct attribute_group hubless_base_attr_group = {
> .attrs = hubless_base_attrs
> };
>
> --
> 2.31.1
next prev parent reply other threads:[~2021-06-07 14:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-05 20:38 [PATCH 0/4] platform/x86: Constify static attribute_group structs Rikard Falkeborn
2021-06-05 20:38 ` [PATCH 1/4] platform/x86: hdaps: Constify static attribute_group struct Rikard Falkeborn
2021-06-07 16:21 ` Frank Seidel
2021-06-05 20:38 ` [PATCH 2/4] platform/x86: intel_pmt_crashlog: " Rikard Falkeborn
2021-06-05 20:38 ` [PATCH 3/4] platform/x86: tc1100-wmi: " Rikard Falkeborn
2021-06-05 20:38 ` [PATCH 4/4] x86/platform/uv: " Rikard Falkeborn
2021-06-07 14:34 ` Ernst, Justin [this message]
2021-06-09 14:26 ` [PATCH 0/4] platform/x86: Constify static attribute_group structs Hans de Goede
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=AT5PR8401MB1300493C7B3FF4533549019587389@AT5PR8401MB1300.NAMPRD84.PROD.OUTLOOK.COM \
--to=justin.ernst@hpe.com \
--cc=alexander.h.duyck@linux.intel.com \
--cc=david.e.box@linux.intel.com \
--cc=frank@f-seidel.de \
--cc=hdegoede@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgross@linux.intel.com \
--cc=mike.travis@hpe.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rikard.falkeborn@gmail.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
all inboxes | Powered by JetHome®