All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][drm-next] drm/amd/powerplay: fix spelling mistake: "dividable" -> "divisible"
@ 2017-09-28 10:35 ` Colin King
  0 siblings, 0 replies; 21+ messages in thread
From: Colin King @ 2017-09-28 10:35 UTC (permalink / raw)
  To: Alex Deucher, Christian König, David Airlie, Rex Zhu,
	Xiangliang Yu, Monk Liu, Evan Quan, amd-gfx, dri-devel
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

Trivial fix to spelling mistakes in pr_err error message and ASSERT
messages.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c         | 2 +-
 drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c | 2 +-
 drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c    | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c b/drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c
index fcf88b8fc738..9d1086894d2b 100644
--- a/drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c
@@ -2332,7 +2332,7 @@ static int ci_load_smc_ucode(struct pp_hwmgr *hwmgr)
 	PHM_WRITE_FIELD(hwmgr->device, SMC_IND_ACCESS_CNTL, AUTO_INCREMENT_IND_0, 0);
 
 	if (0 != byte_count) {
-		pr_err("SMC size must be dividable by 4\n");
+		pr_err("SMC size must be divisible by 4\n");
 		return -EINVAL;
 	}
 
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c
index 78aa1122eacc..a778e174ba01 100644
--- a/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c
@@ -108,7 +108,7 @@ static int iceland_upload_smc_firmware_data(struct pp_hwmgr *hwmgr,
 
 	PHM_WRITE_FIELD(hwmgr->device, SMC_IND_ACCESS_CNTL, AUTO_INCREMENT_IND_0, 0);
 
-	PP_ASSERT_WITH_CODE((0 == byte_count), "SMC size must be dividable by 4.", return -EINVAL);
+	PP_ASSERT_WITH_CODE((0 == byte_count), "SMC size must be divisible by 4.", return -EINVAL);
 
 	return 0;
 }
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c
index 2ae05bbdb974..c997117f2461 100644
--- a/drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c
@@ -513,7 +513,7 @@ static int smu7_upload_smc_firmware_data(struct pp_hwmgr *hwmgr, uint32_t length
 
 	PHM_WRITE_FIELD(hwmgr->device, SMC_IND_ACCESS_CNTL, AUTO_INCREMENT_IND_11, 0);
 
-	PP_ASSERT_WITH_CODE((0 == byte_count), "SMC size must be dividable by 4.", return -EINVAL);
+	PP_ASSERT_WITH_CODE((0 == byte_count), "SMC size must be divisible by 4.", return -EINVAL);
 
 	return 0;
 }
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH][drm-next] drm/amd/powerplay: fix spelling mistake: "dividable" -> "divisible"
@ 2017-09-28 10:35 ` Colin King
  0 siblings, 0 replies; 21+ messages in thread
From: Colin King @ 2017-09-28 10:35 UTC (permalink / raw)
  To: Alex Deucher, Christian König, David Airlie, Rex Zhu,
	Xiangliang Yu, Monk Liu, Evan Quan, amd-gfx, dri-devel
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

Trivial fix to spelling mistakes in pr_err error message and ASSERT
messages.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c         | 2 +-
 drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c | 2 +-
 drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c    | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c b/drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c
index fcf88b8fc738..9d1086894d2b 100644
--- a/drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c
@@ -2332,7 +2332,7 @@ static int ci_load_smc_ucode(struct pp_hwmgr *hwmgr)
 	PHM_WRITE_FIELD(hwmgr->device, SMC_IND_ACCESS_CNTL, AUTO_INCREMENT_IND_0, 0);
 
 	if (0 != byte_count) {
-		pr_err("SMC size must be dividable by 4\n");
+		pr_err("SMC size must be divisible by 4\n");
 		return -EINVAL;
 	}
 
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c
index 78aa1122eacc..a778e174ba01 100644
--- a/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c
@@ -108,7 +108,7 @@ static int iceland_upload_smc_firmware_data(struct pp_hwmgr *hwmgr,
 
 	PHM_WRITE_FIELD(hwmgr->device, SMC_IND_ACCESS_CNTL, AUTO_INCREMENT_IND_0, 0);
 
-	PP_ASSERT_WITH_CODE((0 = byte_count), "SMC size must be dividable by 4.", return -EINVAL);
+	PP_ASSERT_WITH_CODE((0 = byte_count), "SMC size must be divisible by 4.", return -EINVAL);
 
 	return 0;
 }
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c
index 2ae05bbdb974..c997117f2461 100644
--- a/drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c
@@ -513,7 +513,7 @@ static int smu7_upload_smc_firmware_data(struct pp_hwmgr *hwmgr, uint32_t length
 
 	PHM_WRITE_FIELD(hwmgr->device, SMC_IND_ACCESS_CNTL, AUTO_INCREMENT_IND_11, 0);
 
-	PP_ASSERT_WITH_CODE((0 = byte_count), "SMC size must be dividable by 4.", return -EINVAL);
+	PP_ASSERT_WITH_CODE((0 = byte_count), "SMC size must be divisible by 4.", return -EINVAL);
 
 	return 0;
 }
