net: wwan: iosm: use int type to store negative error codes
Subsystems (4)
PATCH 1/1 net: wwan: iosm: use int type to store negative error codes
The 'ret' variable in ipc_pcie_resources_request() either stores '-EBUSY' directly or holds returns from pci_request_regions() and ipc_acquire_irq(). Storing negative error codes in u32 causes no runtime issues but is stylistically inconsistent and very ugly. Change 'ret' from u32 to int type - this has no runtime impact.
--- drivers/net/wwan/iosm/iosm_ipc_pcie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wwan/iosm/iosm_ipc_pcie.c +1 -1
@@ -69,7 +69,7 @@ static int ipc_pcie_resources_request(struct iosm_pcie *ipc_pcie) {struct pci_dev *pci = ipc_pcie->pci;u32 cap =0 ; -u32 ret; +int ret;/* Reserved PCI I/O and memory resources. * Mark all PCI regions associated with PCI device pci as
Signature · 1 line
2.34.1
Quoted 8 lines · Qianfeng Rong
The 'ret' variable in
ipc_pcie_resources_request()either stores '-EBUSY' directly or holds returns frompci_request_regions()andipc_acquire_irq(). Storing negative error codes in u32 causes no runtime issues but is stylistically inconsistent and very ugly. Change 'ret' from u32 to int type - this has no runtime impact.Signed-off-by Qianfeng Rong <[email protected]>
Quoted 19 lines
drivers/net/wwan/iosm/iosm_ipc_pcie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/wwan/iosm/iosm_ipc_pcie.c +1
-2@@ -69,7 +69,7 @@ static int ipc_pcie_resources_request(struct iosm_pcie *ipc_pcie) {struct pci_dev *pci = ipc_pcie->pci;u32 cap =0 ; -u32 ret; +int ret;/* Reserved PCI I/O and memory resources. * Mark all PCI regions associated with PCI device pci as -- 2.34.1
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 9 lines · On Tue, 26 Aug 2025 21:50:19 +0800 you wrote:
The 'ret' variable in
ipc_pcie_resources_request()either stores '-EBUSY' directly or holds returns frompci_request_regions()andipc_acquire_irq(). Storing negative error codes in u32 causes no runtime issues but is stylistically inconsistent and very ugly. Change 'ret' from u32 to int type - this has no runtime impact.Signed-off-by Qianfeng Rong <[email protected]>[...]
Here is the summary with links:
- net: wwan: iosm: use int type to store negative error codes
https://git.kernel.org/netdev/net-next/c/f0c88a0d83b2
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
Quoted 16 lines · Qianfeng Rong
The 'ret' variable in
ipc_pcie_resources_request()either stores '-EBUSY' directly or holds returns frompci_request_regions()andipc_acquire_irq(). Storing negative error codes in u32 causes no runtime issues but is stylistically inconsistent and very ugly. Change 'ret' from u32 to int type - this has no runtime impact.Signed-off-by Qianfeng Rong <[email protected]>--- drivers/net/wwan/iosm/iosm_ipc_pcie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/wwan/iosm/iosm_ipc_pcie.c +0
-0
drivers/net/wwan/iosm/iosm_ipc_pcie.c static int ipc_pcie_resources_request(struct iosm_pcie *ipc_pcie) · line 75
Quoted 8 lines
drivers/net/wwan/iosm/iosm_ipc_pcie.c +1
-1@@ -69,7 +69,7 @@ static int ipc_pcie_resources_request(struct iosm_pcie *ipc_pcie) {struct pci_dev *pci = ipc_pcie->pci;u32 cap =0 ; -u32 ret; +int ret;/* Reserved PCI I/O and memory resources. * Mark all PCI regions associated with PCI device pci as
Thanks,
Maciej