Re: [RFC PATCH 6/6 6.6] libfs: fix infinite directory reads for offset dir

2024-11-16 Thread Yu Kuai
Hi, 在 2024/11/13 23:17, Chuck Lever 写道: On Mon, Nov 11, 2024 at 11:20:17PM +0800, yangerkun wrote: 在 2024/11/11 22:39, Chuck Lever III 写道: On Nov 10, 2024, at 9:36 PM, Yu Kuai wrote: I'm in the cc list ,so I assume you saw my set, then I don't know why you're ignoring

Re: [RFC PATCH 6/6 6.6] libfs: fix infinite directory reads for offset dir

2024-11-11 Thread Yu Kuai
Hi, 在 2024/11/11 8:52, c...@kernel.org 写道: From: yangerkun [ Upstream commit 64a7ce76fb901bf9f9c36cf5d681328fc0fd4b5a ] After we switch tmpfs dir operations from simple_dir_operations to simple_offset_dir_operations, every rename happened will fill new dentry to dest dir's maple tree(&SHMEM_I

Re: [PATCH 6.6 00/28] fix CVE-2024-46701

2024-11-11 Thread Yu Kuai
Hi, 在 2024/11/10 0:58, Chuck Lever III 写道: On Nov 8, 2024, at 8:30 PM, Yu Kuai wrote: Hi, 在 2024/11/08 21:23, Chuck Lever III 写道: On Nov 7, 2024, at 8:19 PM, Yu Kuai wrote: Hi, 在 2024/11/07 22:41, Chuck Lever 写道: On Thu, Nov 07, 2024 at 08:57:23AM +0800, Yu Kuai wrote: Hi, 在 2024

Re: [PATCH 6.6 00/28] fix CVE-2024-46701

2024-11-10 Thread Yu Kuai
Hi, 在 2024/11/09 1:03, Liam R. Howlett 写道: * Chuck Lever III [241108 08:23]: On Nov 7, 2024, at 8:19 PM, Yu Kuai wrote: Hi, 在 2024/11/07 22:41, Chuck Lever 写道: On Thu, Nov 07, 2024 at 08:57:23AM +0800, Yu Kuai wrote: Hi, 在 2024/11/06 23:19, Chuck Lever III 写道: On Nov 6, 2024, at

Re: [PATCH 6.6 00/28] fix CVE-2024-46701

2024-11-10 Thread Yu Kuai
Hi, 在 2024/11/08 21:23, Chuck Lever III 写道: On Nov 7, 2024, at 8:19 PM, Yu Kuai wrote: Hi, 在 2024/11/07 22:41, Chuck Lever 写道: On Thu, Nov 07, 2024 at 08:57:23AM +0800, Yu Kuai wrote: Hi, 在 2024/11/06 23:19, Chuck Lever III 写道: On Nov 6, 2024, at 1:16 AM, Greg KH wrote: On Thu

Re: [PATCH 6.6 00/28] fix CVE-2024-46701

2024-11-08 Thread Yu Kuai
Hi, 在 2024/11/07 22:41, Chuck Lever 写道: On Thu, Nov 07, 2024 at 08:57:23AM +0800, Yu Kuai wrote: Hi, 在 2024/11/06 23:19, Chuck Lever III 写道: On Nov 6, 2024, at 1:16 AM, Greg KH wrote: On Thu, Oct 24, 2024 at 09:19:41PM +0800, Yu Kuai wrote: From: Yu Kuai Fix patch is patch 27, relied

Re: [PATCH 6.6 00/28] fix CVE-2024-46701

2024-11-07 Thread Yu Kuai
to go research this for you, especially one you've 'addressed' in this totally bizarre fashion. On Thu, Oct 24, 2024 at 09:19:41PM +0800, Yu Kuai wrote: From: Yu Kuai Fix patch is patch 27, relied patches are from: - patches from set [1] to add helpers to maple_tree, the last p

Re: [PATCH 6.6 28/28] maple_tree: correct tree corruption on spanning store