-- 
2.14.1


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH][drm-next] drm/amd/powerplay: fix spelling mistake: "dividable" -> "divisible"
@ 2017-09-28 10:35 ` Colin King
  0 siblings, 0 replies; 21+ messages in thread
From: Colin King @ 2017-09-28 10:35 UTC (permalink / raw)
  To: Alex Deucher, Christian König, David Airlie, Rex Zhu,
	Xiangliang Yu, Monk Liu, Evan Quan, amd-gfx, dri-devel
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

Trivial fix to spelling mistakes in pr_err error message and ASSERT
messages.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c         | 2 +-
 drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c | 2 +-
 drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c    | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c b/drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c
index fcf88b8fc738..9d1086894d2b 100644
--- a/drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c
@@ -2332,7 +2332,7 @@ static int ci_load_smc_ucode(struct pp_hwmgr *hwmgr)
 	PHM_WRITE_FIELD(hwmgr->device, SMC_IND_ACCESS_CNTL, AUTO_INCREMENT_IND_0, 0);
 
 	if (0 != byte_count) {
-		pr_err("SMC size must be dividable by 4\n");
+		pr_err("SMC size must be divisible by 4\n");
 		return -EINVAL;
 	}
 
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c
index 78aa1122eacc..a778e174ba01 100644
--- a/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c
@@ -108,7 +108,7 @@ static int iceland_upload_smc_firmware_data(struct pp_hwmgr *hwmgr,
 
 	PHM_WRITE_FIELD(hwmgr->device, SMC_IND_ACCESS_CNTL, AUTO_INCREMENT_IND_0, 0);
 
-	PP_ASSERT_WITH_CODE((0 == byte_count), "SMC size must be dividable by 4.", return -EINVAL);
+	PP_ASSERT_WITH_CODE((0 == byte_count), "SMC size must be divisible by 4.", return -EINVAL);
 
 	return 0;
 }
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c
index 2ae05bbdb974..c997117f2461 100644
--- a/drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c
@@ -513,7 +513,7 @@ static int smu7_upload_smc_firmware_data(struct pp_hwmgr *hwmgr, uint32_t length
 
 	PHM_WRITE_FIELD(hwmgr->device, SMC_IND_ACCESS_CNTL, AUTO_INCREMENT_IND_11, 0);
 
-	PP_ASSERT_WITH_CODE((0 == byte_count), "SMC size must be dividable by 4.", return -EINVAL);
+	PP_ASSERT_WITH_CODE((0 == byte_count), "SMC size must be divisible by 4.", return -EINVAL);
 
 	return 0;
 }
-- 
2.14.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* Re: [PATCH][drm-next] drm/amd/powerplay: fix spelling mistake: "dividable" -> "divisible"
  2017-09-28 10:35 ` Colin King
  (?)
@ 2017-09-28 19:46   ` Alex Deucher
  -1 siblings, 0 replies; 21+ messages in thread
From: Alex Deucher @ 2017-09-28 19:46 UTC (permalink / raw)
  To: Colin King
  Cc: Alex Deucher, Christian König, David Airlie, Rex Zhu,
	Xiangliang Yu, Monk Liu, Evan Quan, amd-gfx list,
	Maling list - DRI developers, kernel-janitors, LKML

On Thu, Sep 28, 2017 at 6:35 AM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Trivial fix to spelling mistakes in pr_err error message and ASSERT
> messages.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied.  thanks!

Alex

> ---
>  drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c         | 2 +-
>  drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c | 2 +-
>  drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c    | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c b/drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c
> index fcf88b8fc738..9d1086894d2b 100644
> --- a/drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c
> +++ b/drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c
> @@ -2332,7 +2332,7 @@ static int ci_load_smc_ucode(struct pp_hwmgr *hwmgr)
>         PHM_WRITE_FIELD(hwmgr->device, SMC_IND_ACCESS_CNTL, AUTO_INCREMENT_IND_0, 0);
>
>         if (0 != byte_count) {
> -               pr_err("SMC size must be dividable by 4\n");
> +               pr_err("SMC size must be divisible by 4\n");
>                 return -EINVAL;
>         }
>
> diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c
> index 78aa1122eacc..a778e174ba01 100644
> --- a/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c
> +++ b/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c
> @@ -108,7 +108,7 @@ static int iceland_upload_smc_firmware_data(struct pp_hwmgr *hwmgr,
>
>         PHM_WRITE_FIELD(hwmgr->device, SMC_IND_ACCESS_CNTL, AUTO_INCREMENT_IND_0, 0);
>
> -       PP_ASSERT_WITH_CODE((0 == byte_count), "SMC size must be dividable by 4.", return -EINVAL);
> +       PP_ASSERT_WITH_CODE((0 == byte_count), "SMC size must be divisible by 4.", return -EINVAL);
>
>         return 0;
>  }
> diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c
> index 2ae05bbdb974..c997117f2461 100644
> --- a/drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c
> +++ b/drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c
> @@ -513,7 +513,7 @@ static int smu7_upload_smc_firmware_data(struct pp_hwmgr *hwmgr, uint32_t length
>
>         PHM_WRITE_FIELD(hwmgr->device, SMC_IND_ACCESS_CNTL, AUTO_INCREMENT_IND_11, 0);
>
> -       PP_ASSERT_WITH_CODE((0 == byte_count), "SMC size must be dividable by 4.", return -EINVAL);
> +       PP_ASSERT_WITH_CODE((0 == byte_count), "SMC size must be divisible by 4.", return -EINVAL);
>
>         return 0;
>  }
> --
> 2.14.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH][drm-next] drm/amd/powerplay: fix spelling mistake: "dividable" -> "divisible"
@ 2017-09-28 19:46   ` Alex Deucher
  0 siblings, 0 replies; 21+ messages in thread
From: Alex Deucher @ 2017-09-28 19:46 UTC (permalink / raw)
  To: Colin King
  Cc: kernel-janitors, LKML, amd-gfx list, Xiangliang Yu,
	Maling list - DRI developers, Alex Deucher, Evan Quan, Rex Zhu,
	Christian König, Monk Liu

On Thu, Sep 28, 2017 at 6:35 AM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Trivial fix to spelling mistakes in pr_err error message and ASSERT
> messages.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied.  thanks!

Alex

