All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Deucher <alexdeucher@gmail.com>
To: "Maíra Canal" <maira.canal@usp.br>
Cc: "Deucher, Alexander" <alexander.deucher@amd.com>,
	Christian Koenig <christian.koenig@amd.com>,
	xinhui pan <Xinhui.Pan@amd.com>,
	Hawking Zhang <Hawking.Zhang@amd.com>,
	John Clements <john.clements@amd.com>,
	Tao Zhou <tao.zhou1@amd.com>,
	"Chai, Thomas" <YiPeng.Chai@amd.com>,
	"Tuikov, Luben" <luben.tuikov@amd.com>,
	"Stanley.Yang" <Stanley.Yang@amd.com>,
	Dennis Li <Dennis.Li@amd.com>,
	"Joshi, Mukul" <mukul.joshi@amd.com>,
	"Wentland, Harry" <harry.wentland@amd.com>,
	"Leo (Sunpeng) Li" <sunpeng.li@amd.com>,
	"Siqueira, Rodrigo" <Rodrigo.Siqueira@amd.com>,
	Anthony Koo <Anthony.Koo@amd.com>,
	Magali Lemes <magalilemes00@gmail.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Maling list - DRI developers  <dri-devel@lists.freedesktop.org>,
	mwen@igalia.com, amd-gfx list <amd-gfx@lists.freedesktop.org>,
	Isabella Basso <isabbasso@riseup.net>
Subject: Re: [PATCH 02/10] drm/amdgpu: Remove tmp unused variable
Date: Tue, 22 Feb 2022 11:29:14 -0500	[thread overview]
Message-ID: <CADnq5_Nj1f+6mhd-w9XC62vuvA8Ndep9dV=AQED4v7D6YjzH4w@mail.gmail.com> (raw)
In-Reply-To: <20220222131701.356117-3-maira.canal@usp.br>