2024-11-07 Thread Yu Kuai
Hi, 在 2024/11/06 23:02, Lorenzo Stoakes 写道: On Thu, Oct 24, 2024 at 09:22:25PM +0800, Yu Kuai wrote: diff --git a/lib/maple_tree.c b/lib/maple_tree.c index 5328e08723d7..c57b6fc4db2e 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -2239,6 +2239,8 @@ static inline void mas_node_or_none

Re: [PATCH 6.6 00/28] fix CVE-2024-46701

2024-11-07 Thread Yu Kuai
Hi, 在 2024/11/06 23:19, Chuck Lever III 写道: On Nov 6, 2024, at 1:16 AM, Greg KH wrote: On Thu, Oct 24, 2024 at 09:19:41PM +0800, Yu Kuai wrote: From: Yu Kuai Fix patch is patch 27, relied patches are from: I assume patch 27 is: libfs: fix infinite directory reads for offset dir

[PATCH 6.6 14/28] maple_tree: separate ma_state node from status

2024-10-25 Thread Yu Kuai
e.com: fix mas_prev() state separation code] Link: https://lkml.kernel.org/r/20231207193319.4025462-1-liam.howl...@oracle.com Link: https://lkml.kernel.org/r/20231101171629.3612299-9-liam.howl...@oracle.com Signed-off-by: Liam R. Howlett Cc: Peng Zhang Signed-off-by: Andrew Morton Signed-off-b

[PATCH 6.6 27/28] libfs: fix infinite directory reads for offset dir

2024-10-25 Thread Yu Kuai
5c5f ("shmem: stable directory offsets") Signed-off-by: yangerkun Link: https://lore.kernel.org/r/20240731043835.1828697-1-yanger...@huawei.com Reviewed-by: Chuck Lever [brauner: only update last_index after seek when offset is zero like Jan suggested] Signed-off-by:

[PATCH 6.6 01/28] maple_tree: add mt_free_one() and mt_attr() helpers

2024-10-25 Thread Yu Kuai
hael S. Tsirkin Cc: Mike Christie Cc: Nicholas Piggin Cc: Peter Zijlstra Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton Signed-off-by: Yu Kuai --- lib/maple_tree.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/maple_tree.c b/lib/maple_tree.c index 4

[PATCH 6.6 17/28] maple_tree: use maple state end for write operations

2024-10-25 Thread Yu Kuai
the end of the node and uses the maple state end instead. Link: https://lkml.kernel.org/r/20231101171629.3612299-11-liam.howl...@oracle.com Signed-off-by: Liam R. Howlett Cc: Peng Zhang Signed-off-by: Andrew Morton Signed-off-by: Yu Kuai --- include/linux/maple_tree.h | 1 - lib/ma

[PATCH 6.6 00/28] fix CVE-2024-46701

2024-10-25 Thread Yu Kuai
From: Yu Kuai Fix patch is patch 27, relied patches are from: - patches from set [1] to add helpers to maple_tree, the last patch to improve fork() performance is not backported; - patches from set [2] to change maple_tree, and follow up fixes; - patches from set [3] to convert offset_ctx

[PATCH 6.6 22/28] libfs: Re-arrange locking in offset_iterate_dir()

2024-10-25 Thread Yu Kuai
viewed-by: Jan Kara Signed-off-by: Christian Brauner Signed-off-by: Yu Kuai --- fs/libfs.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/libfs.c b/fs/libfs.c index dc0f7519045f..430f7c95336c 100644 --- a/fs/libfs.c +++ b/fs/libfs.c @@ -401,12 +401,

[PATCH 6.6 03/28] maple_tree: introduce interfaces __mt_dup() and mtree_dup()

2024-10-25 Thread Yu Kuai
a Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton Signed-off-by: Yu Kuai --- include/linux/maple_tree.h | 3 + lib/maple_tree.c | 274 + 2 files changed, 277 insertions(+) diff --git a/include/linux/maple_tree.h b/include/linux/maple_tree.h

[PATCH 6.6 21/28] maple_tree: avoid checking other gaps after getting the largest gap

