Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1675405 > unrolled thread
| Started by | Colin King <colin.king@canonical.com> |
|---|---|
| First post | 2017-06-27 10:20 +0200 |
| Last post | 2017-06-27 12:10 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] drm/nouveau/therm: fix spelling mistake on array thresolds Colin King <colin.king@canonical.com> - 2017-06-27 10:20 +0200
Re: [Nouveau] [PATCH] drm/nouveau/therm: fix spelling mistake on array thresolds Martin Peres <martin.peres@free.fr> - 2017-06-27 12:10 +0200
| From | Colin King <colin.king@canonical.com> |
|---|---|
| Date | 2017-06-27 10:20 +0200 |
| Subject | [PATCH] drm/nouveau/therm: fix spelling mistake on array thresolds |
| Message-ID | <tWTT4-6dY-9@gated-at.bofh.it> |
From: Colin Ian King <colin.king@canonical.com>
Array thresolds should be named thresholds, rename it. Also make it static
static const char * const
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c
index e93b2410c38b..6449771b9dc6 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c
@@ -83,7 +83,7 @@ nvkm_therm_sensor_event(struct nvkm_therm *therm, enum nvkm_therm_thrs thrs,
{
struct nvkm_subdev *subdev = &therm->subdev;
bool active;
- const char *thresolds[] = {
+ static const char * const thresholds[] = {
"fanboost", "downclock", "critical", "shutdown"
};
int temperature = therm->func->temp_get(therm);
@@ -94,10 +94,10 @@ nvkm_therm_sensor_event(struct nvkm_therm *therm, enum nvkm_therm_thrs thrs,
if (dir == NVKM_THERM_THRS_FALLING)
nvkm_info(subdev,
"temperature (%i C) went below the '%s' threshold\n",
- temperature, thresolds[thrs]);
+ temperature, thresholds[thrs]);
else
nvkm_info(subdev, "temperature (%i C) hit the '%s' threshold\n",
- temperature, thresolds[thrs]);
+ temperature, thresholds[thrs]);
active = (dir == NVKM_THERM_THRS_RISING);
switch (thrs) {
--
2.11.0
[toc] | [next] | [standalone]
| From | Martin Peres <martin.peres@free.fr> |
|---|---|
| Date | 2017-06-27 12:10 +0200 |
| Subject | Re: [Nouveau] [PATCH] drm/nouveau/therm: fix spelling mistake on array thresolds |
| Message-ID | <tWVBx-7pX-41@gated-at.bofh.it> |
| In reply to | #1675405 |
On 27/06/17 11:08, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Array thresolds should be named thresholds, rename it. Also make it static
> static const char * const
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Thanks for doing this,
Reviewed-by: Martin Peres <martin.peres@free.fr>
> ---
> drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c
> index e93b2410c38b..6449771b9dc6 100644
> --- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c
> +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c
> @@ -83,7 +83,7 @@ nvkm_therm_sensor_event(struct nvkm_therm *therm, enum nvkm_therm_thrs thrs,
> {
> struct nvkm_subdev *subdev = &therm->subdev;
> bool active;
> - const char *thresolds[] = {
> + static const char * const thresholds[] = {
> "fanboost", "downclock", "critical", "shutdown"
> };
> int temperature = therm->func->temp_get(therm);
> @@ -94,10 +94,10 @@ nvkm_therm_sensor_event(struct nvkm_therm *therm, enum nvkm_therm_thrs thrs,
> if (dir == NVKM_THERM_THRS_FALLING)
> nvkm_info(subdev,
> "temperature (%i C) went below the '%s' threshold\n",
> - temperature, thresolds[thrs]);
> + temperature, thresholds[thrs]);
> else
> nvkm_info(subdev, "temperature (%i C) hit the '%s' threshold\n",
> - temperature, thresolds[thrs]);
> + temperature, thresholds[thrs]);
>
> active = (dir == NVKM_THERM_THRS_RISING);
> switch (thrs) {
>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web