diff options
| author | Willem de Bruijn <[email protected]> | 2024-12-03 22:17:34 +0000 |
|---|---|---|
| committer | Brian Cain <[email protected]> | 2025-01-31 02:44:54 +0000 |
| commit | 8a20030038742b9915c6d811a4e6c14b126cafb4 (patch) | |
| tree | 60189833d2d3a60a688d57c36e0879136d53b312 /drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | |
| parent | Merge tag 'bootconfig-fixes-v6.13' of git://git.kernel.org/pub/scm/linux/kern... (diff) | |
| download | kernel-8a20030038742b9915c6d811a4e6c14b126cafb4.tar.gz kernel-8a20030038742b9915c6d811a4e6c14b126cafb4.zip | |
hexagon: fix using plain integer as NULL pointer warning in cmpxchg
Sparse reports
net/ipv4/inet_diag.c:1511:17: sparse: sparse: Using plain integer as NULL pointer
Due to this code calling cmpxchg on a non-integer type
struct inet_diag_handler *
return !cmpxchg((const struct inet_diag_handler**)&inet_diag_table[type],
NULL, h) ? 0 : -EEXIST;
While hexagon's cmpxchg assigns an integer value to a variable of this
type.
__typeof__(*(ptr)) __oldval = 0;
Update this assignment to cast 0 to the correct type.
The original issue is easily reproduced at head with the below block,
and is absent after this change.
make LLVM=1 ARCH=hexagon defconfig
make C=1 LLVM=1 ARCH=hexagon net/ipv4/inet_diag.o
Fixes: 99a70aa051d2 ("Hexagon: Add processor and system headers")
Reported-by: kernel test robot <[email protected]>
Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
Signed-off-by: Willem de Bruijn <[email protected]>
Tested-by: Christian Gmeiner <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Brian Cain <[email protected]>
Signed-off-by: Brian Cain <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.c')
0 files changed, 0 insertions, 0 deletions