> ---
>  drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c         | 2 +-
>  drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c | 2 +-
>  drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c    | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c b/drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c
> index fcf88b8fc738..9d1086894d2b 100644
> --- a/drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c
> +++ b/drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c
> @@ -2332,7 +2332,7 @@ static int ci_load_smc_ucode(struct pp_hwmgr *hwmgr)
>         PHM_WRITE_FIELD(hwmgr->device, SMC_IND_ACCESS_CNTL, AUTO_INCREMENT_IND_0, 0);
>
>         if (0 != byte_count) {
> -               pr_err("SMC size must be dividable by 4\n");
> +               pr_err("SMC size must be divisible by 4\n");
>                 return -EINVAL;
>         }
>
> diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c
> index 78aa1122eacc..a778e174ba01 100644
> --- a/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c
> +++ b/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c
> @@ -108,7 +108,7 @@ static int iceland_upload_smc_firmware_data(struct pp_hwmgr *hwmgr,
>
>         PHM_WRITE_FIELD(hwmgr->device, SMC_IND_ACCESS_CNTL, AUTO_INCREMENT_IND_0, 0);
>
> -       PP_ASSERT_WITH_CODE((0 = byte_count), "SMC size must be dividable by 4.", return -EINVAL);
> +       PP_ASSERT_WITH_CODE((0 = byte_count), "SMC size must be divisible by 4.", return -EINVAL);
>
>         return 0;
>  }
> diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c
> index 2ae05bbdb974..c997117f2461 100644
> --- a/drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c
> +++ b/drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c
> @@ -513,7 +513,7 @@ static int smu7_upload_smc_firmware_data(struct pp_hwmgr *hwmgr, uint32_t length
>
>         PHM_WRITE_FIELD(hwmgr->device, SMC_IND_ACCESS_CNTL, AUTO_INCREMENT_IND_11, 0);
>
> -       PP_ASSERT_WITH_CODE((0 = byte_count), "SMC size must be dividable by 4.", return -EINVAL);
> +       PP_ASSERT_WITH_CODE((0 = byte_count), "SMC size must be divisible by 4.", return -EINVAL);
>
>         return 0;
>  }
> --
> 2.14.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH][drm-next] drm/amd/powerplay: fix spelling mistake: "dividable" -> "divisible"
@ 2017-09-28 19:46   ` Alex Deucher
  0 siblings, 0 replies; 21+ messages in thread
From: Alex Deucher @ 2017-09-28 19:46 UTC (permalink / raw)
  To: Colin King
  Cc: kernel-janitors, LKML, amd-gfx list, Xiangliang Yu,
	Maling list - DRI developers, Alex Deucher, Evan Quan, Rex Zhu,
	Christian König, Monk Liu

On Thu, Sep 28, 2017 at 6:35 AM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Trivial fix to spelling mistakes in pr_err error message and ASSERT
> messages.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied.  thanks!

Alex

> ---
>  drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c         | 2 +-
>  drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c | 2 +-
>  drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c    | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c b/drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c
> index fcf88b8fc738..9d1086894d2b 100644
> --- a/drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c
> +++ b/drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c
> @@ -2332,7 +2332,7 @@ static int ci_load_smc_ucode(struct pp_hwmgr *hwmgr)
>         PHM_WRITE_FIELD(hwmgr->device, SMC_IND_ACCESS_CNTL, AUTO_INCREMENT_IND_0, 0);
>
>         if (0 != byte_count) {
> -               pr_err("SMC size must be dividable by 4\n");
> +               pr_err("SMC size must be divisible by 4\n");
>                 return -EINVAL;
>         }
>
> diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c
> index 78aa1122eacc..a778e174ba01 100644
> --- a/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c
> +++ b/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c
> @@ -108,7 +108,7 @@ static int iceland_upload_smc_firmware_data(struct pp_hwmgr *hwmgr,
>
>         PHM_WRITE_FIELD(hwmgr->device, SMC_IND_ACCESS_CNTL, AUTO_INCREMENT_IND_0, 0);
>
> -       PP_ASSERT_WITH_CODE((0 == byte_count), "SMC size must be dividable by 4.", return -EINVAL);
> +       PP_ASSERT_WITH_CODE((0 == byte_count), "SMC size must be divisible by 4.", return -EINVAL);
>
>         return 0;
>  }
> diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c
> index 2ae05bbdb974..c997117f2461 100644
> --- a/drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c
> +++ b/drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c
> @@ -513,7 +513,7 @@ static int smu7_upload_smc_firmware_data(struct pp_hwmgr *hwmgr, uint32_t length
>
>         PHM_WRITE_FIELD(hwmgr->device, SMC_IND_ACCESS_CNTL, AUTO_INCREMENT_IND_11, 0);
>
> -       PP_ASSERT_WITH_CODE((0 == byte_count), "SMC size must be dividable by 4.", return -EINVAL);
> +       PP_ASSERT_WITH_CODE((0 == byte_count), "SMC size must be divisible by 4.", return -EINVAL);
>
>         return 0;
>  }
> --
> 2.14.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH][drm-next] drm/amd/powerplay: fix a few spelling mistakes
  2017-09-28 10:35 ` Colin King
@ 2019-08-01  8:39 ` Colin King
  -1 siblings, 0 replies; 21+ messages in thread
From: Colin King @ 2019-08-01  8:39 UTC (permalink / raw)
  To: Rex Zhu, Evan Quan, Alex Deucher, Christian König,
	David Zhou, David Airlie, Daniel Vetter, amd-gfx, dri-devel
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

There are a few spelling mistakes "unknow" -> "unknown" and
"enabeld" -> "enabled". Fix these.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
index 13b2c8a60232..d029a99e600e 100644
--- a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
+++ b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
@@ -39,7 +39,7 @@ static const char* __smu_message_names[] = {
 const char *smu_get_message_name(struct smu_context *smu, enum smu_message_type type)
 {
 	if (type < 0 || type > SMU_MSG_MAX_COUNT)
-		return "unknow smu message";
+		return "unknown smu message";
 	return __smu_message_names[type];
 }
 
@@ -52,7 +52,7 @@ static const char* __smu_feature_names[] = {
 const char *smu_get_feature_name(struct smu_context *smu, enum smu_feature_mask feature)
 {
 	if (feature < 0 || feature > SMU_FEATURE_COUNT)
-		return "unknow smu feature";
+		return "unknown smu feature";
 	return __smu_feature_names[feature];
 }
 
@@ -79,7 +79,7 @@ size_t smu_sys_get_pp_feature_mask(struct smu_context *smu, char *buf)
 			       count++,
 			       smu_get_feature_name(smu, i),
 			       feature_index,
-			       !!smu_feature_is_enabled(smu, i) ? "enabeld" : "disabled");
+			       !!smu_feature_is_enabled(smu, i) ? "enabled" : "disabled");
 	}
 
 failed:
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH][drm-next] drm/amd/powerplay: fix a few spelling mistakes
@ 2019-08-01  8:39 ` Colin King
  0 siblings, 0 replies; 21+ messages in thread
From: Colin King @ 2019-08-01  8:39 UTC (permalink / raw)
  To: Rex Zhu, Evan Quan, Alex Deucher, Christian König,
	David Zhou, David Airlie, Daniel Vetter, amd-gfx, dri-devel
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

