On 7/31/23 6:26 AM, Ruan Jinjie wrote:
Ther are many ternary operators, the true or false judgement
of which is unnecessary in C language semantics.
Signed-off-by: Ruan Jinjie
---
snip
data->registry_data.avfs_support =
- hwmgr->feature_mask & PP_AVFS_MASK ? true :
gcc with W=1 reports
drivers/gpu/drm/radeon/radeon_ttm.c:200:27: error: variable
‘rbo’ set but not used [-Werror=unused-but-set-variable]
200 | struct radeon_bo *rbo;
| ^~~
This variable is not used so remove it.
Signed-off-by: Tom Rix
---
drivers/gpu
[] = {
|^~~~
gfx9_cs_data is only used in gfx_v9_0.c, so move its definition there.
Signed-off-by: Tom Rix
---
drivers/gpu/drm/amd/amdgpu/clearstate_gfx9.h | 4
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c| 5 +
2 files changed, 5 insertions(+), 4 deletions
)
^
This function is not used so remove it.
Signed-off-by: Tom Rix
---
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 5 -
1 file changed, 5 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
index
= {
| ^~~~
These variables are not used so remove them.
Signed-off-by: Tom Rix
---
.../drm/amd/display/dc/dcn20/dcn20_resource.c | 23 ---
1 file changed, 23 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
b/drivers/gpu
gcc with W=1 reports
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c:2138:13: error: variable
‘num_xcc’ set but not used [-Werror=unused-but-set-variable]
2138 | int num_xcc;
| ^~~
This variable is not used so remove it.
Signed-off-by: Tom Rix
---
drivers/gpu/drm/amd
[] = {
| ^
This variable is not used so remove it.
Signed-off-by: Tom Rix
---
drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c | 8
1 file changed, 8 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c
b/drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c
index 3648994724c2..00e7e5db7c28 100644
smatch reports
drivers/gpu/drm/amd/amdgpu/../display/modules/power/power_helpers.c:119:31:
warning: symbol 'custom_backlight_curve0' was not declared. Should it be
static?
This variable is only used in its defining file, so it should be static
Signed-off-by: Tom Rix
---
drivers/gpu/drm/amd
On 4/24/23 10:02 AM, Hamza Mahfooz wrote:
On 4/20/23 09:59, Tom Rix wrote:
gcc with W=1 reports
drivers/gpu/drm/amd/amdgpu/../display/dc/dc_dmub_srv.c:
In function ‘dc_dmub_srv_optimized_init_done’:
drivers/gpu/drm/amd/amdgpu/../display/dc/dc_dmub_srv.c:184:26:
error: variable ‘dmub
is not used, so remove it.
Which made dout unused, so also remove.
Signed-off-by: Tom Rix
---
.../display/dc/dml/dcn314/display_rq_dlg_calc_314.c| 10 --
1 file changed, 10 deletions(-)
diff --git
a/drivers/gpu/drm/amd/display/dc/dml/dcn314/display_rq_dlg_calc_314.c
b/drivers/gpu/drm/amd
*dmub;
| ^~~~
The return status is never set.
It looks like a call to dmub_srv_get_fw_boot_status is missing.
Fixes: 499e4b1c722e ("drm/amd/display: add mechanism to skip DCN init")
Signed-off-by: Tom Rix
---
drivers/gpu/drm/amd/display/dc/dc_dmub_
’:
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:529:19: error: variable
‘j’ set but not used [-Werror=unused-but-set-variable]
529 | int r, i, j;
| ^
These variables are not used, so remove them.
Signed-off-by: Tom Rix
---
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
feature_support;
| ^~~
This variable is not used so remove it.
The status of amb_feature_support should have been returned, so
set ret and return it.
Fixes: b8fe56375f78 ("drm/amd/display: Refactor ABM feature")
Signed-off-by: Tom Rix
---
drivers/g
e them.
Fixes: e97cc04fe0fb ("drm/amd/display: refactor dmub commands into single
function")
Signed-off-by: Tom Rix
---
drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hwseq.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hwseq.c
b/dri
smatch reports
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn314/dcn314_dccg.c:277:6: warning:
symbol
'dccg314_init' was not declared. Should it be static?
This variable is only used in one file so should be static.
Signed-off-by: Tom Rix
---
drivers/gpu/drm/amd/display/dc/dcn314
cpp_check reports
drivers/gpu/drm/amd/display/modules/freesync/freesync.c:1143:17: style: Variable
'oldest_index' is assigned a value that is never used. [unreadVariable]
oldest_index = 0;
^
This variable is not used so remove.
Signed-off-by: Tom Rix
---
drivers/gpu/drm
, 2, 3, 4, 5};
| ^~~
These variables are defined and used in smu_v13_0_7_ppt.c and smu_v13_0_0_ppt.c.
There should be only one definition. So define the variables as globals
in smu_v13_0.c
Signed-off-by: Tom Rix
---
drivers/gpu/drm/amd/pm/swsmu/inc
/amdgpu/../display/dc/dml/display_mode_lib.c:86:24: warning:
symbol
'dml32_funcs' was not declared. Should it be static?
These variables are only used in one file so should be static.
Cleanup whitespace, use tabs consistently for indents.
Signed-off-by: Tom Rix
---
.../drm/amd/display/dc/dml
. Should it be static?
These variables are only used in one file so should be static.
Signed-off-by: Tom Rix
---
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c
b/drivers
smatch reports
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn314/dcn314_fpu.c:100:37:
warning: symbol
'dcn3_14_soc' was not declared. Should it be static?
This variable is only used in one file so should be static.
Signed-off-by: Tom Rix
---
drivers/gpu/drm/amd/display/dc/dml/dcn314
clang with W=1 reports
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/amdgpu_smu.c:1700:6: error: variable
'num_of_active_display' set but not used [-Werror,-Wunused-but-set-variable]
int num_of_active_display = 0;
^
This variable is not used so remove it.
Signed-off-by: Tom Rix
is not used so remove it, which caused i to be unused so remove
that as well.
Signed-off-by: Tom Rix
---
.../drm/amd/display/modules/freesync/freesync.c| 14 --
1 file changed, 14 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c
b/drivers/gpu/drm/amd
is not used so remove it, which caused i to be unused so remove
that as well.
Signed-off-by: Tom Rix
---
.../drm/amd/display/modules/freesync/freesync.c| 14 --
1 file changed, 14 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c
b/drivers/gpu/drm/amd
is not used so remove it.
Signed-off-by: Tom Rix
---
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c | 9 +
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c
b/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c
index 0d53f6067422
-by: Tom Rix
---
drivers/gpu/drm/amd/display/dc/core/dc_link_enc_cfg.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_enc_cfg.c
b/drivers/gpu/drm/amd/display/dc/core/dc_link_enc_cfg.c
index 41198c729d90..30c0644d4418 100644
event moving of pinned BOs")
Since the variable is not used, remove it.
Signed-off-by: Tom Rix
---
drivers/gpu/drm/radeon/radeon_ttm.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c
b/drivers/gpu/drm/radeon/radeon_ttm.c
index 2220cdf6a3f6..0ea430ee5
, remove it.
Signed-off-by: Tom Rix
---
.../drm/amd/display/dc/link/protocols/link_dp_dpia_bw.c | 8
1 file changed, 8 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_dpia_bw.c
b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_dpia_bw.c
index
res_pool is unused, remove it.
Signed-off-by: Tom Rix
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
'dcn30_mmhubbub_funcs' was not declared. Should it be static?
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_mpc.c:1402:24:
warning: symbol 'dcn30_mpc_funcs' was not declared. Should it be static?
All of these are only used in their definition file, so they should be static
Signed-off-by: Tom Rix
' was not declared. Should it be static?
All of these are only used in their definition file, so they should be static
Signed-off-by: Tom Rix
---
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dsc.c | 2 +-
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dwb.c | 2 +-
drivers/gpu/drm/amd/display/dc/dcn20
' was not declared. Should it be static?
All of these are only used in their definition file, so they should be static
Signed-off-by: Tom Rix
---
.../gpu/drm/amd/display/dc/clk_mgr/dcn201/dcn201_clk_mgr.c| 2 +-
drivers/gpu/drm/amd/display/dc/dcn201/dcn201_mpc.c| 2 +-
drivers/gpu/drm
)
| ^
vangogh_set_apu_thermal_limit is only used in vangogh_ppt.c, so it should be
static
Signed-off-by: Tom Rix
---
drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
b
building with gcc and W=1 reports
drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c:81:29: error: variable
‘ring’ set but not used [-Werror=unused-but-set-variable]
81 | struct amdgpu_ring *ring;
| ^~~~
ring is not used so remove it.
Signed-off-by: Tom Rix
is not used so remove it.
Signed-off-by: Tom Rix
---
drivers/gpu/drm/amd/amdgpu/umc_v8_10.c | 7 +--
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/umc_v8_10.c
b/drivers/gpu/drm/amd/amdgpu/umc_v8_10.c
index 66158219f791..3f051dec56e9 100644
smatch reports
drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c:90:6:
warning: symbol 'should_disable_otg' was not declared. Should it be static?
should_disable_otg() is only used in dcn315_clk_mgr.c, so it should be static
Signed-off-by: Tom Rix
---
drivers/gpu/drm
: aa5a57773042 ("drm/amd/display: Vari-bright looks disabled near end of
MM14")
Signed-off-by: Tom Rix
---
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
check != condition, an else is simplier.
Fixes: 238debcaebe4 ("drm/amd/display: Use DML for MALL SS and Subvp allocation
calculations")
Signed-off-by: Tom Rix
---
drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dr
There are several copies of CalculateRemoteSurfaceFlipDelay.
Reduce to one instance.
Signed-off-by: Tom Rix
---
.../dc/dml/dcn20/display_mode_vba_20.c| 4 +-
.../dc/dml/dcn20/display_mode_vba_20v2.c | 40 +--
.../dc/dml/dcn21/display_mode_vba_21.c| 40
On 9/16/22 2:06 PM, Nathan Chancellor wrote:
Most of the arguments are identical between the two call sites and they
can be accessed through the 'struct vba_vars_st' pointer. This reduces
the total amount of stack space that
dml314_ModeSupportAndSystemConfigurationFull() uses by 240 bytes with
There are several copies of CalculateTwait.
Reduce to one instance and change local variable name to match common usage.
Signed-off-by: Tom Rix
---
.../dc/dml/dcn20/display_mode_vba_20.c| 16 +++---
.../dc/dml/dcn20/display_mode_vba_20v2.c | 21 ++-
.../dc
Mimimize the function signature by passing a pointer and an index instead
of passing several elements of the pointer.
The dml2x,dml3x families uses the same algorithm. Remove the duplicates.
Use dml20_ and dml30_ prefix to distinguish the two variants.
Signed-off-by: Tom Rix
---
.../dc/dml
.
Fixes: 0efd4374f6b4 ("drm/amd/display: add dcn32 IRQ changes")
Signed-off-by: Tom Rix
---
drivers/gpu/drm/amd/display/dc/irq/dcn32/irq_service_dcn32.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/dc/irq/dcn32/irq_service_dcn32.c
b/drive
?
Neither of thse variables is used in dc_link_dp.c. Reviewing the commit listed
in
the fixes tag shows neither was used in the original patch. So remove them.
Fixes: 265280b99822 ("drm/amd/display: add CLKMGR changes for DCN32/321")
Signed-off-by: Tom Rix
---
drivers/gpu/drm/amd/displ
should be static, so change their storage-class specifiers to static.
Signed-off-by: Tom Rix
---
drivers/gpu/drm/radeon/si_dpm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/radeon/si_dpm.c b/drivers/gpu/drm/radeon/si_dpm.c
index 3add39c1a689..fbf968e3f6d7
. Single file
symbols
should be static. So move their definitions to cik_blit_shaders.h and change
their
storage-class-specifier to static.
Remove unneeded cik_blit_shader.c
Signed-off-by: Tom Rix
---
drivers/gpu/drm/radeon/Makefile | 2 +-
drivers/gpu/drm/radeon/cik_blit_shaders.c
elsewhere.
For consistency, add the virtual_setup_stream_attribute
decl to virtual_link_hwss.h.
Signed-off-by: Tom Rix
---
drivers/gpu/drm/amd/display/dc/virtual/virtual_link_hwss.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/amd/display/dc/virtual/virtual_link_hwss.h
b/drivers
were removed with
commit 4f8629675800 ("drm/radeon/kms: remove r6xx+ blit copy routines")
So their declarations in evergreen_blit_shader.h
are not needed, so remove them.
Signed-off-by: Tom Rix
---
drivers/gpu/drm/radeon/Makefile | 2 +-
.../gpu/drm/radeon/evergreen_blit
The only use of the global variables in r600_blit_shaders.c
were in the old drivers/gpu/drm/radeon/r600_blit.c
This file was removed in
commit 8333f607a631 ("drm/radeon: remove UMS support")
So remove the r600_blit_shaders.[c|h] files
Signed-off-by: Tom Rix
---
drivers/gpu/drm/radeo
4f8629675800 ("drm/radeon/kms: remove r6xx+ blit copy routines")
So their declarations in cayman_blit_shader.h
are not needed, so remove them.
Signed-off-by: Tom Rix
---
drivers/gpu/drm/radeon/Makefile | 2 +-
drivers/gpu/drm/radeon/cayman_blit_shade
be static. So move the definition of
si_default_state and si_default_size to si_blit_shader.h
and change their storage-class-specifier to static.
Remove unneeded si_blit_shader.c
Signed-off-by: Tom Rix
---
v2: move definitions to header
drivers/gpu/drm/radeon/Makefile | 2 +-
drivers
On 4/4/22 8:22 AM, Harry Wentland wrote:
On 2022-04-03 10:21, Tom Rix wrote:
Smatch reports this issue
hdcp1_execution.c:500:29: warning: function
'mod_hdcp_hdcp1_dp_execution' with external linkage
has definition
Which branch are you using?
linux-next from 4/1
Tom
I don't see
On 4/4/22 6:32 AM, Christian König wrote:
Am 04.04.22 um 15:01 schrieb Tom Rix:
On 4/4/22 5:34 AM, Christian König wrote:
Am 04.04.22 um 14:32 schrieb Tom Rix:
On 4/3/22 8:23 AM, Christian König wrote:
Am 02.04.22 um 18:27 schrieb Tom Rix:
Smatch reports these issues
si_blit_shaders.c:31
On 4/3/22 8:23 AM, Christian König wrote:
Am 02.04.22 um 18:27 schrieb Tom Rix:
Smatch reports these issues
si_blit_shaders.c:31:11: warning: symbol 'si_default_state'
was not declared. Should it be static?
si_blit_shaders.c:253:11: warning: symbol 'si_default_size'
was not declared
On 4/4/22 5:34 AM, Christian König wrote:
Am 04.04.22 um 14:32 schrieb Tom Rix:
On 4/3/22 8:23 AM, Christian König wrote:
Am 02.04.22 um 18:27 schrieb Tom Rix:
Smatch reports these issues
si_blit_shaders.c:31:11: warning: symbol 'si_default_state'
was not declared. Should it be static
Smatch reports this issue
hdcp1_execution.c:500:29: warning: function
'mod_hdcp_hdcp1_dp_execution' with external linkage
has definition
The storage-class-specifier extern is not needed in a
definition, so remove it.
Signed-off-by: Tom Rix
---
drivers/gpu/drm/amd/display/modules/hdcp
be static. So move the si_default_state and
si_default_size to si.c and change their
storage-class-specifier to static.
Remove unneeded si_blit_shaders.[c|h]
Signed-off-by: Tom Rix
---
drivers/gpu/drm/radeon/Makefile | 2 +-
drivers/gpu/drm/radeon/si.c | 224
On 2/26/22 2:21 PM, David Laight wrote:
From: t...@redhat.com
Sent: 26 February 2022 15:59
From: Tom Rix
Clang static analysis reports this error
amdgpu_debugfs.c:1690:9: warning: 1st function call
argument is an uninitialized value
tmp = krealloc_array(tmp, i + 1
On 2/21/22 12:53 PM, Luben Tuikov wrote:
On 2022-02-21 15:36, Tom Rix wrote:
On 2/21/22 11:57 AM, Luben Tuikov wrote:
Hi Tom,
This was already fixed with this patch, and LKML was CC-ed. See the CC tags in
the patch below,
commit 4f7d7cda90cbd7
Author: Luben Tuikov
Date: Wed Feb 16 16
2-21 12:37, t...@redhat.com wrote:
From: Tom Rix
On mips64 allyesconfig, there is this build break
amdgpu_discovery.c:671:35: error: format '%ld' expects
argument of type 'long int', but argument 4 has
type 'size_t' {aka 'unsigned int'}
DRM_DEBUG("match:%d @ ip_offset:%ld", i
On 2/18/22 10:35 AM, Felix Kuehling wrote:
Am 2022-02-18 um 12:39 schrieb t...@redhat.com:
From: Tom Rix
Clang static analysis reports this problem
kfd_chardev.c:2327:2: warning: 1st function call argument
is an uninitialized value
kvfree(bo_privs
This was for a different reason.
imo, you do not need to include what another patch did.
so you could also just remove this bit from the commit log.
The change itself looks good.
Reviewed-by: Tom Rix
>
> Fixes: 0b437e64e0af ("drm/amdgpu: remove h from printk format specifier&quo
On 12/15/20 6:47 AM, Christian König wrote:
> Am 15.12.20 um 15:38 schrieb t...@redhat.com:
>> From: Tom Rix
>>
>> See Documentation/core-api/printk-formats.rst.
>> h should no longer be used in the format specifier for printk.
>
> In general looks valid t
On 11/22/20 10:22 AM, Joe Perches wrote:
> On Sun, 2020-11-22 at 08:33 -0800, Tom Rix wrote:
>> On 11/21/20 9:10 AM, Joe Perches wrote:
>>> On Sat, 2020-11-21 at 08:50 -0800, t...@redhat.com wrote:
>>>> A difficult part of automating commits is composing the subsyst
On 11/21/20 7:23 PM, Matthew Wilcox wrote:
> On Sat, Nov 21, 2020 at 08:50:58AM -0800, t...@redhat.com wrote:
>> The fixer review is
>> https://reviews.llvm.org/D91789
>>
>> A run over allyesconfig for x86_64 finds 62 issues, 5 are false positives.
>> The false positives are caused by macros
On 11/21/20 9:10 AM, Joe Perches wrote:
> On Sat, 2020-11-21 at 08:50 -0800, t...@redhat.com wrote:
>> A difficult part of automating commits is composing the subsystem
>> preamble in the commit log. For the ongoing effort of a fixer producing
>> one or two fixes a release the use of 'treewide:'
On 11/22/20 6:56 AM, Matthew Wilcox wrote:
> On Sun, Nov 22, 2020 at 06:46:46AM -0800, Tom Rix wrote:
>> On 11/21/20 7:23 PM, Matthew Wilcox wrote:
>>> On Sat, Nov 21, 2020 at 08:50:58AM -0800, t...@redhat.com wrote:
>>>> The fixer review is
>>>> https
On 11/9/20 6:52 PM, Joe Perches wrote:
> On Tue, 2020-10-27 at 09:42 -0700, t...@redhat.com wrote:
>> This rfc will describe
>> An upcoming treewide cleanup.
>> How clang tooling was used to programatically do the clean up.
>> Solicit opinions on how to generally use clang tooling.
>>
>> The
On 10/19/20 12:42 PM, Nick Desaulniers wrote:
> On Sat, Oct 17, 2020 at 10:43 PM Greg KH wrote:
>> On Sat, Oct 17, 2020 at 09:09:28AM -0700, t...@redhat.com wrote:
>>> From: Tom Rix
>>>
>>> This is a upcoming change to clean up a new warning treewide.
&g
On 10/19/20 4:05 PM, Jason Gunthorpe wrote:
> On Mon, Oct 19, 2020 at 12:42:15PM -0700, Nick Desaulniers wrote:
>> On Sat, Oct 17, 2020 at 10:43 PM Greg KH wrote:
>>> On Sat, Oct 17, 2020 at 09:09:28AM -0700, t...@redhat.com wrote:
>>>> From: Tom Rix
>&
On 10/17/20 10:43 PM, Greg KH wrote:
> On Sat, Oct 17, 2020 at 09:09:28AM -0700, t...@redhat.com wrote:
>> From: Tom Rix
>>
>> This is a upcoming change to clean up a new warning treewide.
>> I am wondering if the change could be one mega patch (see below) or
>>
70 matches
Mail list logo