* [PATCH net] net: ti: icss-iep: Fix incorrect type for return value in extts_enable()
@ 2025-08-05 14:23 Alok Tiwari
2025-08-05 15:01 ` Andrew Lunn
2025-08-08 20:10 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Alok Tiwari @ 2025-08-05 14:23 UTC (permalink / raw)
To: danishanwar, rogerq, m-malladi, andrew+netdev, davem, edumazet,
kuba, pabeni, horms, netdev
Cc: alok.a.tiwari, linux-arm-kernel
The variable ret in icss_iep_extts_enable() was incorrectly declared
as u32, while the function returns int and may return negative error
codes. This will cause sign extension issues and incorrect error
propagation. Update ret to be int to fix error handling.
This change corrects the declaration to avoid potential type mismatch.
Fixes: c1e0230eeaab ("net: ti: icss-iep: Add IEP driver")
Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
---
drivers/net/ethernet/ti/icssg/icss_iep.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/ti/icssg/icss_iep.c b/drivers/net/ethernet/ti/icssg/icss_iep.c
index 2a1c43316f46..6d31c274281f 100644
--- a/drivers/net/ethernet/ti/icssg/icss_iep.c
+++ b/drivers/net/ethernet/ti/icssg/icss_iep.c
@@ -621,7 +621,8 @@ static int icss_iep_pps_enable(struct icss_iep *iep, int on)
static int icss_iep_extts_enable(struct icss_iep *iep, u32 index, int on)
{
- u32 val, cap, ret = 0;
+ u32 val, cap;
+ int ret = 0;
mutex_lock(&iep->ptp_clk_mutex);
--
2.47.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] net: ti: icss-iep: Fix incorrect type for return value in extts_enable()
2025-08-05 14:23 [PATCH net] net: ti: icss-iep: Fix incorrect type for return value in extts_enable() Alok Tiwari
@ 2025-08-05 15:01 ` Andrew Lunn
2025-08-08 20:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Andrew Lunn @ 2025-08-05 15:01 UTC (permalink / raw)
To: Alok Tiwari
Cc: danishanwar, rogerq, m-malladi, andrew+netdev, davem, edumazet,
kuba, pabeni, horms, netdev, linux-arm-kernel
On Tue, Aug 05, 2025 at 07:23:18AM -0700, Alok Tiwari wrote:
> The variable ret in icss_iep_extts_enable() was incorrectly declared
> as u32, while the function returns int and may return negative error
> codes. This will cause sign extension issues and incorrect error
> propagation. Update ret to be int to fix error handling.
>
> This change corrects the declaration to avoid potential type mismatch.
>
> Fixes: c1e0230eeaab ("net: ti: icss-iep: Add IEP driver")
> Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] net: ti: icss-iep: Fix incorrect type for return value in extts_enable()
2025-08-05 14:23 [PATCH net] net: ti: icss-iep: Fix incorrect type for return value in extts_enable() Alok Tiwari
2025-08-05 15:01 ` Andrew Lunn
@ 2025-08-08 20:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-08-08 20:10 UTC (permalink / raw)
To: Alok Tiwari
Cc: danishanwar, rogerq, m-malladi, andrew+netdev, davem, edumazet,
kuba, pabeni, horms, netdev, linux-arm-kernel
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Tue, 5 Aug 2025 07:23:18 -0700 you wrote:
> The variable ret in icss_iep_extts_enable() was incorrectly declared
> as u32, while the function returns int and may return negative error
> codes. This will cause sign extension issues and incorrect error
> propagation. Update ret to be int to fix error handling.
>
> This change corrects the declaration to avoid potential type mismatch.
>
> [...]
Here is the summary with links:
- [net] net: ti: icss-iep: Fix incorrect type for return value in extts_enable()
https://git.kernel.org/netdev/net/c/5f1d1d14db7d
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-08-08 20:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-05 14:23 [PATCH net] net: ti: icss-iep: Fix incorrect type for return value in extts_enable() Alok Tiwari
2025-08-05 15:01 ` Andrew Lunn
2025-08-08 20:10 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).