There are a few spelling mistakes "unknow" -> "unknown" and
"enabeld" -> "enabled". Fix these.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
index 13b2c8a60232..d029a99e600e 100644
--- a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
+++ b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
@@ -39,7 +39,7 @@ static const char* __smu_message_names[] = {
 const char *smu_get_message_name(struct smu_context *smu, enum smu_message_type type)
 {
 	if (type < 0 || type > SMU_MSG_MAX_COUNT)
-		return "unknow smu message";
+		return "unknown smu message";
 	return __smu_message_names[type];
 }
 
@@ -52,7 +52,7 @@ static const char* __smu_feature_names[] = {
 const char *smu_get_feature_name(struct smu_context *smu, enum smu_feature_mask feature)
 {
 	if (feature < 0 || feature > SMU_FEATURE_COUNT)
-		return "unknow smu feature";
+		return "unknown smu feature";
 	return __smu_feature_names[feature];
 }
 
@@ -79,7 +79,7 @@ size_t smu_sys_get_pp_feature_mask(struct smu_context *smu, char *buf)
 			       count++,
 			       smu_get_feature_name(smu, i),
 			       feature_index,
-			       !!smu_feature_is_enabled(smu, i) ? "enabeld" : "disabled");
+			       !!smu_feature_is_enabled(smu, i) ? "enabled" : "disabled");
 	}
 
 failed:
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* Re: [PATCH][drm-next] drm/amd/powerplay: fix a few spelling mistakes
  2019-08-01  8:39 ` Colin King
  (?)
@ 2019-08-01 10:20   ` walter harms
  -1 siblings, 0 replies; 21+ messages in thread
From: walter harms @ 2019-08-01 10:20 UTC (permalink / raw)
  To: kernel-janitors
  Cc: Colin King, Rex Zhu, Evan Quan, Alex Deucher,
	Christian König, David Zhou, David Airlie, Daniel Vetter,
	amd-gfx, dri-devel, linux-kernel



Am 01.08.2019 10:39, schrieb Colin King:
> From: Colin Ian King <colin.king@canonical.com>
> 
> There are a few spelling mistakes "unknow" -> "unknown" and
> "enabeld" -> "enabled". Fix these.
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
> index 13b2c8a60232..d029a99e600e 100644
> --- a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
> +++ b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
> @@ -39,7 +39,7 @@ static const char* __smu_message_names[] = {
>  const char *smu_get_message_name(struct smu_context *smu, enum smu_message_type type)
>  {
>  	if (type < 0 || type > SMU_MSG_MAX_COUNT)
> -		return "unknow smu message";
> +		return "unknown smu message";
>  	return __smu_message_names[type];
>  }
>  
> @@ -52,7 +52,7 @@ static const char* __smu_feature_names[] = {
>  const char *smu_get_feature_name(struct smu_context *smu, enum smu_feature_mask feature)
>  {
>  	if (feature < 0 || feature > SMU_FEATURE_COUNT)
> -		return "unknow smu feature";
> +		return "unknown smu feature";
>  	return __smu_feature_names[feature];
>  }
>  
> @@ -79,7 +79,7 @@ size_t smu_sys_get_pp_feature_mask(struct smu_context *smu, char *buf)
>  			       count++,
>  			       smu_get_feature_name(smu, i),
>  			       feature_index,
> -			       !!smu_feature_is_enabled(smu, i) ? "enabeld" : "disabled");
> +			       !!smu_feature_is_enabled(smu, i) ? "enabled" : "disabled");

i am wondering,
is that !! really needed in front of smu_feature_is_enabled ?

re,
 wh

>  	}
>  
>  failed:

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH][drm-next] drm/amd/powerplay: fix a few spelling mistakes
@ 2019-08-01 10:20   ` walter harms
  0 siblings, 0 replies; 21+ messages in thread
From: walter harms @ 2019-08-01 10:20 UTC (permalink / raw)
  To: kernel-janitors
  Cc: David Airlie, linux-kernel, amd-gfx, dri-devel, Alex Deucher,
	Colin King, Evan Quan, Rex Zhu, Christian König



Am 01.08.2019 10:39, schrieb Colin King:
> From: Colin Ian King <colin.king@canonical.com>
> 
> There are a few spelling mistakes "unknow" -> "unknown" and
> "enabeld" -> "enabled". Fix these.
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
> index 13b2c8a60232..d029a99e600e 100644
> --- a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
> +++ b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
> @@ -39,7 +39,7 @@ static const char* __smu_message_names[] = {
>  const char *smu_get_message_name(struct smu_context *smu, enum smu_message_type type)
>  {
>  	if (type < 0 || type > SMU_MSG_MAX_COUNT)
> -		return "unknow smu message";
> +		return "unknown smu message";
>  	return __smu_message_names[type];
>  }
>  
> @@ -52,7 +52,7 @@ static const char* __smu_feature_names[] = {
>  const char *smu_get_feature_name(struct smu_context *smu, enum smu_feature_mask feature)
>  {
>  	if (feature < 0 || feature > SMU_FEATURE_COUNT)
> -		return "unknow smu feature";
> +		return "unknown smu feature";
>  	return __smu_feature_names[feature];
>  }
>  
> @@ -79,7 +79,7 @@ size_t smu_sys_get_pp_feature_mask(struct smu_context *smu, char *buf)
>  			       count++,
>  			       smu_get_feature_name(smu, i),
>  			       feature_index,
> -			       !!smu_feature_is_enabled(smu, i) ? "enabeld" : "disabled");
> +			       !!smu_feature_is_enabled(smu, i) ? "enabled" : "disabled");

i am wondering,
is that !! really needed in front of smu_feature_is_enabled ?

re,
 wh

>  	}
>  
>  failed:

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH][drm-next] drm/amd/powerplay: fix a few spelling mistakes
@ 2019-08-01 10:20   ` walter harms
  0 siblings, 0 replies; 21+ messages in thread
From: walter harms @ 2019-08-01 10:20 UTC (permalink / raw)
  To: kernel-janitors
  Cc: David Airlie, linux-kernel, amd-gfx, dri-devel, Alex Deucher,
	Colin King, Evan Quan, Rex Zhu, Christian König



Am 01.08.2019 10:39, schrieb Colin King:
> From: Colin Ian King <colin.king@canonical.com>
> 
> There are a few spelling mistakes "unknow" -> "unknown" and
> "enabeld" -> "enabled". Fix these.
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
> index 13b2c8a60232..d029a99e600e 100644
> --- a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
> +++ b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
> @@ -39,7 +39,7 @@ static const char* __smu_message_names[] = {
>  const char *smu_get_message_name(struct smu_context *smu, enum smu_message_type type)
>  {
>  	if (type < 0 || type > SMU_MSG_MAX_COUNT)
> -		return "unknow smu message";
> +		return "unknown smu message";
>  	return __smu_message_names[type];
>  }
>  
> @@ -52,7 +52,7 @@ static const char* __smu_feature_names[] = {
>  const char *smu_get_feature_name(struct smu_context *smu, enum smu_feature_mask feature)
>  {
>  	if (feature < 0 || feature > SMU_FEATURE_COUNT)
> -		return "unknow smu feature";
> +		return "unknown smu feature";
>  	return __smu_feature_names[feature];
>  }
>  
> @@ -79,7 +79,7 @@ size_t smu_sys_get_pp_feature_mask(struct smu_context *smu, char *buf)
>  			       count++,
>  			       smu_get_feature_name(smu, i),
>  			       feature_index,
> -			       !!smu_feature_is_enabled(smu, i) ? "enabeld" : "disabled");
> +			       !!smu_feature_is_enabled(smu, i) ? "enabled" : "disabled");