2024-10-25 Thread Yu Kuai
in user mode almost always results in a near 100% hit rate for this optimization. Link: https://lkml.kernel.org/r/20231215074632.82045-1-zhangpeng...@bytedance.com Signed-off-by: Peng Zhang Reviewed-by: Liam R. Howlett Signed-off-by: Andrew Morton Signed-off-by: Yu Kuai --- lib/maple_tree.c

[PATCH 6.6 05/28] maple_tree: preserve the tree attributes when destroying maple tree

2024-10-25 Thread Yu Kuai
-off-by: Andrew Morton Signed-off-by: Yu Kuai --- lib/maple_tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/maple_tree.c b/lib/maple_tree.c index 6f1addbbc820..97a610307d38 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -6774,7 +6774,7 @@ void __mt_destroy

[PATCH 6.6 25/28] maple_tree: Add mtree_alloc_cyclic()

2024-10-25 Thread Yu Kuai
.host.secureserver.net Signed-off-by: Christian Brauner Signed-off-by: Yu Kuai --- include/linux/maple_tree.h | 7 +++ lib/maple_tree.c | 93 ++ 2 files changed, 100 insertions(+) diff --git a/include/linux/maple_tree.h b/include/linux/maple_tree.h index b3d63123b945

[PATCH 6.6 06/28] maple_tree: remove unnecessary default labels from switch statements

2024-10-25 Thread Yu Kuai
cases. Link: https://lkml.kernel.org/r/20231101171629.3612299-2-liam.howl...@oracle.com Signed-off-by: Liam R. Howlett Suggested-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Yu Kuai --- lib/maple_tree.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/maple_tree

[PATCH 6.6 11/28] maple_tree: use cached node end in mas_destroy()

2024-10-25 Thread Yu Kuai
Cc: Peng Zhang Signed-off-by: Andrew Morton Signed-off-by: Yu Kuai --- lib/maple_tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/maple_tree.c b/lib/maple_tree.c index e0dcc8412da0..3df7e3456205 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -5587,7 +5587

[PATCH 6.6 16/28] Revert "maple_tree: correct tree corruption on spanning store"

2024-10-25 Thread Yu Kuai
From: Yu Kuai This reverts commit 677f1df179cb68c12ddf7707ec325eb50e99c7d9. Above commit contain manual changes and will cause conflicts for following patches. The commit be backported from mainline later, without conflicts. Signed-off-by: Yu Kuai --- lib/maple_tree.c | 12 ++-- 1

[PATCH 6.6 23/28] libfs: Define a minimum directory offset

2024-10-25 Thread Yu Kuai
.host.secureserver.net Signed-off-by: Christian Brauner Signed-off-by: Yu Kuai --- fs/libfs.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/fs/libfs.c b/fs/libfs.c index 430f7c95336c..c3dc58e776f9 100644 --- a/fs/libfs.c +++ b/fs/libfs.c @@ -239,6 +239,11 @@ const

[PATCH 6.6 07/28] maple_tree: make mas_erase() more robust

2024-10-25 Thread Yu Kuai
.3612299-3-liam.howl...@oracle.com Signed-off-by: Liam R. Howlett Cc: Peng Zhang Signed-off-by: Andrew Morton Signed-off-by: Yu Kuai --- lib/maple_tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/maple_tree.c b/lib/maple_tree.c index 9de2e3dfdfcc..e4d0df3980e0 100644

[PATCH 6.6 26/28] libfs: Convert simple directory offsets to use a Maple Tree

2024-10-25 Thread Yu Kuai
170820145616.6328.12620992971699079156.st...@91.116.238.104.host.secureserver.net Reviewed-by: Jan Kara Signed-off-by: Christian Brauner Signed-off-by: Yu Kuai --- fs/libfs.c | 47 +++--- include/linux/fs.h | 5 +++-- 2 files changed, 26 insertions(+),

[PATCH 6.6 18/28] maple_tree: don't find node end in mtree_lookup_walk()

