-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] [Deepin Kernel SIG] Fix errors with clang-19 #499
[WIP] [Deepin Kernel SIG] Fix errors with clang-19 #499
Conversation
Fix follow error with clang-19: drivers/pwm/pwm-phytium.c:233:2: error: variable 'dbcly' is uninitialized when used here [-Werror,-Wuninitialized] 233 | dbcly &= 0x0; | ^~~~~ drivers/pwm/pwm-phytium.c:226:11: note: initialize the variable 'dbcly' to silence this warning 226 | u64 dbcly, cycles, upcycles, dwcycles; | ^ | = 0 1 error generated. Signed-off-by: WangYuli <[email protected]>
…lang Fix follow errors with clang-19: sound/soc/phytium/phytium_i2s.c:979:18: error: variable 'bus_widths' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration] 979 | static const u32 bus_widths[COMP_MAX_DATA_WIDTH] = { | ^~~~~~~~~~ sound/soc/phytium/phytium_i2s.c:987:18: error: variable 'formats' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration] 987 | static const u32 formats[COMP_MAX_WORDSIZE] = { | ^~~~~~~ 2 errors generated. Signed-off-by: WangYuli <[email protected]>
Fix follow error with clang-19: drivers/i3c/master/i3c-master-phytium.c:1710:7: error: variable 'ret' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] 1710 | if (!master->prescl0) | ^~~~~~~~~~~~~~~~ drivers/i3c/master/i3c-master-phytium.c:1788:9: note: uninitialized use occurs here 1788 | return ret; | ^~~ drivers/i3c/master/i3c-master-phytium.c:1710:3: note: remove the 'if' if its condition is always false 1710 | if (!master->prescl0) | ^~~~~~~~~~~~~~~~~~~~~ 1711 | goto err_disable_sysclk; | ~~~~~~~~~~~~~~~~~~~~~~~ drivers/i3c/master/i3c-master-phytium.c:1669:9: note: initialize the variable 'ret' to silence this warning 1669 | int ret, irq; | ^ | = 0 1 error generated. Signed-off-by: WangYuli <[email protected]>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
According to KVM documention for LoongArch, 'v0' should be 'a0'. And 'a0' has been there upstream. Fix follow compile errors with clang-19: In file included from ./include/uapi/linux/kvm_para.h:41: ./arch/loongarch/include/asm/kvm_para.h:44:24: error: unknown register name 'v0' in asm 44 | register long ret asm("v0"); | ^ ./arch/loongarch/include/asm/kvm_para.h:59:24: error: unknown register name 'v0' in asm 59 | register long ret asm("v0"); | ^ ./arch/loongarch/include/asm/kvm_para.h:76:24: error: unknown register name 'v0' in asm 76 | register long ret asm("v0"); | ^ ./arch/loongarch/include/asm/kvm_para.h:94:24: error: unknown register name 'v0' in asm 94 | register long ret asm("v0"); | ^ ./arch/loongarch/include/asm/kvm_para.h:114:24: error: unknown register name 'v0' in asm 114 | register long ret asm("v0"); | ^ ./arch/loongarch/include/asm/kvm_para.h:135:24: error: unknown register name 'v0' in asm 135 | register long ret asm("v0"); | ^ 6 errors generated. Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e33bda7ee50c3c20d80f5ca6dc5ca2cd37863518 Signed-off-by: Mingcong Bai <[email protected]> Signed-off-by: WangYuli <[email protected]>
Fix follow error with clang-19: arch/loongarch/kernel/legacy_boot.c:687:28: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] 687 | void __init acpi_arch_init (){ | ^ | void 1 error generated. Signed-off-by: WangYuli <[email protected]>
d90a401
to
24a26ae
Compare
Fix follow compile errors with clang-19: drivers/net/ethernet/motorcomm/yt6801/fuxi-gmac-desc.c:478:14: error: explicitly assigning value of variable of type 'int' to itself [-Werror,-Wself-assign] 478 | start_index = start_index; | ~~~~~~~~~~~ ^ ~~~~~~~~~~~ 1 error generated. drivers/net/ethernet/motorcomm/yt6801/fuxi-gmac-hw.c:497:8: error: explicitly assigning value of variable of type 'struct fxgmac_pdata *' to itself [-Werror,-Wself-assign] 497 | pdata = pdata; | ~~~~~ ^ ~~~~~ drivers/net/ethernet/motorcomm/yt6801/fuxi-gmac-hw.c:623:8: error: explicitly assigning value of variable of type 'struct fxgmac_pdata *' to itself [-Werror,-Wself-assign] 623 | pdata = pdata; | ~~~~~ ^ ~~~~~ drivers/net/ethernet/motorcomm/yt6801/fuxi-gmac-hw.c:1232:8: error: explicitly assigning value of variable of type 'struct fxgmac_pdata *' to itself [-Werror,-Wself-assign] 1232 | pdata = pdata; | ~~~~~ ^ ~~~~~ drivers/net/ethernet/motorcomm/yt6801/fuxi-gmac-hw.c:2321:7: error: explicitly assigning value of variable of type 'unsigned int' to itself [-Werror,-Wself-assign] 2321 | type = type; | ~~~~ ^ ~~~~ drivers/net/ethernet/motorcomm/yt6801/fuxi-gmac-hw.c:4566:9: error: explicitly assigning value of variable of type 'int' to itself [-Werror,-Wself-assign] 4566 | int_id = int_id; | ~~~~~~ ^ ~~~~~~ drivers/net/ethernet/motorcomm/yt6801/fuxi-gmac-hw.c:4888:8: error: explicitly assigning value of variable of type 'int' to itself [-Werror,-Wself-assign] 4888 | speed = speed; | ~~~~~ ^ ~~~~~ 6 errors generated. Signed-off-by: WangYuli <[email protected]>
24a26ae
to
162b371
Compare
deepin pr auto review代码审查意见:
以上是代码审查的初步意见,需要进一步确认这些更改是否符合LoongArch架构的调用约定和代码风格规范。 |
No description provided.