i am wondering,
is that !! really needed in front of smu_feature_is_enabled ?

re,
 wh

>  	}
>  
>  failed:
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH][drm-next] drm/amd/powerplay: fix off-by-one upper bounds limit checks
  2017-09-28 10:35 ` Colin King
@ 2019-08-01 11:15 ` Colin King
  -1 siblings, 0 replies; 21+ messages in thread
From: Colin King @ 2019-08-01 11:15 UTC (permalink / raw)
  To: Kevin Wang, Rex Zhu, Evan Quan, Alex Deucher,
	Christian König, David Zhou, David Airlie, Daniel Vetter,
	amd-gfx, dri-devel
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

There are two occurrances of off-by-one upper bound checking of indexes
causing potential out-of-bounds array reads. Fix these.

Addresses-Coverity: ("Out-of-bounds read")
Fixes: cb33363d0e85 ("drm/amd/powerplay: add smu feature name support")
Fixes: 6b294793e384 ("drm/amd/powerplay: add smu message name support")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
index d029a99e600e..b64113740eb5 100644
--- a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
+++ b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
@@ -38,7 +38,7 @@ static const char* __smu_message_names[] = {
 
 const char *smu_get_message_name(struct smu_context *smu, enum smu_message_type type)
 {
-	if (type < 0 || type > SMU_MSG_MAX_COUNT)
+	if (type < 0 || type >= SMU_MSG_MAX_COUNT)
 		return "unknown smu message";
 	return __smu_message_names[type];
 }
@@ -51,7 +51,7 @@ static const char* __smu_feature_names[] = {
 
 const char *smu_get_feature_name(struct smu_context *smu, enum smu_feature_mask feature)
 {
-	if (feature < 0 || feature > SMU_FEATURE_COUNT)
+	if (feature < 0 || feature >= SMU_FEATURE_COUNT)
 		return "unknown smu feature";
 	return __smu_feature_names[feature];
 }
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH][drm-next] drm/amd/powerplay: fix off-by-one upper bounds limit checks
@ 2019-08-01 11:15 ` Colin King
  0 siblings, 0 replies; 21+ messages in thread
From: Colin King @ 2019-08-01 11:15 UTC (permalink / raw)
  To: Kevin Wang, Rex Zhu, Evan Quan, Alex Deucher,
	Christian König, David Zhou, David Airlie, Daniel Vetter,
	amd-gfx, dri-devel
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

There are two occurrances of off-by-one upper bound checking of indexes
causing potential out-of-bounds array reads. Fix these.

Addresses-Coverity: ("Out-of-bounds read")
Fixes: cb33363d0e85 ("drm/amd/powerplay: add smu feature name support")
Fixes: 6b294793e384 ("drm/amd/powerplay: add smu message name support")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
index d029a99e600e..b64113740eb5 100644
--- a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
+++ b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
@@ -38,7 +38,7 @@ static const char* __smu_message_names[] = {
 
 const char *smu_get_message_name(struct smu_context *smu, enum smu_message_type type)
 {
-	if (type < 0 || type > SMU_MSG_MAX_COUNT)
+	if (type < 0 || type >= SMU_MSG_MAX_COUNT)
 		return "unknown smu message";
 	return __smu_message_names[type];
 }
@@ -51,7 +51,7 @@ static const char* __smu_feature_names[] = {
 
 const char *smu_get_feature_name(struct smu_context *smu, enum smu_feature_mask feature)
 {
-	if (feature < 0 || feature > SMU_FEATURE_COUNT)
+	if (feature < 0 || feature >= SMU_FEATURE_COUNT)
 		return "unknown smu feature";
 	return __smu_feature_names[feature];
 }
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* Re: [PATCH][drm-next] drm/amd/powerplay: fix off-by-one upper bounds limit checks
  2019-08-01 11:15 ` Colin King
@ 2019-08-01 18:53   ` Alex Deucher
  -1 siblings, 0 replies; 21+ messages in thread
From: Alex Deucher @ 2019-08-01 18:53 UTC (permalink / raw)
  To: Colin King
  Cc: Kevin Wang, Rex Zhu, Evan Quan, Alex Deucher,
	Christian König, David Zhou, David Airlie, Daniel Vetter,
	amd-gfx list, Maling list - DRI developers, kernel-janitors,
	LKML

On Thu, Aug 1, 2019 at 7:15 AM Colin King <colin.king@canonical.com> wrote:
>
> From: Colin Ian King <colin.king@canonical.com>
>
> There are two occurrances of off-by-one upper bound checking of indexes
> causing potential out-of-bounds array reads. Fix these.
>
> Addresses-Coverity: ("Out-of-bounds read")
> Fixes: cb33363d0e85 ("drm/amd/powerplay: add smu feature name support")
> Fixes: 6b294793e384 ("drm/amd/powerplay: add smu message name support")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied.  thanks!

Alex

> ---
>  drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
> index d029a99e600e..b64113740eb5 100644
> --- a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
> +++ b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
> @@ -38,7 +38,7 @@ static const char* __smu_message_names[] = {
>
>  const char *smu_get_message_name(struct smu_context *smu, enum smu_message_type type)
>  {
> -       if (type < 0 || type > SMU_MSG_MAX_COUNT)
> +       if (type < 0 || type >= SMU_MSG_MAX_COUNT)
>                 return "unknown smu message";
>         return __smu_message_names[type];
>  }
> @@ -51,7 +51,7 @@ static const char* __smu_feature_names[] = {
>
>  const char *smu_get_feature_name(struct smu_context *smu, enum smu_feature_mask feature)
>  {
> -       if (feature < 0 || feature > SMU_FEATURE_COUNT)
> +       if (feature < 0 || feature >= SMU_FEATURE_COUNT)
>                 return "unknown smu feature";
>         return __smu_feature_names[feature];
>  }
> --
> 2.20.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH][drm-next] drm/amd/powerplay: fix off-by-one upper bounds limit checks
@ 2019-08-01 18:53   ` Alex Deucher
  0 siblings, 0 replies; 21+ messages in thread
From: Alex Deucher @ 2019-08-01 18:53 UTC (permalink / raw)
  To: Colin King
  Cc: Kevin Wang, Rex Zhu, Evan Quan, Alex Deucher,
	Christian König, David Zhou, David Airlie, Daniel Vetter,
	amd-gfx list, Maling list - DRI developers, kernel-janitors,
	LKML

On Thu, Aug 1, 2019 at 7:15 AM Colin King <colin.king@canonical.com> wrote:
>
> From: Colin Ian King <colin.king@canonical.com>
>
> There are two occurrances of off-by-one upper bound checking of indexes
> causing potential out-of-bounds array reads. Fix these.
>
> Addresses-Coverity: ("Out-of-bounds read")
> Fixes: cb33363d0e85 ("drm/amd/powerplay: add smu feature name support")
> Fixes: 6b294793e384 ("drm/amd/powerplay: add smu message name support")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied.  thanks!

Alex

> ---
>  drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
> index d029a99e600e..b64113740eb5 100644
> --- a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
> +++ b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
> @@ -38,7 +38,7 @@ static const char* __smu_message_names[] = {
>
>  const char *smu_get_message_name(struct smu_context *smu, enum smu_message_type type)
>  {
> -       if (type < 0 || type > SMU_MSG_MAX_COUNT)
> +       if (type < 0 || type >= SMU_MSG_MAX_COUNT)
>                 return "unknown smu message";
>         return __smu_message_names[type];
>  }
> @@ -51,7 +51,7 @@ static const char* __smu_feature_names[] = {
>
>  const char *smu_get_feature_name(struct smu_context *smu, enum smu_feature_mask feature)
>  {
> -       if (feature < 0 || feature > SMU_FEATURE_COUNT)
> +       if (feature < 0 || feature >= SMU_FEATURE_COUNT)
>                 return "unknown smu feature";
>         return __smu_feature_names[feature];
>  }
> --
> 2.20.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH][drm-next] drm/amd/powerplay: fix a few spelling mistakes
  2019-08-01  8:39 ` Colin King
@ 2019-08-01 19:02   ` Alex Deucher
  -1 siblings, 0 replies; 21+ messages in thread
From: Alex Deucher @ 2019-08-01 19:02 UTC (permalink / raw)
  To: Colin King
  Cc: Rex Zhu, Evan Quan, Alex Deucher, Christian König,
	David Zhou, David Airlie, Daniel Vetter, amd-gfx list,
	Maling list - DRI developers, kernel-janitors, LKML

Applied.  thanks!

Alex

On Thu, Aug 1, 2019 at 4:39 AM Colin King <colin.king@canonical.com> wrote:
>
> From: Colin Ian King <colin.king@canonical.com>
>
> There are a few spelling mistakes "unknow" -> "unknown" and
> "enabeld" -> "enabled". Fix these.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
> index 13b2c8a60232..d029a99e600e 100644
> --- a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
> +++ b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
> @@ -39,7 +39,7 @@ static const char* __smu_message_names[] = {
>  const char *smu_get_message_name(struct smu_context *smu, enum smu_message_type type)
>  {
>         if (type < 0 || type > SMU_MSG_MAX_COUNT)
> -               return "unknow smu message";
> +               return "unknown smu message";
>         return __smu_message_names[type];
>  }
>
> @@ -52,7 +52,7 @@ static const char* __smu_feature_names[] = {
>  const char *smu_get_feature_name(struct smu_context *smu, enum smu_feature_mask feature)
>  {
>         if (feature < 0 || feature > SMU_FEATURE_COUNT)
> -               return "unknow smu feature";
> +               return "unknown smu feature";
>         return __smu_feature_names[feature];
>  }
>
> @@ -79,7 +79,7 @@ size_t smu_sys_get_pp_feature_mask(struct smu_context *smu, char *buf)
>                                count++,
>                                smu_get_feature_name(smu, i),
>                                feature_index,
> -                              !!smu_feature_is_enabled(smu, i) ? "enabeld" : "disabled");
> +                              !!smu_feature_is_enabled(smu, i) ? "enabled" : "disabled");
>         }
>
>  failed:
> --
> 2.20.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH][drm-next] drm/amd/powerplay: fix a few spelling mistakes
@ 2019-08-01 19:02   ` Alex Deucher
  0 siblings, 0 replies; 21+ messages in thread
From: Alex Deucher @ 2019-08-01 19:02 UTC (permalink / raw)
  To: Colin King
  Cc: Rex Zhu, Evan Quan, Alex Deucher, Christian König,
	David Zhou, David Airlie, Daniel Vetter, amd-gfx list,
	Maling list - DRI developers, kernel-janitors, LKML

Applied.  thanks!

Alex

On Thu, Aug 1, 2019 at 4:39 AM Colin King <colin.king@canonical.com> wrote:
>
> From: Colin Ian King <colin.king@canonical.com>
>
> There are a few spelling mistakes "unknow" -> "unknown" and
> "enabeld" -> "enabled". Fix these.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
> index 13b2c8a60232..d029a99e600e 100644
> --- a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
> +++ b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
> @@ -39,7 +39,7 @@ static const char* __smu_message_names[] = {
>  const char *smu_get_message_name(struct smu_context *smu, enum smu_message_type type)
>  {
>         if (type < 0 || type > SMU_MSG_MAX_COUNT)
> -               return "unknow smu message";
> +               return "unknown smu message";
>         return __smu_message_names[type];
>  }
>
> @@ -52,7 +52,7 @@ static const char* __smu_feature_names[] = {
>  const char *smu_get_feature_name(struct smu_context *smu, enum smu_feature_mask feature)
>  {
>         if (feature < 0 || feature > SMU_FEATURE_COUNT)
> -               return "unknow smu feature";
> +               return "unknown smu feature";
>         return __smu_feature_names[feature];
>  }
>
> @@ -79,7 +79,7 @@ size_t smu_sys_get_pp_feature_mask(struct smu_context *smu, char *buf)
>                                count++,
>                                smu_get_feature_name(smu, i),
>                                feature_index,
> -                              !!smu_feature_is_enabled(smu, i) ? "enabeld" : "disabled");
> +                              !!smu_feature_is_enabled(smu, i) ? "enabled" : "disabled");
>         }
>
>  failed:
> --
> 2.20.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH][drm-next] drm/amd/powerplay: fix a few spelling mistakes
  2019-08-01 19:02   ` Alex Deucher
