From: yu kuai <yukuai3@huawei.com>
To: <alexander.deucher@amd.com>, <Felix.Kuehling@amd.com>,
<christian.koenig@amd.com>, <David1.Zhou@amd.com>,
<airlied@linux.ie>, <daniel@ffwll.ch>, <Rex.Zhu@amd.com>,
<evan.quan@amd.com>
Cc: <linux-kernel@vger.kernel.org>, <dri-devel@lists.freedesktop.org>,
<amd-gfx@lists.freedesktop.org>, <yukuai3@huawei.com>,
<zhengbin13@huawei.com>, <yi.zhang@huawei.com>
Subject: [PATCH 4/7] drm/amdgpu: remove set but not used variable 'invalid'
Date: Wed, 13 Nov 2019 20:44:31 +0800 [thread overview]
Message-ID: <1573649074-72589-5-git-send-email-yukuai3@huawei.com> (raw)
In-Reply-To: <1573649074-72589-1-git-send-email-yukuai3@huawei.com>
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c: In function
‘amdgpu_amdkfd_evict_userptr’:
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c:1665:6: warning:
variable ‘invalid’ set but not used [-Wunused-but-set-variable]
'invalid' is never used, so can be removed. Thus 'atomic_inc_return'
can be replaced as 'atomic_inc'
Fixes: 5ae0283e831a ("drm/amdgpu: Add userptr support for KFD")
Signed-off-by: yu kuai <yukuai3@huawei.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
index ae6f544..a1ed8a8e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
@@ -1662,10 +1662,10 @@ int amdgpu_amdkfd_evict_userptr(struct kgd_mem *mem,
struct mm_struct *mm)
{
struct amdkfd_process_info *process_info = mem->process_info;
- int invalid, evicted_bos;
+ int evicted_bos;
int r = 0;
- invalid = atomic_inc_return(&mem->invalid);
+ atomic_inc(&mem->invalid);
evicted_bos = atomic_inc_return(&process_info->evicted_bos);
if (evicted_bos == 1) {
/* First eviction, stop the queues */
--
2.7.4
WARNING: multiple messages have this Message-ID (diff)
From: yu kuai <yukuai3@huawei.com>
To: alexander.deucher@amd.com, Felix.Kuehling@amd.com,
christian.koenig@amd.com, David1.Zhou@amd.com, airlied@linux.ie,
daniel@ffwll.ch, Rex.Zhu@amd.com, evan.quan@amd.com
Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
amd-gfx@lists.freedesktop.org, yukuai3@huawei.com,
zhengbin13@huawei.com, yi.zhang@huawei.com
Subject: [PATCH 4/7] drm/amdgpu: remove set but not used variable 'invalid'
Date: Wed, 13 Nov 2019 20:44:31 +0800 [thread overview]
Message-ID: <1573649074-72589-5-git-send-email-yukuai3@huawei.com> (raw)
In-Reply-To: <1573649074-72589-1-git-send-email-yukuai3@huawei.com>
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c: In function
‘amdgpu_amdkfd_evict_userptr’:
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c:1665:6: warning:
variable ‘invalid’ set but not used [-Wunused-but-set-variable]
'invalid' is never used, so can be removed. Thus 'atomic_inc_return'
can be replaced as 'atomic_inc'
Fixes: 5ae0283e831a ("drm/amdgpu: Add userptr support for KFD")
Signed-off-by: yu kuai <yukuai3@huawei.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
index ae6f544..a1ed8a8e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
@@ -1662,10 +1662,10 @@ int amdgpu_amdkfd_evict_userptr(struct kgd_mem *mem,
struct mm_struct *mm)
{
struct amdkfd_process_info *process_info = mem->process_info;
- int invalid, evicted_bos;
+ int evicted_bos;
int r = 0;
- invalid = atomic_inc_return(&mem->invalid);
+ atomic_inc(&mem->invalid);
evicted_bos = atomic_inc_return(&process_info->evicted_bos);
if (evicted_bos == 1) {
/* First eviction, stop the queues */
--
2.7.4
WARNING: multiple messages have this Message-ID (diff)
From: yu kuai <yukuai3@huawei.com>
To: <alexander.deucher@amd.com>, <Felix.Kuehling@amd.com>,
<christian.koenig@amd.com>, <David1.Zhou@amd.com>,
<airlied@linux.ie>, <daniel@ffwll.ch>, <Rex.Zhu@amd.com>,
<evan.quan@amd.com>
Cc: yi.zhang@huawei.com, linux-kernel@vger.kernel.org,
amd-gfx@lists.freedesktop.org, zhengbin13@huawei.com,
dri-devel@lists.freedesktop.org, yukuai3@huawei.com
Subject: [PATCH 4/7] drm/amdgpu: remove set but not used variable 'invalid'
Date: Wed, 13 Nov 2019 20:44:31 +0800 [thread overview]
Message-ID: <1573649074-72589-5-git-send-email-yukuai3@huawei.com> (raw)
Message-ID: <20191113124431.kM29O9DfKA8cyirg5EAe-xcZl_fy22V4Pgx0-a_j3bk@z> (raw)
In-Reply-To: <1573649074-72589-1-git-send-email-yukuai3@huawei.com>
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c: In function
‘amdgpu_amdkfd_evict_userptr’:
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c:1665:6: warning:
variable ‘invalid’ set but not used [-Wunused-but-set-variable]
'invalid' is never used, so can be removed. Thus 'atomic_inc_return'
can be replaced as 'atomic_inc'
Fixes: 5ae0283e831a ("drm/amdgpu: Add userptr support for KFD")
Signed-off-by: yu kuai <yukuai3@huawei.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
index ae6f544..a1ed8a8e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
@@ -1662,10 +1662,10 @@ int amdgpu_amdkfd_evict_userptr(struct kgd_mem *mem,
struct mm_struct *mm)
{
struct amdkfd_process_info *process_info = mem->process_info;
- int invalid, evicted_bos;
+ int evicted_bos;
int r = 0;
- invalid = atomic_inc_return(&mem->invalid);
+ atomic_inc(&mem->invalid);
evicted_bos = atomic_inc_return(&process_info->evicted_bos);
if (evicted_bos == 1) {
/* First eviction, stop the queues */
--
2.7.4
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
WARNING: multiple messages have this Message-ID (diff)
From: yu kuai <yukuai3@huawei.com>
To: <alexander.deucher@amd.com>, <Felix.Kuehling@amd.com>,
<christian.koenig@amd.com>, <David1.Zhou@amd.com>,
<airlied@linux.ie>, <daniel@ffwll.ch>, <Rex.Zhu@amd.com>,
<evan.quan@amd.com>
Cc: yi.zhang@huawei.com, linux-kernel@vger.kernel.org,
amd-gfx@lists.freedesktop.org, zhengbin13@huawei.com,
dri-devel@lists.freedesktop.org, yukuai3@huawei.com
Subject: [PATCH 4/7] drm/amdgpu: remove set but not used variable 'invalid'
Date: Wed, 13 Nov 2019 20:44:31 +0800 [thread overview]
Message-ID: <1573649074-72589-5-git-send-email-yukuai3@huawei.com> (raw)
Message-ID: <20191113124431.bMNTBniPgsg7lPSydHGNUS_uvBbHkbcxBGb6DWCA7sk@z> (raw)
In-Reply-To: <1573649074-72589-1-git-send-email-yukuai3@huawei.com>
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c: In function
‘amdgpu_amdkfd_evict_userptr’:
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c:1665:6: warning:
variable ‘invalid’ set but not used [-Wunused-but-set-variable]
'invalid' is never used, so can be removed. Thus 'atomic_inc_return'
can be replaced as 'atomic_inc'
Fixes: 5ae0283e831a ("drm/amdgpu: Add userptr support for KFD")
Signed-off-by: yu kuai <yukuai3@huawei.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
index ae6f544..a1ed8a8e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
@@ -1662,10 +1662,10 @@ int amdgpu_amdkfd_evict_userptr(struct kgd_mem *mem,
struct mm_struct *mm)
{
struct amdkfd_process_info *process_info = mem->process_info;
- int invalid, evicted_bos;
+ int evicted_bos;
int r = 0;
- invalid = atomic_inc_return(&mem->invalid);
+ atomic_inc(&mem->invalid);
evicted_bos = atomic_inc_return(&process_info->evicted_bos);
if (evicted_bos == 1) {
/* First eviction, stop the queues */
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2019-11-13 12:37 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-13 12:44 [PATCH 0/7] various '-Wunused-but-set-variable' gcc warning fixes yu kuai
2019-11-13 12:44 ` yu kuai
2019-11-13 12:44 ` yu kuai
2019-11-13 12:44 ` yu kuai
2019-11-13 12:44 ` [PATCH 1/7] drm/amdgpu: remove set but not used variable 'mc_shared_chmap' from 'gfx_v6_0.c' and 'gfx_v7_0.c' yu kuai
2019-11-13 12:44 ` yu kuai
2019-11-13 12:44 ` yu kuai
2019-11-13 12:44 ` yu kuai
2019-11-13 16:55 ` Joe Perches
2019-11-13 16:55 ` Joe Perches
2019-11-13 16:55 ` Joe Perches
2019-11-13 19:22 ` Alex Deucher
2019-11-13 19:22 ` Alex Deucher
2019-11-13 19:22 ` Alex Deucher
2019-11-13 19:22 ` Alex Deucher
2019-11-13 12:44 ` [PATCH 2/7] drm/amdgpu: remove set but not used variable 'amdgpu_connector' yu kuai
2019-11-13 12:44 ` yu kuai
2019-11-13 12:44 ` yu kuai
2019-11-13 12:44 ` yu kuai
2019-11-13 12:44 ` [PATCH 3/7] drm/amdgpu: remove set but not used variable 'count' yu kuai
2019-11-13 12:44 ` yu kuai
2019-11-13 12:44 ` yu kuai
2019-11-13 12:44 ` yu kuai
2019-11-13 12:44 ` yu kuai [this message]
2019-11-13 12:44 ` [PATCH 4/7] drm/amdgpu: remove set but not used variable 'invalid' yu kuai
2019-11-13 12:44 ` yu kuai
2019-11-13 12:44 ` yu kuai
2019-11-13 12:44 ` [PATCH 5/7] drm/amd/powerplay: remove set but not used variable 'threshold' yu kuai
2019-11-13 12:44 ` yu kuai
2019-11-13 12:44 ` yu kuai
2019-11-13 12:44 ` yu kuai
2019-11-13 12:44 ` [PATCH 6/7] drm/amd/powerplay: remove set but not used variable 'state' yu kuai
2019-11-13 12:44 ` yu kuai
2019-11-13 12:44 ` yu kuai
2019-11-13 12:44 ` yu kuai
2019-11-13 12:44 ` [PATCH 7/7] drm/amd/powerplay: remove set but not used variable 'us_mvdd' yu kuai
2019-11-13 12:44 ` yu kuai
2019-11-13 12:44 ` yu kuai
2019-11-13 12:44 ` yu kuai
2019-11-13 15:24 ` [PATCH 0/7] various '-Wunused-but-set-variable' gcc warning fixes Alex Deucher
2019-11-13 15:24 ` Alex Deucher
2019-11-13 15:24 ` Alex Deucher
2019-11-13 15:24 ` 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=1573649074-72589-5-git-send-email-yukuai3@huawei.com \
--to=yukuai3@huawei.com \
--cc=David1.Zhou@amd.com \
--cc=Felix.Kuehling@amd.com \
--cc=Rex.Zhu@amd.com \
--cc=airlied@linux.ie \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=evan.quan@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=yi.zhang@huawei.com \
--cc=zhengbin13@huawei.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.