2024-10-25 Thread Yu Kuai
rnel.org/r/20231101171629.3612299-12-liam.howl...@oracle.com Signed-off-by: Liam R. Howlett Cc: Peng Zhang Signed-off-by: Andrew Morton Signed-off-by: Yu Kuai --- lib/maple_tree.c | 12 +++- lib/test_maple_tree.c | 21 + 2 files changed, 24 insertions(+), 9 deletions(-)

[PATCH 6.6 28/28] maple_tree: correct tree corruption on spanning store

2024-10-25 Thread Yu Kuai
.@web.de/ Tested-by: Bert Karwatzki Reported-by: Mikhail Gavrilov Closes: https://lore.kernel.org/all/cabxgcsopwuonoqsmmavwo2fz4tempnjfj-b7if+xfru1h7-...@mail.gmail.com/ Acked-by: Vlastimil Babka Reviewed-by: Liam R. Howlett Tested-by: Mikhail Gavrilov Reviewed-by: Wei Yang Cc: Matthew Wilc

[PATCH 6.6 10/28] maple_tree: use cached node end in mas_next()

2024-10-25 Thread Yu Kuai
-off-by: Liam R. Howlett Cc: Peng Zhang Signed-off-by: Andrew Morton Signed-off-by: Yu Kuai --- lib/maple_tree.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/maple_tree.c b/lib/maple_tree.c index d19fb14a9635..e0dcc8412da0 100644 --- a/lib/maple_t

[PATCH 6.6 24/28] libfs: Add simple_offset_empty()

2024-10-25 Thread Yu Kuai
...@91.116.238.104.host.secureserver.net Signed-off-by: Christian Brauner Signed-off-by: Yu Kuai --- fs/libfs.c | 32 include/linux/fs.h | 1 + mm/shmem.c | 4 ++-- 3 files changed, 35 insertions(+), 2 deletions(-) diff --git a/fs/libfs.c b/fs/libfs.c index

[PATCH 6.6 08/28] maple_tree: move debug check to __mas_set_range()

2024-10-25 Thread Yu Kuai
inclusion of the header to after the atomic define. None of those changes have functional changes. Link: https://lkml.kernel.org/r/20231101171629.3612299-4-liam.howl...@oracle.com Signed-off-by: Liam R. Howlett Cc: Peng Zhang Signed-off-by: Andrew Morton Signed-off-by: Yu Kuai --- inc

[PATCH 6.6 04/28] maple_tree: skip other tests when BENCH is enabled

2024-10-25 Thread Yu Kuai
. Howlett Cc: Christian Brauner Cc: Jonathan Corbet Cc: Mateusz Guzik Cc: Mathieu Desnoyers Cc: Matthew Wilcox Cc: Michael S. Tsirkin Cc: Mike Christie Cc: Nicholas Piggin Cc: Peter Zijlstra Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton Signed-off-by: Yu Kuai --- lib

[PATCH 6.6 20/28] lib/maple_tree.c: fix build error due to hotfix alteration

2024-10-25 Thread Yu Kuai
head of 0de56e38b307, for 6.7-rc. This fixlet undoes the damage. Fixes: 0de56e38b307 ("maple_tree: use maple state end for write operations") Cc: Liam R. Howlett Cc: Sidhartha Kumar Signed-off-by: Andrew Morton Signed-off-by: Yu Kuai --- lib/maple_tree.c | 2 +- 1 file chang

[PATCH 6.6 09/28] maple_tree: add end of node tracking to the maple state

2024-10-25 Thread Yu Kuai
Care must be taken to update & invalidate as necessary. Link: https://lkml.kernel.org/r/20231101171629.3612299-5-liam.howl...@oracle.com Signed-off-by: Liam R. Howlett Cc: Peng Zhang Signed-off-by: Andrew Morton Signed-off-by: Yu Kuai --- include/linux/maple_tree.h | 1 + li

[PATCH 6.6 15/28] maple_tree: remove mas_searchable()