@ 2019-08-01 19:16     ` Joe Perches
  -1 siblings, 0 replies; 21+ messages in thread
From: Joe Perches @ 2019-08-01 19:16 UTC (permalink / raw)
  To: Alex Deucher, Colin King
  Cc: Rex Zhu, Evan Quan, Alex Deucher, Christian König,
	David Zhou, David Airlie, Daniel Vetter, amd-gfx list,
	Maling list - DRI developers, kernel-janitors, LKML

On Thu, 2019-08-01 at 15:02 -0400, Alex Deucher wrote:
> Applied.  thanks!
> 
> Alex
> 
> On Thu, Aug 1, 2019 at 4:39 AM Colin King <colin.king@canonical.com> wrote:
> > From: Colin Ian King <colin.king@canonical.com>
> > 
> > There are a few spelling mistakes "unknow" -> "unknown" and
> > "enabeld" -> "enabled". Fix these.
[]
> > diff --git a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
[]
> > @@ -39,7 +39,7 @@ static const char* __smu_message_names[] = {
> >  const char *smu_get_message_name(struct smu_context *smu, enum smu_message_type type)
> >  {
> >         if (type < 0 || type > SMU_MSG_MAX_COUNT)

This looks like an off-by-one test against
SMU_MSG_MAX_COUNT where type
should be >=

> > -               return "unknow smu message";
> > +               return "unknown smu message";
> >         return __smu_message_names[type];
[]
> > @@ -52,7 +52,7 @@ static const char* __smu_feature_names[] = {
> >  const char *smu_get_feature_name(struct smu_context *smu, enum smu_feature_mask feature)
> >  {
> >         if (feature < 0 || feature > SMU_FEATURE_COUNT)

here too

> > -               return "unknow smu feature";
> > +               return "unknown smu feature";
> >         return __smu_feature_names[feature];

Perhaps instead it should be against ARRAY_SIZE(__smu_<foo>)

Also, the  __SMU_DUMMY_MAP macro is unnecessarily complex.

It might be better to have some direct
index and name struct like

struct enum_name {
	int val;
	const char *name;
};

And walk that.

Perhaps add a macro like

#define enum_map(e)
	{.val = e, .name = #e}



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH][drm-next] drm/amd/powerplay: fix a few spelling mistakes
@ 2019-08-01 19:16     ` Joe Perches
  0 siblings, 0 replies; 21+ messages in thread
