diff options
| author | Alok Tiwari <alok.a.tiwari@oracle.com> | 2026-01-03 09:43:10 -0800 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-01-05 16:18:03 -0800 |
| commit | 32291cb0369aa56946b3a0768a7d54f9490a83ce (patch) | |
| tree | 1866e727cad33fbae6937be2bd9dbf6871d3c5b8 /include/net/inet_frag.h | |
| parent | 2e229771543b2b20e1fe29da00df80c917469449 (diff) | |
net: marvell: prestera: correct return type of prestera_ldr_wait_buf()davem/net-next/maindavem/net-next/HEAD
prestera_ldr_wait_buf() returns the result of readl_poll_timeout(),
which is 0 on success or -ETIMEDOUT on failure. Its current return
type is u32.
Assigning this u32 value to an int variable works today because the
bit pattern of (u32)-ETIMEDOUT (0xffffff92) is correctly interpreted
as -ETIMEDOUT when stored in an int. However, keeping the function
return type as u32 is misleading and fragile.
Change the return type to int to reflect the actual semantic of
returning negative error codes and to avoid potential issues with
unsigned casts. There is no functional change.
Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20260103174313.1172197-1-alok.a.tiwari@oracle.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/net/inet_frag.h')
0 files changed, 0 insertions, 0 deletions