2024-10-25 Thread Yu Kuai
3612299-10-liam.howl...@oracle.com Signed-off-by: Liam R. Howlett Cc: Peng Zhang Signed-off-by: Andrew Morton Signed-off-by: Yu Kuai --- lib/maple_tree.c | 66 tools/testing/radix-tree/maple.c | 4 +- 2 files changed, 19 insertions(+), 51 deletion

[PATCH 6.6 02/28] maple_tree: introduce {mtree,mas}_lock_nested()

2024-10-25 Thread Yu Kuai
: Matthew Wilcox Cc: Michael S. Tsirkin Cc: Mike Christie Cc: Nicholas Piggin Cc: Peter Zijlstra Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton Signed-off-by: Yu Kuai --- include/linux/maple_tree.h | 4 tools/include/linux/spinlock.h | 1 + 2 files changed, 5 insertions(+) diff

[PATCH 6.6 19/28] maple_tree: mtree_range_walk() clean up

2024-10-25 Thread Yu Kuai
-liam.howl...@oracle.com Signed-off-by: Liam R. Howlett Cc: Peng Zhang Signed-off-by: Andrew Morton Signed-off-by: Yu Kuai --- lib/maple_tree.c | 27 --- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/lib/maple_tree.c b/lib/maple_tree.c index ad8bf3413889..d9

[PATCH 6.6 13/28] maple_tree: add test for mtree_dup()

2024-10-25 Thread Yu Kuai
Zijlstra Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton Signed-off-by: Yu Kuai --- tools/testing/radix-tree/maple.c | 361 +++ 1 file changed, 361 insertions(+) diff --git a/tools/testing/radix-tree/maple.c b/tools/testing/radix-tree/maple.c index 27a3a31ba662

[PATCH 6.6 12/28] maple_tree: clean up inlines for some functions

2024-10-25 Thread Yu Kuai
ch gcc was not inlining, so make this more strict and use __always_line for these functions. Link: https://lkml.kernel.org/r/20231101171629.3612299-8-liam.howl...@oracle.com Signed-off-by: Liam R. Howlett Cc: Peng Zhang Signed-off-by: Andrew Morton Signed-off-by: Yu Kuai --- lib/maple_t

[PATCH V2] drm/amd/display: fix gcc set but not used warning of variable 'link_bandwidth_kbps'

2021-05-31 Thread Yu Kuai
t not used [-Wunused-but-set-variable] Signed-off-by: Yu Kuai --- changes in V2: - fix that forgetting to change position of '#endif' drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdg

[PATCH] drm/amd/display: fix gcc set but not used warning of variable 'link_bandwidth_kbps'

2021-05-29 Thread Yu Kuai
t not used [-Wunused-but-set-variable] Signed-off-by: Yu Kuai --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index f0

[PATCH] drm/amd/display: fix gcc set but not used warning of variable 'old_plane_state'

2021-05-29 Thread Yu Kuai
state’ set but not used [-Wunused-but-set-variable] Signed-off-by: Yu Kuai --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++-- include/drm/drm_atomic.h | 12 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/a

[PATCH] drm/amdgpu: fix PM reference leak in amdgpu_debugfs_gfxoff_rea()

2021-05-17 Thread Yu Kuai
pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to putting operation will result in reference leak here. Fix it by replacing it with pm_runtime_resume_and_get to keep usage counter balanced. Reported-by: Hulk Robot Signed-off-by: Yu Kuai --- drivers/gpu/drm/amd

[PATCH] drm/radeon: remove three set but not used variable

2019-12-26 Thread yu kuai
rs/gpu/drm/radeon/radeon_atombios.c:651:13: warning: variable ‘grph_obj_id’ set but not used [-Wunused-but-set-variable] drivers/gpu/drm/radeon/radeon_atombios.c:573:37: warning: variable ‘con_obj_type’ set but not used [-Wunused-but-set-variable] They are never used, and so can be removed. Signed-

[PATCH] drm/amd/display: make various variable in fixed31_32.h 'global' instead of 'static'

