Smatch error:
gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:316:49: error:
static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB"
static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB"
Fixes: 1721bc1b2afa ("drm/amdgpu: Update VF2PF interfac
use "__packed" is clearer amd better than “pragma pack()”.
Signed-off-by: Su Hui
---
As Dan Carpenter mentioned:
'"Mark the associated types properly packed individually, rather than
use the disgusting "pragma pack()" that should never be used."
https://lore.k
ess or user pointers. That's how we used to do it
prior to 2003. But these days it feels strange and dangerous to see
these sorts of warnings.
Got it. And it is really strange when I first saw these warnings.
Thanks for your explanation!
Su Hui
Smatch also disabled some uninitialized variable
No need cast (void*) to (struct amdgpu_device *).
Signed-off-by: Su Hui
---
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 4 ++--
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 2 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 2 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 2 +-
drivers
No need cast (void*) to (struct radeon_device *)
or (struct radeon_ring *).
Signed-off-by: Su Hui
---
drivers/gpu/drm/radeon/r100.c | 8
drivers/gpu/drm/radeon/r300.c | 2 +-
drivers/gpu/drm/radeon/r420.c | 2 +-
drivers/gpu/drm/radeon/r600.c | 2
Pointer variables of (void*) type do not require type cast.
Signed-off-by: Su Hui
---
drivers/gpu/drm/msm/adreno/a5xx_debugfs.c | 2 +-
drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 2 +-
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 2 +-
drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 2 +-
drivers
On 2023/7/25 01:35, Andi Shyti wrote:
On Tue, Jul 18, 2023 at 09:32:17AM +0800, Su Hui wrote:
Clang warning: drivers/gpu/drm/i915/display/intel_tv.c:
line 991, column 22 Division by zero.
Assuming tv_mode->oversample=1 and (!tv_mode->progressive)=1,
then division by zero will happen.
your help!
Su Hui
regards,
dan carpenter
diff --git a/drivers/gpu/drm/i915/display/intel_tv.c
b/drivers/gpu/drm/i915/display/intel_tv.c
index 36b479b46b60..6997b6cb1df2 100644
--- a/drivers/gpu/drm/i915/display/intel_tv.c
+++ b/drivers/gpu/drm/i915/display/intel_tv.c
@@ -988,7 +988,13
Pointer variables of (void*) type do not require type cast.
Signed-off-by: Su Hui
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 2 +-
drivers/gpu/drm/amd/pm/amdgpu_pm.c| 2 +-
drivers/gpu/drm/etnaviv/etnaviv_drv.c | 4 ++--
drivers
On 2023/5/26 15:27, Christian König wrote:
Am 26.05.23 um 05:32 schrieb Su Hui:
Pointer variables of (void*) type do not require type cast.
Please split that up by subsystem/driver. Taking it through the misc
tree might just cause merge conflicts.
Sorry for that, I will split it and send
Use struct_size() instead of hand writing it.
This is less verbose and more informative.
Signed-off-by: Su Hui
---
drivers/gpu/drm/nouveau/nvif/object.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/nouveau/nvif/object.c
b/drivers/gpu/drm/nouveau/nvif
On 2023/5/31 16:31, Dan Carpenter wrote:
On Wed, May 31, 2023 at 12:38:26PM +0800, Su Hui wrote:
Use struct_size() instead of hand writing it.
This is less verbose and more informative.
Signed-off-by: Su Hui
---
drivers/gpu/drm/nouveau/nvif/object.c | 2 +-
1 file changed, 1 insertion
Smatch error:buffer overflow 'ti_sn_bridge_refclk_lut' 5 <= 5.
Fixes: cea86c5bb442 ("drm/bridge: ti-sn65dsi86: Implement the pwm_chip")
Signed-off-by: Su Hui
---
drivers/gpu/drm/bridge/ti-sn65dsi86.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dr
Hi,
On 2023/6/6 23:28, Doug Anderson wrote:
Hi,
On Tue, Jun 6, 2023 at 12:56 AM Su Hui wrote:
Smatch error:buffer overflow 'ti_sn_bridge_refclk_lut' 5 <= 5.
Fixes: cea86c5bb442 ("drm/bridge: ti-sn65dsi86: Implement the pwm_chip")
Signed-off-by: Su Hui
---
dr
Smatch error:buffer overflow 'ti_sn_bridge_refclk_lut' 5 <= 5.
Fixes: cea86c5bb442 ("drm/bridge: ti-sn65dsi86: Implement the pwm_chip")
Signed-off-by: Su Hui
---
drivers/gpu/drm/bridge/ti-sn65dsi86.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dr
On 2023/6/7 22:03, Doug Anderson wrote:
Hi,
On Tue, Jun 6, 2023 at 6:25 PM Su Hui wrote:
Smatch error:buffer overflow 'ti_sn_bridge_refclk_lut' 5 <= 5.
Fixes: cea86c5bb442 ("drm/bridge: ti-sn65dsi86: Implement the pwm_chip")
Signed-off-by: Su Hui
---
drivers/gpu/dr
Smatch error:buffer overflow 'ti_sn_bridge_refclk_lut' 5 <= 5.
Fixes: cea86c5bb442 ("drm/bridge: ti-sn65dsi86: Implement the pwm_chip")
Signed-off-by: Su Hui
---
drivers/gpu/drm/bridge/ti-sn65dsi86.c | 4
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/dr
in SRIOV")
Signed-off-by: Su Hui
---
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
index 8e1cfc87122d..ba95526c3d45 100644
--
t->dp501_fw'.
Fixes: 12f8030e05c6 ("drm/ast: Actually load DP501 firmware when required")
Signed-off-by: Su Hui
---
drivers/gpu/drm/ast/ast_dp501.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/ast/ast_dp501.c b/drivers/gpu/drm/ast/ast
On 2023/8/21 14:47, Christophe JAILLET wrote:
Le 21/08/2023 à 08:19, Su Hui a écrit :
smatch error:
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c:1257
amdgpu_discovery_reg_base_init() error:
testing array offset 'adev->vcn.num_vcn_inst' after use.
change the assignment order to
On 2023/8/21 15:04, Christophe JAILLET wrote:
Le 21/08/2023 à 08:22, Su Hui a écrit :
smatch error:
drivers/gpu/drm/ast/ast_dp501.c:227 ast_launch_m68k() error:
we previously assumed 'ast->dp501_fw' could be null (see line 223)
when "!ast->dp501_fw" and "ast_loa
in SRIOV")
Signed-off-by: Su Hui
---
changes in v2:
- fix the error about ip->revision (thanks to Christophe JAILLET).
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
b/
On 2023/8/21 17:31, Christian König wrote:
Am 21.08.23 um 09:37 schrieb Su Hui:
smatch error:
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c:1257
amdgpu_discovery_reg_base_init() error:
testing array offset 'adev->vcn.num_vcn_inst' after use.
change the assignment order to
virtio_gpu_get_vbuf always be successful,
so remove the error judgment.
Signed-off-by: Su Hui
---
drivers/gpu/drm/virtio/virtgpu_vq.c | 4
1 file changed, 4 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c
b/drivers/gpu/drm/virtio/virtgpu_vq.c
index b1a00c0c25a7
On 2023/7/11 19:13, Dan Carpenter wrote:
On Tue, Jul 11, 2023 at 05:00:31PM +0800, Su Hui wrote:
virtio_gpu_get_vbuf always be successful,
so remove the error judgment.
No, just ignore the static checker false positive in this case. The
intent of the code is clear that if it did have an
x27;t fail, and virtio_gpu_get_vbuf never return error code, so
remove the error judgment.
How about this one? Thanks for your advice.
Su Hui
Regards,
Markus
On 2023/7/12 14:36, Dan Carpenter wrote:
On Wed, Jul 12, 2023 at 09:18:42AM +0800, Su Hui wrote:
On 2023/7/11 19:13, Dan Carpenter wrote:
On Tue, Jul 11, 2023 at 05:00:31PM +0800, Su Hui wrote:
virtio_gpu_get_vbuf always be successful,
so remove the error judgment.
No, just ignore the
Clang warning: drivers/gpu/drm/i915/display/intel_tv.c:
line 991, column 22 Division by zero.
Assuming tv_mode->oversample=1 and (!tv_mode->progressive)=1,
then division by zero will happen.
Fixes: 1bba5543e4fe ("drm/i915: Fix TV encoder clock computation")
Signed-off-by: Su Hui
On 2023/7/17 22:52, Andrzej Hajda wrote:
On 17.07.2023 08:22, Su Hui wrote:
Clang warning: drivers/gpu/drm/i915/display/intel_tv.c:
line 991, column 22 Division by zero.
Assuming tv_mode->oversample=1 and (!tv_mode->progressive)=1,
then division by zero will happen.
Fixes: 1bba5543e4fe
Clang warning: drivers/gpu/drm/i915/display/intel_tv.c:
line 991, column 22 Division by zero.
Assuming tv_mode->oversample=1 and (!tv_mode->progressive)=1,
then division by zero will happen.
Fixes: 1bba5543e4fe ("drm/i915: Fix TV encoder clock computation")
Signed-off-by: Su Hui
On 2023/7/18 13:39, Dan Carpenter wrote:
On Mon, Jul 17, 2023 at 04:52:51PM +0200, Andrzej Hajda wrote:
On 17.07.2023 08:22, Su Hui wrote:
Clang warning: drivers/gpu/drm/i915/display/intel_tv.c:
line 991, column 22 Division by zero.
Assuming tv_mode->oversample=1 and (!tv_mode->progress
On 2023/7/18 19:28, Andrzej Hajda wrote:
On 18.07.2023 12:10, Su Hui wrote:
On 2023/7/18 13:39, Dan Carpenter wrote:
On Mon, Jul 17, 2023 at 04:52:51PM +0200, Andrzej Hajda wrote:
On 17.07.2023 08:22, Su Hui wrote:
Clang warning: drivers/gpu/drm/i915/display/intel_tv.c:
line 991, column 22
svm_ioctl() should return negative error code in default case.
Fixes: 42de677f7999 ("drm/amdkfd: register svm range")
Signed-off-by: Su Hui
---
Ps: When I try to compile this file, there is a error :
drivers/gpu/drm/amd/amdkfd/kfd_migrate.c:28:10: fatal error: amdgpu_sync.h:
No su
On 2024/3/25 22:09, Philip Yang wrote:
On 2024-03-25 02:31, Su Hui wrote:
Good catch, ioctl should return -errno. I will apply it to drm-next.
Reviewed-by: Philip Yang
---
Ps: When I try to compile this file, there is a error :
drivers/gpu/drm/amd/amdkfd/kfd_migrate.c:28:10: fatal error
Use kfree() to free 'args' before return '-EINVAL'.
Signed-off-by: Su Hui
---
drivers/gpu/drm/nouveau/nvif/vmm.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/nouveau/nvif/vmm.c
b/drivers/gpu/drm/nouveau/nvif/vmm.c
index 99296f03371a..a0afe3bf0d78 1006
'id' is enum type like unsigned int, so it will never be less than zero.
Fixes: 4aaf448fa975 ("vga_switcheroo: set audio client id according to bound
GPU id")
Signed-off-by: Su Hui
---
drivers/gpu/vga/vga_switcheroo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
On 2023/10/26 12:44, Dan Carpenter wrote:
On Thu, Oct 26, 2023 at 10:10:57AM +0800, Su Hui wrote:
'id' is enum type like unsigned int, so it will never be less than zero.
Fixes: 4aaf448fa975 ("vga_switcheroo: set audio client id according to bound GPU
id")
Signed-off-by: S
'id' is enum type like unsigned int, so it will never be less than zero.
It's better to check VGA_SWITCHEROO_UNKNOWN_ID too.
Fixes: 4aaf448fa975 ("vga_switcheroo: set audio client id according to bound
GPU id")
Signed-off-by: Su Hui
---
v2:
- add check of VGA_SW
ni_patch_single_dependency_table_based_on_leakage() return zero or
negative error code. But ni_patch_dependency_tables_based_on_leakage()
doesn't check the return value of the first function call. It's same for
ni_dpm_init(). It's better to add this error code check.
Signed
Clang static analyzer complains that value stored to 'ret' is never read.
Return the error code when spi_sync() failed.
Signed-off-by: Su Hui
---
drivers/video/backlight/ili922x.c | 4
1 file changed, 4 insertions(+)
diff --git a/drivers/video/backlight/ili922x.c
b/dri
kms/nv50-: create connectors based on nvkm
info")
Signed-off-by: Su Hui
---
drivers/gpu/drm/nouveau/nvkm/engine/disp/uconn.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/uconn.c
b/drivers/gpu/drm/nouveau/nvkm/engine/disp/uconn.c
kfree() because drmm_add_action_or_reset()
can free these by calling hw_engine_group_free().
Fixes: d16ef1a18e39 ("drm/xe/exec: Switch hw engine group execution mode upon
job submission")
Fixes: f784750c670f ("drm/xe/hw_engine_group: Introduce xe_hw_engine_group")
Signed-off-
On 2024/11/14 15:45, Vivekanandan, Balasubramani wrote:
On 14.11.2024 14:39, Su Hui wrote:
diff --git a/drivers/gpu/drm/xe/xe_hw_engine_group.c
b/drivers/gpu/drm/xe/xe_hw_engine_group.c
index 82750520a90a..ee2cb32817fa 100644
--- a/drivers/gpu/drm/xe/xe_hw_engine_group.c
+++ b/drivers/gpu/drm
group: Introduce xe_hw_engine_group")
Signed-off-by: Su Hui
---
drivers/gpu/drm/xe/xe_hw_engine_group.c | 31 ++---
1 file changed, 17 insertions(+), 14 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_hw_engine_group.c
b/drivers/gpu/drm/xe/xe_hw_engine_group.c
index 82
("accel/amdxdna: Support hardware mailbox")
Signed-off-by: Su Hui
---
drivers/accel/amdxdna/amdxdna_mailbox.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/accel/amdxdna/amdxdna_mailbox.c
b/drivers/accel/amdxdna/amdxdna_mailbox.c
index 814b16bb1953..80b4b20addd6 100644
---
On 2025/2/10 17:43, Jacek Lawrynowicz wrote:
Hi,
please move the header to the include block above an keep it sorted:
#include
-->#include <--
#include
Ok, I will send a v2 patch for this.
Su Hui
On 2/8/2025 9:05 AM, Su Hui wrote:
When compiling without CONFIG_IA32_EMULATION, the
: b87f920b9344 ("accel/amdxdna: Support hardware mailbox")
Signed-off-by: Su Hui
Reviewed-by: Lizhi Hou
---
v2:
- move the header to the include block above and keep it sorted(Jacek
Lawrynowicz).
drivers/accel/amdxdna/amdxdna_mailbox.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/dri
_INFO dev
query")
Signed-off-by: Su Hui
---
drivers/gpu/drm/panthor/panthor_drv.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/panthor/panthor_drv.c
b/drivers/gpu/drm/panthor/panthor_drv.c
index 0b3fbee3d37a..44f5c72d46c3 100644
--- a/drivers/gpu/drm/panthor/panth
On 2025/1/20 15:21, Dan Carpenter wrote:
On Sun, Jan 19, 2025 at 10:58:29AM +0800, Su Hui wrote:
'priorities_info' is uninitialized, and the uninitialized value is copied
to user object when calling PANTHOR_UOBJ_SET(). Using memset to initialize
'priorities_info' to avoi
On 2025/2/28 00:03, Lucas De Marchi wrote:
On Thu, Feb 27, 2025 at 03:32:06PM +0800, Su Hui wrote:
When build randconfig, there is an error:
ld: drivers/gpu/drm/xe/xe_vsec.o: in function `xe_vsec_init':
xe_vsec.c:(.text+0x182): undefined reference to `intel_vsec_register'
When CONFI
when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url:
https://github.com/intel-lab-lkp/linux/commits/Su-Hui/drm-xe-Select-INTEL_VSEC-to-fix-build-dependency/20250227-153437
base: https://gitlab.freed
ct INTEL_VSEC to fix this error.
Fixes: 0c45e76fcc62 ("drm/xe/vsec: Support BMG devices")
Signed-off-by: Su Hui
---
drivers/gpu/drm/xe/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/xe/Kconfig b/drivers/gpu/drm/xe/Kconfig
index b51a2bde73e2..7a60d96d2dd6 1006
On 2025/2/27 18:47, Jani Nikula wrote:
On Thu, 27 Feb 2025, Su Hui wrote:
When build randconfig, there is an error:
ld: drivers/gpu/drm/xe/xe_vsec.o: in function `xe_vsec_init':
xe_vsec.c:(.text+0x182): undefined reference to `intel_vsec_register'
When CONFIG_DRM_XE=y and CONFIG_IN
53 matches
Mail list logo