From: Joe Perches @ 2019-08-01 19:16 UTC (permalink / raw)
  To: Alex Deucher, Colin King
  Cc: Rex Zhu, Evan Quan, Alex Deucher, Christian König,
	David Zhou, David Airlie, Daniel Vetter, amd-gfx list,
	Maling list - DRI developers, kernel-janitors, LKML

On Thu, 2019-08-01 at 15:02 -0400, Alex Deucher wrote:
> Applied.  thanks!
> 
> Alex
> 
> On Thu, Aug 1, 2019 at 4:39 AM Colin King <colin.king@canonical.com> wrote:
> > From: Colin Ian King <colin.king@canonical.com>
> > 
> > There are a few spelling mistakes "unknow" -> "unknown" and
> > "enabeld" -> "enabled". Fix these.
[]
> > diff --git a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
[]
> > @@ -39,7 +39,7 @@ static const char* __smu_message_names[] = {
> >  const char *smu_get_message_name(struct smu_context *smu, enum smu_message_type type)
> >  {
> >         if (type < 0 || type > SMU_MSG_MAX_COUNT)

This looks like an off-by-one test against
SMU_MSG_MAX_COUNT where type
should be >
> > -               return "unknow smu message";
> > +               return "unknown smu message";
> >         return __smu_message_names[type];
[]
> > @@ -52,7 +52,7 @@ static const char* __smu_feature_names[] = {
> >  const char *smu_get_feature_name(struct smu_context *smu, enum smu_feature_mask feature)
> >  {
> >         if (feature < 0 || feature > SMU_FEATURE_COUNT)

here too

> > -               return "unknow smu feature";
> > +               return "unknown smu feature";
> >         return __smu_feature_names[feature];

Perhaps instead it should be against ARRAY_SIZE(__smu_<foo>)

Also, the  __SMU_DUMMY_MAP macro is unnecessarily complex.

It might be better to have some direct
index and name struct like

struct enum_name {
	int val;
	const char *name;
};

And walk that.

Perhaps add a macro like

#define enum_map(e)
	{.val = e, .name = #e}

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH][drm-next] drm/amd/powerplay: fix a few spelling mistakes
       [not found] ` <20190801083941.4230-1-colin.king-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
@ 2019-08-02  1:44   ` Wang, Kevin(Yang)
  0 siblings, 0 replies; 21+ messages in thread
From: Wang, Kevin(Yang) @ 2019-08-02  1:44 UTC (permalink / raw)
  To: Colin King, Rex Zhu, Quan, Evan, Deucher, Alexander, Koenig,
	Christian, Zhou, David(ChunMing),
	David Airlie, Daniel Vetter,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
  Cc: kernel-janitors-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA


[-- Attachment #1.1: Type: text/plain, Size: 3223 bytes --]



________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Colin King <colin.king-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
Sent: Thursday, August 1, 2019 4:39 PM
To: Rex Zhu <rex.zhu-5C7GfCeVMHo@public.gmane.org>; Quan, Evan <Evan.Quan-5C7GfCeVMHo@public.gmane.org>; Deucher, Alexander <Alexander.Deucher-5C7GfCeVMHo@public.gmane.org>; Koenig, Christian <Christian.Koenig@amd.com>; Zhou, David(ChunMing) <David1.Zhou-5C7GfCeVMHo@public.gmane.org>; David Airlie <airlied@linux.ie>; Daniel Vetter <daniel-/w4YWyX8dFk@public.gmane.org>; amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org <amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>; dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org <dri-devel@lists.freedesktop.org>
Cc: kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org <kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>; linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: [PATCH][drm-next] drm/amd/powerplay: fix a few spelling mistakes

From: Colin Ian King <colin.king-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>

There are a few spelling mistakes "unknow" -> "unknown" and
"enabeld" -> "enabled". Fix these.

Signed-off-by: Colin Ian King <colin.king-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
---
 drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
index 13b2c8a60232..d029a99e600e 100644
--- a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
+++ b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
@@ -39,7 +39,7 @@ static const char* __smu_message_names[] = {
 const char *smu_get_message_name(struct smu_context *smu, enum smu_message_type type)
 {
         if (type < 0 || type > SMU_MSG_MAX_COUNT)
-               return "unknow smu message";
+               return "unknown smu message";
         return __smu_message_names[type];
 }

@@ -52,7 +52,7 @@ static const char* __smu_feature_names[] = {
 const char *smu_get_feature_name(struct smu_context *smu, enum smu_feature_mask feature)
 {
         if (feature < 0 || feature > SMU_FEATURE_COUNT)
-               return "unknow smu feature";
+               return "unknown smu feature";
         return __smu_feature_names[feature];
 }

@@ -79,7 +79,7 @@ size_t smu_sys_get_pp_feature_mask(struct smu_context *smu, char *buf)
                                count++,
                                smu_get_feature_name(smu, i),
                                feature_index,
-                              !!smu_feature_is_enabled(smu, i) ? "enabeld" : "disabled");
+                              !!smu_feature_is_enabled(smu, i) ? "enabled" : "disabled");
         }

[kevin]:
thanks correct it.
Reviewed-by: Kevin Wang <kevin1.wang-5C7GfCeVMHo@public.gmane.org>

BR
Kevin

 failed:
--
2.20.1

_______________________________________________
amd-gfx mailing list
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

[-- Attachment #1.2: Type: text/html, Size: 6745 bytes --]

[-- Attachment #2: Type: text/plain, Size: 153 bytes --]

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* Re: [PATCH][drm-next] drm/amd/powerplay: fix off-by-one upper bounds limit checks
  2019-08-01 18:53   ` Alex Deucher
  (?)
@ 2019-08-02  1:45   ` Wang, Kevin(Yang)
  -1 siblings, 0 replies; 21+ messages in thread
From: Wang, Kevin(Yang) @ 2019-08-02  1:45 UTC (permalink / raw)
  To: Alex Deucher, Colin King
  Cc: David Airlie, kernel-janitors, LKML, amd-gfx list,
	Maling list - DRI developers, Deucher, Alexander, Quan, Evan,
	Rex Zhu, Koenig, Christian


[-- Attachment #1.1: Type: text/plain, Size: 2746 bytes --]


________________________________
From: Alex Deucher <alexdeucher@gmail.com>
Sent: Friday, August 2, 2019 2:53 AM
To: Colin King <colin.king@canonical.com>
Cc: Wang, Kevin(Yang) <Kevin1.Wang@amd.com>; Rex Zhu <rex.zhu@amd.com>; Quan, Evan <Evan.Quan@amd.com>; Deucher, Alexander <Alexander.Deucher@amd.com>; Koenig, Christian <Christian.Koenig@amd.com>; Zhou, David(ChunMing) <David1.Zhou@amd.com>; David Airlie <airlied@linux.ie>; Daniel Vetter <daniel@ffwll.ch>; amd-gfx list <amd-gfx@lists.freedesktop.org>; Maling list - DRI developers <dri-devel@lists.freedesktop.org>; kernel-janitors@vger.kernel.org <kernel-janitors@vger.kernel.org>; LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH][drm-next] drm/amd/powerplay: fix off-by-one upper bounds limit checks

On Thu, Aug 1, 2019 at 7:15 AM Colin King <colin.king@canonical.com> wrote:
>
> From: Colin Ian King <colin.king@canonical.com>
>
> There are two occurrances of off-by-one upper bound checking of indexes
> causing potential out-of-bounds array reads. Fix these.
>
> Addresses-Coverity: ("Out-of-bounds read")
> Fixes: cb33363d0e85 ("drm/amd/powerplay: add smu feature name support")
> Fixes: 6b294793e384 ("drm/amd/powerplay: add smu message name support")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied.  thanks!

Alex

> ---
>  drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
> index d029a99e600e..b64113740eb5 100644
> --- a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
> +++ b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
> @@ -38,7 +38,7 @@ static const char* __smu_message_names[] = {
>
>  const char *smu_get_message_name(struct smu_context *smu, enum smu_message_type type)
>  {
> -       if (type < 0 || type > SMU_MSG_MAX_COUNT)
> +       if (type < 0 || type >= SMU_MSG_MAX_COUNT)
>                 return "unknown smu message";
>         return __smu_message_names[type];
>  }
> @@ -51,7 +51,7 @@ static const char* __smu_feature_names[] = {
>
>  const char *smu_get_feature_name(struct smu_context *smu, enum smu_feature_mask feature)
>  {
> -       if (feature < 0 || feature > SMU_FEATURE_COUNT)
> +       if (feature < 0 || feature >= SMU_FEATURE_COUNT)
>                 return "unknown smu feature";
>         return __smu_feature_names[feature];
>  }
[kevin]:
thanks correct it.
Reviewed-by: Kevin Wang <kevin1.wang@amd.com>
BR
Kevin
> --
> 2.20.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

[-- Attachment #1.2: Type: text/html, Size: 4635 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2019-08-02  1:45 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-01 11:15 [PATCH][drm-next] drm/amd/powerplay: fix off-by-one upper bounds limit checks Colin King
2019-08-01 11:15 ` Colin King
2019-08-01 18:53 ` Alex Deucher
2019-08-01 18:53   ` Alex Deucher
2019-08-02  1:45   ` Wang, Kevin(Yang)
  -- strict thread matches above, loose matches on Subject: below --
2019-08-01  8:39 [PATCH][drm-next] drm/amd/powerplay: fix a few spelling mistakes Colin King
2019-08-01  8:39 ` Colin King
2019-08-01 10:20 ` walter harms
2019-08-01 10:20   ` walter harms
2019-08-01 10:20   ` walter harms
2019-08-01 19:02 ` Alex Deucher
2019-08-01 19:02   ` Alex Deucher
2019-08-01 19:16   ` Joe Perches
2019-08-01 19:16     ` Joe Perches
     [not found] ` <20190801083941.4230-1-colin.king-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
2019-08-02  1:44   ` Wang, Kevin(Yang)
2017-09-28 10:35 [PATCH][drm-next] drm/amd/powerplay: fix spelling mistake: "dividable" -> "divisible" Colin King
2017-09-28 10:35 ` Colin King
2017-09-28 10:35 ` Colin King
2017-09-28 19:46 ` Alex Deucher
2017-09-28 19:46   ` Alex Deucher
2017-09-28 19:46   ` Alex Deucher

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.