2019-11-20 Thread yu kuai
nings related to the variables. Fix it by initializing the variables in a new file "fixed31_32.c", and declare them 'extern' in "fixed31_32.h". Fixes: eb0e515464e4 ("drm/amd/display: get rid of 32.32 unsigned fixed point") Signed-off-by: yu kuai --- BTW, th

[PATCH 0/2] fix inappropriate use of declaring variable 'static' in fixed31_32.h

2019-11-20 Thread yu kuai
The first patch remove two set but not used variable. The second patch make the variables in fixed31_32.h 'global' instead of 'static'. yu kuai (2): drm/amd/display: remove set but not used variable 'dc_fixpt_e' and 'dc_fixpt_pi' drm/amd/display

[PATCH 1/2] drm/amd/display: remove set but not used variable 'dc_fixpt_e' and 'dc_fixpt_pi'

2019-11-20 Thread yu kuai
'dc_fixpt_e' and 'dc_fixpt_pi' are set in 'fixed31_32.h'. However, they are never used and so can be removed. Fixes: eb0e515464e4 ("drm/amd/display: get rid of 32.32 unsigned fixed point") Signed-off-by: yu kuai --- drivers/gpu/drm/amd/display/includ

[PATCH 1/7] drm/amdgpu: remove set but not used variable 'mc_shared_chmap' from 'gfx_v6_0.c' and 'gfx_v7_0.c'

2019-11-13 Thread yu kuai
gpu/gfx7: rework gpu_init()") Signed-off-by: yu kuai --- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 3 +-- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c

[PATCH 3/7] drm/amdgpu: remove set but not used variable 'count'

2019-11-13 Thread yu kuai
can be removed. Thus 'atomic_dec_return' can be replaced as 'atomic_dec' Fixes: e42051d2133b ("drm/amdkfd: Implement GPU reset handlers in KFD") Signed-off-by: yu kuai --- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PATCH 5/7] drm/amd/powerplay: remove set but not used variable 'threshold'

2019-11-13 Thread yu kuai
t is never used, so can be removed. Fixes: 2e112b4ae3ba ("drm/amd/pp: remove fiji_smc/smumgr split.") Signed-off-by: yu kuai --- drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/smu

[PATCH 0/7] various '-Wunused-but-set-variable' gcc warning fixes

2019-11-13 Thread yu kuai
This patch set fixes various unrelated gcc '-Wunused-but-set-variable' warnings. yu kuai (7): drm/amdgpu: remove set but not used variable 'mc_shared_chmap' from 'gfx_v6_0.c' and 'gfx_v7_0.c' drm/amdgpu: remove set but not used variable 'amdgp

[PATCH 6/7] drm/amd/powerplay: remove set but not used variable 'state'

2019-11-13 Thread yu kuai
t is never used, so can be removed. Fixes: 2e112b4ae3ba ("drm/amd/pp: remove fiji_smc/smumgr split.") Signed-off-by: yu kuai --- drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/smu

[PATCH 2/7] drm/amdgpu: remove set but not used variable 'amdgpu_connector'

2019-11-13 Thread yu kuai
le] Fixes: d38ceaf99ed0 ("drm/amdgpu: add core driver (v4)") Signed-off-by: yu kuai --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c index d2dd59a..

[PATCH 4/7] drm/amdgpu: remove set but not used variable 'invalid'

2019-11-13 Thread yu kuai
' 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 --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 4 ++-- 1 file changed, 2 i

[PATCH 7/7] drm/amd/powerplay: remove set but not used variable 'us_mvdd'

2019-11-13 Thread yu kuai
e] It is never used, so can be removed. Fixes: ac7822b0026f ("drm/amd/powerplay: add smumgr support for VEGAM (v2)") Signed-off-by: yu kuai --- drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c | 12 1 file changed, 12 deletions(-) diff --git a/drivers/gpu/drm/amd/powe

[PATCH 0/7] fix various gcc warnings

2019-11-04 Thread yu kuai
This patch set fixes various gcc warnings. yu kuai (7): drm/amdgpu: remove 4 set but not used variable in amdgpu_atombios_get_connector_info_from_object_table drm/amdgpu: add function parameter description in 'amdgpu_device_set_cg_state' drm/amdgpu: add function

