linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [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
  2019-08-01 19:02 ` Alex Deucher
  0 siblings, 2 replies; 4+ 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] 4+ messages in thread

* Re: [PATCH][drm-next] drm/amd/powerplay: fix a few spelling mistakes
  2019-08-01  8:39 [PATCH][drm-next] drm/amd/powerplay: fix a few spelling mistakes Colin King
@ 2019-08-01 10:20 ` walter harms
  2019-08-01 19:02 ` Alex Deucher
  1 sibling, 0 replies; 4+ 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] 4+ messages in thread

* Re: [PATCH][drm-next] drm/amd/powerplay: fix a few spelling mistakes
  2019-08-01  8:39 [PATCH][drm-next] drm/amd/powerplay: fix a few spelling mistakes Colin King
  2019-08-01 10:20 ` walter harms
@ 2019-08-01 19:02 ` Alex Deucher
  2019-08-01 19:16   ` Joe Perches
  1 sibling, 1 reply; 4+ 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] 4+ 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
  0 siblings, 0 replies; 4+ 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] 4+ messages in thread

end of thread, other threads:[~2019-08-01 19:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-01  8:39 [PATCH][drm-next] drm/amd/powerplay: fix a few spelling mistakes Colin King
2019-08-01 10:20 ` walter harms
2019-08-01 19:02 ` Alex Deucher
2019-08-01 19:16   ` Joe Perches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).