All of lore.kernel.org
 help / color / mirror / Atom feed
From: "thermal-bot for Rikard Falkeborn" <tip-bot2@linutronix.de>
To: linux-pm@vger.kernel.org
Cc: Rikard Falkeborn <rikard.falkeborn@gmail.com>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	rui.zhang@intel.com, amitk@kernel.org
Subject: [thermal: thermal/next] thermal: core: Constify static attribute_group structs
Date: Mon, 07 Dec 2020 13:47:13 -0000	[thread overview]
Message-ID: <160734883309.3364.10066479522798087490.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20201128234342.36684-1-rikard.falkeborn@gmail.com>

The following commit has been merged into the thermal/next branch of thermal:

Commit-ID:     f74bed6a4e0d7f51da7f624e47f6e9423920e1e0
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git//f74bed6a4e0d7f51da7f624e47f6e9423920e1e0
Author:        Rikard Falkeborn <rikard.falkeborn@gmail.com>
AuthorDate:    Sun, 29 Nov 2020 00:43:42 +01:00
Committer:     Daniel Lezcano <daniel.lezcano@linaro.org>
CommitterDate: Mon, 30 Nov 2020 09:09:12 +01:00

thermal: core: Constify static attribute_group structs

The only usage of these structs is to assign their address to the
thermal_zone_attribute_groups array, which consists of pointers to
const, so make them const to allow the compiler to put them in read-only
memory.

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20201128234342.36684-1-rikard.falkeborn@gmail.com
---
 drivers/thermal/thermal_sysfs.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/thermal/thermal_sysfs.c b/drivers/thermal/thermal_sysfs.c
index a6f371f..0866e94 100644
--- a/drivers/thermal/thermal_sysfs.c
+++ b/drivers/thermal/thermal_sysfs.c
@@ -425,7 +425,7 @@ static struct attribute *thermal_zone_dev_attrs[] = {
 	NULL,
 };
 
-static struct attribute_group thermal_zone_attribute_group = {
+static const struct attribute_group thermal_zone_attribute_group = {
 	.attrs = thermal_zone_dev_attrs,
 };
 
@@ -434,7 +434,7 @@ static struct attribute *thermal_zone_mode_attrs[] = {
 	NULL,
 };
 
-static struct attribute_group thermal_zone_mode_attribute_group = {
+static const struct attribute_group thermal_zone_mode_attribute_group = {
 	.attrs = thermal_zone_mode_attrs,
 };
 
@@ -468,7 +468,7 @@ static umode_t thermal_zone_passive_is_visible(struct kobject *kobj,
 	return 0;
 }
 
-static struct attribute_group thermal_zone_passive_attribute_group = {
+static const struct attribute_group thermal_zone_passive_attribute_group = {
 	.attrs = thermal_zone_passive_attrs,
 	.is_visible = thermal_zone_passive_is_visible,
 };

      reply	other threads:[~2020-12-07 13:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-28 23:43 [PATCH] thermal: Constify static attribute_group structs Rikard Falkeborn
2020-12-07 13:47 ` thermal-bot for Rikard Falkeborn [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=160734883309.3364.10066479522798087490.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=amitk@kernel.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rikard.falkeborn@gmail.com \
    --cc=rui.zhang@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.