All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Christoph Hellwig <hch@lst.de>,
	Guenter Roeck <linux@roeck-us.net>,
	Keith Busch <kbusch@kernel.org>, Jens Axboe <axboe@fb.com>,
	Sagi Grimberg <sagi@grimberg.me>,
	linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org,
	Jean Delvare <jdelvare@suse.com>,
	linux-hwmon@vger.kernel.org
Subject: Re: [PATCH] nvme: host: hwmon: constify pointers to hwmon_channel_info
Date: Wed, 12 Apr 2023 08:48:31 +0200	[thread overview]
Message-ID: <20230412064831.GA20380@lst.de> (raw)
In-Reply-To: <0d4d27e6-02e0-09e3-8e99-18b40880961c@linaro.org>

On Tue, Apr 11, 2023 at 08:11:41AM +0200, Krzysztof Kozlowski wrote:
> The dependency was described in the patch. Guenter also provided
> a stable branch with the dependency:

Ok.  See below for the version with the whitespace and Subject fix I'd like
to see.  With that:

Acked-by: Christoph Hellwig <hch@lst.de>

---
From 882410442b1bb5730f3eec29d8dc9ccda5e92cdb Mon Sep 17 00:00:00 2001
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Date: Fri, 7 Apr 2023 16:58:45 +0200
Subject: nvme-hwmon: constify pointers to hwmon_channel_info

Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 drivers/nvme/host/hwmon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvme/host/hwmon.c b/drivers/nvme/host/hwmon.c
index 9e6e56c20ec993..6aa153f3178a60 100644
--- a/drivers/nvme/host/hwmon.c
+++ b/drivers/nvme/host/hwmon.c
@@ -185,7 +185,7 @@ static umode_t nvme_hwmon_is_visible(const void *_data,
 	return 0;
 }
 
-static const struct hwmon_channel_info *nvme_hwmon_info[] = {
+static const struct hwmon_channel_info *const nvme_hwmon_info[] = {
 	HWMON_CHANNEL_INFO(chip, HWMON_C_REGISTER_TZ),
 	HWMON_CHANNEL_INFO(temp,
 			   HWMON_T_INPUT | HWMON_T_MAX | HWMON_T_MIN |
-- 
2.39.2


      reply	other threads:[~2023-04-12  6:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-07 14:58 [PATCH] nvme: host: hwmon: constify pointers to hwmon_channel_info Krzysztof Kozlowski
2023-04-07 16:57 ` kernel test robot
2023-04-07 18:22 ` kernel test robot
2023-04-11  6:09 ` Christoph Hellwig
2023-04-11  6:10   ` Christoph Hellwig
2023-04-11  6:11     ` Krzysztof Kozlowski
2023-04-12  6:48       ` Christoph Hellwig [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=20230412064831.GA20380@lst.de \
    --to=hch@lst.de \
    --cc=axboe@fb.com \
    --cc=jdelvare@suse.com \
    --cc=kbusch@kernel.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=linux@roeck-us.net \
    --cc=sagi@grimberg.me \
    /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.