From: Colin Ian King <colin.i.king@gmail.com>
To: Ben Skeggs <bskeggs@redhat.com>,
Karol Herbst <kherbst@redhat.com>, Lyude Paul <lyude@redhat.com>,
David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH][next] drm/nouveau/bios/therm: make read-only array duty_lut static const
Date: Wed, 12 Jul 2023 17:26:59 +0100 [thread overview]
Message-ID: <20230712162659.466996-1-colin.i.king@gmail.com> (raw)
Don't populate the read-only array on the stack, instead make it static
const.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
drivers/gpu/drm/nouveau/nvkm/subdev/bios/therm.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/therm.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/therm.c
index 5babc5a7c7d5..31fb20cc5a9b 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/therm.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/therm.c
@@ -156,8 +156,10 @@ nvbios_therm_fan_parse(struct nvkm_bios *bios, struct nvbios_therm_fan *fan)
u8 ver, len, i;
u32 entry;
- uint8_t duty_lut[] = { 0, 0, 25, 0, 40, 0, 50, 0,
- 75, 0, 85, 0, 100, 0, 100, 0 };
+ static const uint8_t duty_lut[] = {
+ 0, 0, 25, 0, 40, 0, 50, 0,
+ 75, 0, 85, 0, 100, 0, 100, 0
+ };
i = 0;
fan->nr_fan_trip = 0;
--
2.39.2
reply other threads:[~2023-07-12 16:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20230712162659.466996-1-colin.i.king@gmail.com \
--to=colin.i.king@gmail.com \
--cc=airlied@gmail.com \
--cc=bskeggs@redhat.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=kherbst@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lyude@redhat.com \
--cc=nouveau@lists.freedesktop.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®