mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rikard Falkeborn <rikard.falkeborn@gmail.com>
To: 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>,
	Justin Ernst <justin.ernst@hpe.com>
Cc: Alexander Duyck <alexander.h.duyck@linux.intel.com>,
	platform-driver-x86@vger.kernel.org,
	linux-kernel@vger.kernel.org, Mike Travis <mike.travis@hpe.com>,
	Rikard Falkeborn <rikard.falkeborn@gmail.com>
Subject: [PATCH 1/4] platform/x86: hdaps: Constify static attribute_group struct
Date: Sat,  5 Jun 2021 22:38:04 +0200	[thread overview]
Message-ID: <20210605203807.60547-2-rikard.falkeborn@gmail.com> (raw)
In-Reply-To: <20210605203807.60547-1-rikard.falkeborn@gmail.com>

The only use of hdaps_attribute_group is to pass its address to
sysfs_create_group() and sysfs_remove_group(), both which takes pointers
to const attribute_group structs. Make it const to allow the compiler to
put it in read-only memory.

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
---
 drivers/platform/x86/hdaps.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/x86/hdaps.c b/drivers/platform/x86/hdaps.c
index a72270932ec3..9996485f5295 100644
--- a/drivers/platform/x86/hdaps.c
+++ b/drivers/platform/x86/hdaps.c
@@ -462,7 +462,7 @@ static struct attribute *hdaps_attributes[] = {
 	NULL,
 };
 
-static struct attribute_group hdaps_attribute_group = {
+static const struct attribute_group hdaps_attribute_group = {
 	.attrs = hdaps_attributes,
 };
 
-- 
2.31.1


  reply	other threads:[~2021-06-05 20:39 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 ` Rikard Falkeborn [this message]
2021-06-07 16:21   ` [PATCH 1/4] platform/x86: hdaps: Constify static attribute_group struct 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
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=20210605203807.60547-2-rikard.falkeborn@gmail.com \
    --to=rikard.falkeborn@gmail.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=justin.ernst@hpe.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgross@linux.intel.com \
    --cc=mike.travis@hpe.com \
    --cc=platform-driver-x86@vger.kernel.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

all inboxes | Powered by JetHome®