All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Cc: llvm@lists.linux.dev, "Lijo Lazar" <lijo.lazar@amd.com>,
	amd-gfx@lists.freedesktop.org,
	"Luben Tuikov" <luben.tuikov@amd.com>,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Christian König" <christian.koenig@amd.com>
Subject: Re: [PATCH] drm/amdgpu: Mark mmhub_v1_8_mmea_err_status_reg as __maybe_unused
Date: Thu, 25 May 2023 08:22:47 -0700	[thread overview]
Message-ID: <20230525152247.GA187374@dev-arch.thelio-3990X> (raw)
In-Reply-To: <20230519124438.365184-1-srinivasan.shanmugam@amd.com>

On Fri, May 19, 2023 at 06:14:38PM +0530, Srinivasan Shanmugam wrote:
> Silencing the compiler from below compilation error:
> 
> drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c:704:23: error: variable 'mmhub_v1_8_mmea_err_status_reg' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration]
> static const uint32_t mmhub_v1_8_mmea_err_status_reg[] = {
>                       ^
> 1 error generated.
> 
> Mark the variable as __maybe_unused to make it clear to clang that this
> is expected, so there is no more warning.
> 
> Cc: Christian König <christian.koenig@amd.com>
> Cc: Lijo Lazar <lijo.lazar@amd.com>
> Cc: Luben Tuikov <luben.tuikov@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>

Traditionally, this attribute would go between the [] and =, but that is
a nit. Can someone please pick this up to unblock our builds on -next?

Reviewed-by: Nathan Chancellor <nathan@kernel.org>

> ---
>  drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c b/drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c
> index 3648994724c2..cba087e529c0 100644
> --- a/drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c
> +++ b/drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c
> @@ -701,6 +701,7 @@ static void mmhub_v1_8_reset_ras_error_count(struct amdgpu_device *adev)
>  		mmhub_v1_8_inst_reset_ras_error_count(adev, i);
>  }
>  
> +__maybe_unused
>  static const uint32_t mmhub_v1_8_mmea_err_status_reg[] = {
>  	regMMEA0_ERR_STATUS,
>  	regMMEA1_ERR_STATUS,
> -- 
> 2.25.1
> 

WARNING: multiple messages have this Message-ID (diff)
From: Nathan Chancellor <nathan@kernel.org>
To: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Luben Tuikov" <luben.tuikov@amd.com>,
	"Lijo Lazar" <lijo.lazar@amd.com>,
	amd-gfx@lists.freedesktop.org, llvm@lists.linux.dev
Subject: Re: [PATCH] drm/amdgpu: Mark mmhub_v1_8_mmea_err_status_reg as __maybe_unused
Date: Thu, 25 May 2023 08:22:47 -0700	[thread overview]
Message-ID: <20230525152247.GA187374@dev-arch.thelio-3990X> (raw)
In-Reply-To: <20230519124438.365184-1-srinivasan.shanmugam@amd.com>

On Fri, May 19, 2023 at 06:14:38PM +0530, Srinivasan Shanmugam wrote:
> Silencing the compiler from below compilation error:
> 
> drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c:704:23: error: variable 'mmhub_v1_8_mmea_err_status_reg' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration]
> static const uint32_t mmhub_v1_8_mmea_err_status_reg[] = {
>                       ^
> 1 error generated.
> 
> Mark the variable as __maybe_unused to make it clear to clang that this
> is expected, so there is no more warning.
> 
> Cc: Christian König <christian.koenig@amd.com>
> Cc: Lijo Lazar <lijo.lazar@amd.com>
> Cc: Luben Tuikov <luben.tuikov@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>

Traditionally, this attribute would go between the [] and =, but that is
a nit. Can someone please pick this up to unblock our builds on -next?

Reviewed-by: Nathan Chancellor <nathan@kernel.org>

> ---
>  drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c b/drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c
> index 3648994724c2..cba087e529c0 100644
> --- a/drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c
> +++ b/drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c
> @@ -701,6 +701,7 @@ static void mmhub_v1_8_reset_ras_error_count(struct amdgpu_device *adev)
>  		mmhub_v1_8_inst_reset_ras_error_count(adev, i);
>  }
>  
> +__maybe_unused
>  static const uint32_t mmhub_v1_8_mmea_err_status_reg[] = {
>  	regMMEA0_ERR_STATUS,
>  	regMMEA1_ERR_STATUS,
> -- 
> 2.25.1
> 

  reply	other threads:[~2023-05-25 15:22 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-19 12:44 [PATCH] drm/amdgpu: Mark mmhub_v1_8_mmea_err_status_reg as __maybe_unused Srinivasan Shanmugam
2023-05-25 15:22 ` Nathan Chancellor [this message]
2023-05-25 15:22   ` Nathan Chancellor
2023-05-25 16:26   ` Luben Tuikov
2023-05-25 16:26     ` Luben Tuikov
2023-05-25 16:29     ` Nathan Chancellor
2023-05-25 16:29       ` Nathan Chancellor
2023-05-25 16:42       ` Alex Deucher
2023-05-25 16:42         ` Alex Deucher
2023-05-25 16:59         ` Nathan Chancellor
2023-05-25 16:59           ` Nathan Chancellor
2023-05-25 17:09         ` Nick Desaulniers
2023-05-25 17:09           ` Nick Desaulniers
2023-05-25 16:45       ` Luben Tuikov
2023-05-25 16:45         ` Luben Tuikov
2023-05-25 17:00         ` Nathan Chancellor
2023-05-25 17:00           ` Nathan Chancellor

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=20230525152247.GA187374@dev-arch.thelio-3990X \
    --to=nathan@kernel.org \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=lijo.lazar@amd.com \
    --cc=llvm@lists.linux.dev \
    --cc=luben.tuikov@amd.com \
    --cc=srinivasan.shanmugam@amd.com \
    /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.