2020-11-02 09:24:01

by Zou Wei

[permalink] [raw]
Subject: [PATCH -next] drm/panfrost: Fix unused variable warning

Fixes the following W=1 kernel build warning:

./panfrost_job.c:617:28: warning: unused variable ‘js’ [-Wunused-variable]
struct panfrost_job_slot *js = pfdev->js;
^~

Reported-by: Hulk Robot <[email protected]>
Signed-off-by: Zou Wei <[email protected]>
---
drivers/gpu/drm/panfrost/panfrost_job.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/panfrost/panfrost_job.c b/drivers/gpu/drm/panfrost/panfrost_job.c
index 4902bc6..e75b7d2 100644
--- a/drivers/gpu/drm/panfrost/panfrost_job.c
+++ b/drivers/gpu/drm/panfrost/panfrost_job.c
@@ -613,8 +613,6 @@ int panfrost_job_open(struct panfrost_file_priv *panfrost_priv)

void panfrost_job_close(struct panfrost_file_priv *panfrost_priv)
{
- struct panfrost_device *pfdev = panfrost_priv->pfdev;
- struct panfrost_job_slot *js = pfdev->js;
int i;

for (i = 0; i < NUM_JOB_SLOTS; i++)
--
2.6.2


2020-11-02 09:31:53

by Steven Price

[permalink] [raw]
Subject: Re: [PATCH -next] drm/panfrost: Fix unused variable warning

On 02/11/2020 09:33, Zou Wei wrote:
> Fixes the following W=1 kernel build warning:
>
> ./panfrost_job.c:617:28: warning: unused variable ‘js’ [-Wunused-variable]
> struct panfrost_job_slot *js = pfdev->js;
> ^~
>
> Reported-by: Hulk Robot <[email protected]>
> Signed-off-by: Zou Wei <[email protected]>

Boris posted an identical patch earlier:

https://lore.kernel.org/r/20201101173817.831769-1-boris.brezillon%40collabora.com

Steve

> ---
> drivers/gpu/drm/panfrost/panfrost_job.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/panfrost/panfrost_job.c b/drivers/gpu/drm/panfrost/panfrost_job.c
> index 4902bc6..e75b7d2 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_job.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_job.c
> @@ -613,8 +613,6 @@ int panfrost_job_open(struct panfrost_file_priv *panfrost_priv)
>
> void panfrost_job_close(struct panfrost_file_priv *panfrost_priv)
> {
> - struct panfrost_device *pfdev = panfrost_priv->pfdev;
> - struct panfrost_job_slot *js = pfdev->js;
> int i;
>
> for (i = 0; i < NUM_JOB_SLOTS; i++)
>

2020-11-02 11:57:07

by Zou Wei

[permalink] [raw]
Subject: 答复: [PATCH -next] drm/panfrost: Fix unuse d variable warning

Hi Steve,
Sorry, I didn't notice the patch earlier.
Please ignore my patch.

-----邮件原件-----
发件人: Steven Price [mailto:[email protected]]
发送时间: 2020年11月2日 17:29
收件人: Zouwei (Samuel) <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
抄送: [email protected]; [email protected]
主题: Re: [PATCH -next] drm/panfrost: Fix unused variable warning

On 02/11/2020 09:33, Zou Wei wrote:
> Fixes the following W=1 kernel build warning:
>
> ./panfrost_job.c:617:28: warning: unused variable ‘js’ [-Wunused-variable]
> struct panfrost_job_slot *js = pfdev->js;
> ^~
>
> Reported-by: Hulk Robot <[email protected]>
> Signed-off-by: Zou Wei <[email protected]>

Boris posted an identical patch earlier:

https://lore.kernel.org/r/20201101173817.831769-1-boris.brezillon%40collabora.com

Steve

> ---
> drivers/gpu/drm/panfrost/panfrost_job.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/panfrost/panfrost_job.c b/drivers/gpu/drm/panfrost/panfrost_job.c
> index 4902bc6..e75b7d2 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_job.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_job.c
> @@ -613,8 +613,6 @@ int panfrost_job_open(struct panfrost_file_priv *panfrost_priv)
>
> void panfrost_job_close(struct panfrost_file_priv *panfrost_priv)
> {
> - struct panfrost_device *pfdev = panfrost_priv->pfdev;
> - struct panfrost_job_slot *js = pfdev->js;
> int i;
>
> for (i = 0; i < NUM_JOB_SLOTS; i++)
>