[PATCH 7/7] drm/amdgpu: remove set but not used variable 'mc_shared_chmap'

2019-11-04 Thread yu kuai
gpu: split gfx8 gpu init into sw and hw parts") Signed-off-by: yu kuai --- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c index e4c645d..80b7958 100644 -

[PATCH 2/7] drm/amdgpu: add function parameter description in 'amdgpu_device_set_cg_state'

2019-11-04 Thread yu kuai
Fixes gcc warning: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:1954: warning: Function parameter or member 'state' not described in 'amdgpu_device_set_cg_state' Fixes: e3ecdffac9cc ("drm/amdgpu: add documentation for amdgpu_device.c") Signed-off-by: yu kuai -

[PATCH 6/7] drm/amdgpu: remove always false comparison in 'amdgpu_atombios_i2c_process_i2c_ch'

2019-11-04 Thread yu kuai
x27;u8', so it will never be greater than 'TOM_MAX_HW_I2C_READ', which is defined as 255. Therefore, the comparison can be removed. Fixes: d38ceaf99ed0 ("drm/amdgpu: add core driver (v4)") Signed-off-by: yu kuai --- drivers/gpu/drm/amd/amdgpu/atombios_i2c.c | 5 - 1

[PATCH 5/7] drm/amdgpu: remove set but not used variable 'dig'

2019-11-04 Thread yu kuai
mdgpu: add core driver (v4)") Signed-off-by: yu kuai --- drivers/gpu/drm/amd/amdgpu/atombios_dp.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/atombios_dp.c b/drivers/gpu/drm/amd/amdgpu/atombios_dp.c index 9426530..ea702a6 100644 --- a/drivers/gpu/drm/amd/

[PATCH 4/7] drm/amdgpu: remove set but not used variable 'dig_connector'

2019-11-04 Thread yu kuai
so can be removed. Fixes: d38ceaf99ed0 ("drm/amdgpu: add core driver (v4)") Signed-off-by: yu kuai --- drivers/gpu/drm/amd/amdgpu/atombios_dp.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/atombios_dp.c b/drivers/gpu/drm/amd/amdgpu/atombios_dp.c in

[PATCH 1/7] drm/amdgpu: remove 4 set but not used variable in amdgpu_atombios_get_connector_info_from_object_table

2019-11-04 Thread yu kuai
able] drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c:341:24: warning: variable 'con_obj_num' set but not used [-Wunused-but-set-variable] They are never used, so can be removed. Fixes: d38ceaf99ed0 ("drm/amdgpu: add core driver (v4)") Signed-off-by: yu kuai --- drivers/gpu/drm

[PATCH 3/7] drm/amdgpu: add function parameter description in 'amdgpu_gart_bind'

2019-11-04 Thread yu kuai
Fixes gcc warning: drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c:313: warning: Function parameter or member 'flags' not described in 'amdgpu_gart_bind' Fixes: d38ceaf99ed0 ("drm/amdgpu: add core driver (v4)") Signed-off-by: yu kuai --- drivers/gpu/drm/amd/amdgpu/amdgp

[PATCH V2] drm/amdgpu: remove set but not used variable 'pipe'

2019-09-29 Thread yu kuai
be removed. Reported-by: Hulk Robot Signed-off-by: yu kuai --- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c index f9bef31..c1035a3 100644 --- a/drivers/g

[PATCH] drm/amdgpu: remove set but not used variable 'pipe'

2019-09-29 Thread yu kuai
so can be removed. Reported-by: Hulk Robot Signed-off-by: yu kuai --- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c index f9bef31..c1035a3 100644 --- a/d

[PATCH] drm/amdgpu: remove excess function parameter description

2019-09-19 Thread yu kuai
cn_v2_5_enable_clock_gating' Fixes: cbead2bdfcf1 ("drm/amdgpu: add VCN2.5 VCPU start and stop") Signed-off-by: yu kuai --- drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c b/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c i