On Tue, Feb 22, 2022 at 8:17 AM Maíra Canal <maira.canal@usp.br> wrote:
>
> The variable tmp is not used in the dce_v6_0_hpd_fini and
> dce_v8_0_hpd_fini functions. Therefor, the variable is removed in order to
> avoid the following Clang warnings:
>
> drivers/gpu/drm/amd/amdgpu/dce_v6_0.c:331:6: warning: variable 'tmp' set but
> not used [-Wunused-but-set-variable]
>     u32 tmp;
>         ^
> drivers/gpu/drm/amd/amdgpu/dce_v8_0.c:325:6: warning: variable 'tmp' set but
> not used [-Wunused-but-set-variable]
>     u32 tmp;
>         ^
>
> Signed-off-by: Maíra Canal <maira.canal@usp.br>
> ---
>  drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 4 +---
>  drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 4 +---
>  2 files changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
> index b90bc2adf778..2c61f0c2e709 100644
> --- a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
> @@ -328,7 +328,6 @@ static void dce_v6_0_hpd_fini(struct amdgpu_device *adev)
>         struct drm_device *dev = adev_to_drm(adev);
>         struct drm_connector *connector;
>         struct drm_connector_list_iter iter;
> -       u32 tmp;
>
>         drm_connector_list_iter_begin(dev, &iter);
>         drm_for_each_connector_iter(connector, &iter) {
> @@ -337,8 +336,7 @@ static void dce_v6_0_hpd_fini(struct amdgpu_device *adev)
>                 if (amdgpu_connector->hpd.hpd >= adev->mode_info.num_hpd)
>                         continue;
>
> -               tmp = RREG32(mmDC_HPD1_CONTROL + hpd_offsets[amdgpu_connector->hpd.hpd]);
> -               tmp &= ~DC_HPD1_CONTROL__DC_HPD1_EN_MASK;
> +               RREG32(mmDC_HPD1_CONTROL + hpd_offsets[amdgpu_connector->hpd.hpd]);
>                 WREG32(mmDC_HPD1_CONTROL + hpd_offsets[amdgpu_connector->hpd.hpd], 0);

We should be writing tmp out here rather than 0.

>
>                 amdgpu_irq_put(adev, &adev->hpd_irq, amdgpu_connector->hpd.hpd);
> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
> index 7c1379b02f94..c5e9c5dbd165 100644
> --- a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
> @@ -322,7 +322,6 @@ static void dce_v8_0_hpd_fini(struct amdgpu_device *adev)
>         struct drm_device *dev = adev_to_drm(adev);
>         struct drm_connector *connector;
>         struct drm_connector_list_iter iter;
> -       u32 tmp;
>
>         drm_connector_list_iter_begin(dev, &iter);
>         drm_for_each_connector_iter(connector, &iter) {
> @@ -331,8 +330,7 @@ static void dce_v8_0_hpd_fini(struct amdgpu_device *adev)
>                 if (amdgpu_connector->hpd.hpd >= adev->mode_info.num_hpd)
>                         continue;
>
> -               tmp = RREG32(mmDC_HPD1_CONTROL + hpd_offsets[amdgpu_connector->hpd.hpd]);
> -               tmp &= ~DC_HPD1_CONTROL__DC_HPD1_EN_MASK;
> +               RREG32(mmDC_HPD1_CONTROL + hpd_offsets[amdgpu_connector->hpd.hpd]);
>                 WREG32(mmDC_HPD1_CONTROL + hpd_offsets[amdgpu_connector->hpd.hpd], 0);

Same here.  Care to send a patch to fix this up?

Thanks,

Alex

>
>                 amdgpu_irq_put(adev, &adev->hpd_irq, amdgpu_connector->hpd.hpd);
> --
> 2.35.1
>

WARNING: multiple messages have this Message-ID (diff)
From: Alex Deucher <alexdeucher@gmail.com>
To: "Maíra Canal" <maira.canal@usp.br>
Cc: "Tuikov, Luben" <luben.tuikov@amd.com>,
	Tao Zhou <tao.zhou1@amd.com>, Anthony Koo <Anthony.Koo@amd.com>,
	"Joshi, Mukul" <mukul.joshi@amd.com>,
	"Leo \(Sunpeng\) Li" <sunpeng.li@amd.com>,
	xinhui pan <Xinhui.Pan@amd.com>,
	"Siqueira, Rodrigo" <Rodrigo.Siqueira@amd.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Maling list - DRI developers <dri-devel@lists.freedesktop.org>,
	mwen@igalia.com, "Chai, Thomas" <YiPeng.Chai@amd.com>,
	"Stanley.Yang" <Stanley.Yang@amd.com>,
	amd-gfx list <amd-gfx@lists.freedesktop.org>,
	Magali Lemes <magalilemes00@gmail.com>,
	"Deucher, Alexander" <alexander.deucher@amd.com>,
	Isabella Basso <isabbasso@riseup.net>,
	John Clements <john.clements@amd.com>,
	Christian Koenig <christian.koenig@amd.com>,
	Dennis Li <Dennis.Li@amd.com>,
	Hawking Zhang <Hawking.Zhang@amd.com>
Subject: Re: [PATCH 02/10] drm/amdgpu: Remove tmp unused variable
Date: Tue, 22 Feb 2022 11:29:14 -0500	[thread overview]
Message-ID: <CADnq5_Nj1f+6mhd-w9XC62vuvA8Ndep9dV=AQED4v7D6YjzH4w@mail.gmail.com> (raw)
In-Reply-To: <20220222131701.356117-3-maira.canal@usp.br>

On Tue, Feb 22, 2022 at 8:17 AM Maíra Canal <maira.canal@usp.br> wrote:
>
> The variable tmp is not used in the dce_v6_0_hpd_fini and
> dce_v8_0_hpd_fini functions. Therefor, the variable is removed in order to
> avoid the following Clang warnings:
>
> drivers/gpu/drm/amd/amdgpu/dce_v6_0.c:331:6: warning: variable 'tmp' set but
> not used [-Wunused-but-set-variable]
>     u32 tmp;
>         ^
> drivers/gpu/drm/amd/amdgpu/dce_v8_0.c:325:6: warning: variable 'tmp' set but
> not used [-Wunused-but-set-variable]
>     u32 tmp;
>         ^
>
> Signed-off-by: Maíra Canal <maira.canal@usp.br>
> ---
>  drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 4 +---
>  drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 4 +---
>  2 files changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
> index b90bc2adf778..2c61f0c2e709 100644
> --- a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
> @@ -328,7 +328,6 @@ static void dce_v6_0_hpd_fini(struct amdgpu_device *adev)
>         struct drm_device *dev = adev_to_drm(adev);
>         struct drm_connector *connector;
>         struct drm_connector_list_iter iter;
> -       u32 tmp;
>
>         drm_connector_list_iter_begin(dev, &iter);
>         drm_for_each_connector_iter(connector, &iter) {
> @@ -337,8 +336,7 @@ static void dce_v6_0_hpd_fini(struct amdgpu_device *adev)
>                 if (amdgpu_connector->hpd.hpd >= adev->mode_info.num_hpd)
>                         continue;
>
> -               tmp = RREG32(mmDC_HPD1_CONTROL + hpd_offsets[amdgpu_connector->hpd.hpd]);
> -               tmp &= ~DC_HPD1_CONTROL__DC_HPD1_EN_MASK;
> +               RREG32(mmDC_HPD1_CONTROL + hpd_offsets[amdgpu_connector->hpd.hpd]);
>                 WREG32(mmDC_HPD1_CONTROL + hpd_offsets[amdgpu_connector->hpd.hpd], 0);

We should be writing tmp out here rather than 0.

>
>                 amdgpu_irq_put(adev, &adev->hpd_irq, amdgpu_connector->hpd.hpd);
> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
> index 7c1379b02f94..c5e9c5dbd165 100644
> --- a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
> @@ -322,7 +322,6 @@ static void dce_v8_0_hpd_fini(struct amdgpu_device *adev)
>         struct drm_device *dev = adev_to_drm(adev);
>         struct drm_connector *connector;
>         struct drm_connector_list_iter iter;
> -       u32 tmp;
>
>         drm_connector_list_iter_begin(dev, &iter);
>         drm_for_each_connector_iter(connector, &iter) {
> @@ -331,8 +330,7 @@ static void dce_v8_0_hpd_fini(struct amdgpu_device *adev)
>                 if (amdgpu_connector->hpd.hpd >= adev->mode_info.num_hpd)
>                         continue;
>
> -               tmp = RREG32(mmDC_HPD1_CONTROL + hpd_offsets[amdgpu_connector->hpd.hpd]);
> -               tmp &= ~DC_HPD1_CONTROL__DC_HPD1_EN_MASK;
> +               RREG32(mmDC_HPD1_CONTROL + hpd_offsets[amdgpu_connector->hpd.hpd]);
>                 WREG32(mmDC_HPD1_CONTROL + hpd_offsets[amdgpu_connector->hpd.hpd], 0);

Same here.  Care to send a patch to fix this up?

Thanks,

Alex

>
>                 amdgpu_irq_put(adev, &adev->hpd_irq, amdgpu_connector->hpd.hpd);
> --
> 2.35.1
>

WARNING: multiple messages have this Message-ID (diff)
From: Alex Deucher <alexdeucher@gmail.com>
To: "Maíra Canal" <maira.canal@usp.br>
Cc: "Tuikov, Luben" <luben.tuikov@amd.com>,
	Tao Zhou <tao.zhou1@amd.com>, Anthony Koo <Anthony.Koo@amd.com>,
	"Joshi, Mukul" <mukul.joshi@amd.com>,
	"Leo \(Sunpeng\) Li" <sunpeng.li@amd.com>,
	"Wentland, Harry" <harry.wentland@amd.com>,
	xinhui pan <Xinhui.Pan@amd.com>,
	"Siqueira, Rodrigo" <Rodrigo.Siqueira@amd.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Maling list - DRI developers <dri-devel@lists.freedesktop.org>,
	mwen@igalia.com, "Chai, Thomas" <YiPeng.Chai@amd.com>,
	"Stanley.Yang" <Stanley.Yang@amd.com>,
	amd-gfx list <amd-gfx@lists.freedesktop.org>,
	Magali Lemes <magalilemes00@gmail.com>,
	"Deucher, Alexander" <alexander.deucher@amd.com>,
	Isabella Basso <isabbasso@riseup.net>,
	John Clements <john.clements@amd.com>,
	Christian Koenig <christian.koenig@amd.com>,
	Dennis Li <Dennis.Li@amd.com>,
	Hawking Zhang <Hawking.Zhang@amd.com>
Subject: Re: [PATCH 02/10] drm/amdgpu: Remove tmp unused variable
Date: Tue, 22 Feb 2022 11:29:14 -0500	[thread overview]
Message-ID: <CADnq5_Nj1f+6mhd-w9XC62vuvA8Ndep9dV=AQED4v7D6YjzH4w@mail.gmail.com> (raw)
In-Reply-To: <20220222131701.356117-3-maira.canal@usp.br>

On Tue, Feb 22, 2022 at 8:17 AM Maíra Canal <maira.canal@usp.br> wrote:
>
> The variable tmp is not used in the dce_v6_0_hpd_fini and
> dce_v8_0_hpd_fini functions. Therefor, the variable is removed in order to
> avoid the following Clang warnings:
>
> drivers/gpu/drm/amd/amdgpu/dce_v6_0.c:331:6: warning: variable 'tmp' set but
> not used [-Wunused-but-set-variable]
>     u32 tmp;
>         ^
> drivers/gpu/drm/amd/amdgpu/dce_v8_0.c:325:6: warning: variable 'tmp' set but
> not used [-Wunused-but-set-variable]
>     u32 tmp;
>         ^
>
> Signed-off-by: Maíra Canal <maira.canal@usp.br>
> ---
>  drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 4 +---
>  drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 4 +---
>  2 files changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
> index b90bc2adf778..2c61f0c2e709 100644
> --- a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c
> @@ -328,7 +328,6 @@ static void dce_v6_0_hpd_fini(struct amdgpu_device *adev)
>         struct drm_device *dev = adev_to_drm(adev);
>         struct drm_connector *connector;
>         struct drm_connector_list_iter iter;
> -       u32 tmp;
>
>         drm_connector_list_iter_begin(dev, &iter);
>         drm_for_each_connector_iter(connector, &iter) {
> @@ -337,8 +336,7 @@ static void dce_v6_0_hpd_fini(struct amdgpu_device *adev)
>                 if (amdgpu_connector->hpd.hpd >= adev->mode_info.num_hpd)
>                         continue;
>
> -               tmp = RREG32(mmDC_HPD1_CONTROL + hpd_offsets[amdgpu_connector->hpd.hpd]);
> -               tmp &= ~DC_HPD1_CONTROL__DC_HPD1_EN_MASK;
> +               RREG32(mmDC_HPD1_CONTROL + hpd_offsets[amdgpu_connector->hpd.hpd]);
>                 WREG32(mmDC_HPD1_CONTROL + hpd_offsets[amdgpu_connector->hpd.hpd], 0);

We should be writing tmp out here rather than 0.

>
>                 amdgpu_irq_put(adev, &adev->hpd_irq, amdgpu_connector->hpd.hpd);
> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
> index 7c1379b02f94..c5e9c5dbd165 100644
> --- a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
> @@ -322,7 +322,6 @@ static void dce_v8_0_hpd_fini(struct amdgpu_device *adev)
>         struct drm_device *dev = adev_to_drm(adev);
>         struct drm_connector *connector;
>         struct drm_connector_list_iter iter;
> -       u32 tmp;
>
>         drm_connector_list_iter_begin(dev, &iter);
>         drm_for_each_connector_iter(connector, &iter) {
> @@ -331,8 +330,7 @@ static void dce_v8_0_hpd_fini(struct amdgpu_device *adev)
>                 if (amdgpu_connector->hpd.hpd >= adev->mode_info.num_hpd)
>                         continue;
>
> -               tmp = RREG32(mmDC_HPD1_CONTROL + hpd_offsets[amdgpu_connector->hpd.hpd]);
> -               tmp &= ~DC_HPD1_CONTROL__DC_HPD1_EN_MASK;
> +               RREG32(mmDC_HPD1_CONTROL + hpd_offsets[amdgpu_connector->hpd.hpd]);
>                 WREG32(mmDC_HPD1_CONTROL + hpd_offsets[amdgpu_connector->hpd.hpd], 0);

Same here.  Care to send a patch to fix this up?

Thanks,

Alex

>
>                 amdgpu_irq_put(adev, &adev->hpd_irq, amdgpu_connector->hpd.hpd);
> --
> 2.35.1
>

  reply	other threads:[~2022-02-22 16:29 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-22 13:16 [PATCH 00/10] Fix multiple compilation warnings Maíra Canal
2022-02-22 13:16 ` Maíra Canal
2022-02-22 13:16 ` [PATCH 01/10] drm/amdgpu: Change amdgpu_ras_block_late_init_default function scope Maíra Canal
2022-02-22 13:16   ` Maíra Canal
2022-02-22 16:27   ` Alex Deucher
2022-02-22 16:27     ` Alex Deucher
2022-02-22 16:27     ` Alex Deucher
2022-02-22 13:16 ` [PATCH 02/10] drm/amdgpu: Remove tmp unused variable Maíra Canal
2022-02-22 13:16   ` Maíra Canal
2022-02-22 16:29   ` Alex Deucher [this message]
2022-02-22 16:29     ` Alex Deucher
2022-02-22 16:29     ` Alex Deucher
2022-02-22 13:16 ` [PATCH 03/10] drm/amdgpu: Remove unused get_umc_v8_7_channel_index function Maíra Canal
2022-02-22 13:16   ` Maíra Canal
2022-02-22 16:29   ` Alex Deucher
2022-02-22 16:29     ` Alex Deucher
2022-02-22 16:29     ` Alex Deucher
2022-02-22 13:16 ` [PATCH 04/10] drm/amd/display: Remove unused temp variable Maíra Canal
2022-02-22 13:16   ` Maíra Canal
2022-02-22 16:31   ` Alex Deucher
2022-02-22 16:31     ` Alex Deucher
2022-02-22 16:31     ` Alex Deucher
2022-02-22 13:16 ` [PATCH 05/10] drm/amd/display: Remove unused dcn316_smu_set_voltage_via_phyclk function Maíra Canal
2022-02-22 13:16   ` Maíra Canal
2022-02-22 16:32   ` Alex Deucher
2022-02-22 16:32     ` Alex Deucher
2022-02-22 16:32     ` Alex Deucher
2022-02-22 13:16 ` [PATCH 06/10] drm/amd/display: Remove vupdate_int_entry definition Maíra Canal
2022-02-22 13:16   ` Maíra Canal
2022-02-22 16:38   ` Alex Deucher
2022-02-22 16:38     ` Alex Deucher
2022-02-22 16:38     ` Alex Deucher
2022-02-22 13:16 ` [PATCH 07/10] drm/amd/display: Remove unused dmub_outbox_irq_info_funcs variable Maíra Canal
2022-02-22 13:16   ` Maíra Canal
2022-02-22 16:38   ` Alex Deucher
2022-02-22 16:38     ` Alex Deucher
2022-02-22 16:38     ` Alex Deucher
2022-02-22 13:16 ` [PATCH 08/10] drm/amd/display: Remove unused variable Maíra Canal
2022-02-22 13:16   ` Maíra Canal
2022-02-22 16:40   ` Alex Deucher
2022-02-22 16:40     ` Alex Deucher
2022-02-22 16:40     ` Alex Deucher
2022-02-22 13:17 ` [PATCH 09/10] drm/amd/display: Add missing prototypes to dcn201_init Maíra Canal
2022-02-22 13:17   ` Maíra Canal
2022-02-22 16:41   ` Alex Deucher
2022-02-22 16:41     ` Alex Deucher
2022-02-22 16:41     ` Alex Deucher
2022-02-22 13:17 ` [PATCH 10/10] drm/amd/display: Turn global functions into static functions Maíra Canal
2022-02-22 13:17   ` Maíra Canal
2022-02-22 16:45   ` Alex Deucher
2022-02-22 16:45     ` Alex Deucher
2022-02-22 16:45     ` Alex Deucher

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='CADnq5_Nj1f+6mhd-w9XC62vuvA8Ndep9dV=AQED4v7D6YjzH4w@mail.gmail.com' \
    --to=alexdeucher@gmail.com \
    --cc=Anthony.Koo@amd.com \
    --cc=Dennis.Li@amd.com \
    --cc=Hawking.Zhang@amd.com \
    --cc=Rodrigo.Siqueira@amd.com \
    --cc=Stanley.Yang@amd.com \
    --cc=Xinhui.Pan@amd.com \
    --cc=YiPeng.Chai@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=harry.wentland@amd.com \
    --cc=isabbasso@riseup.net \
    --cc=john.clements@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luben.tuikov@amd.com \
    --cc=magalilemes00@gmail.com \
    --cc=maira.canal@usp.br \
    --cc=mukul.joshi@amd.com \
    --cc=mwen@igalia.com \
    --cc=sunpeng.li@amd.com \
    --cc=tao.zhou1@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.