[PATCH 05/12] tools/nolibc: remove now superfluous overflow check in llseek

Thomas Weißschuh posted 12 patches 3 months, 1 week ago
[PATCH 05/12] tools/nolibc: remove now superfluous overflow check in llseek
Posted by Thomas Weißschuh 3 months, 1 week ago
As off_t is now always 64-bit wide this overflow can not happen anymore,
remove the check.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
 tools/include/nolibc/sys.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/tools/include/nolibc/sys.h b/tools/include/nolibc/sys.h
index 58cd2bb0f6ce..e91b7d947161 100644
--- a/tools/include/nolibc/sys.h
+++ b/tools/include/nolibc/sys.h
@@ -600,8 +600,6 @@ off_t sys_lseek(int fd, off_t offset, int whence)
 	ret = my_syscall5(__NR_llseek, fd, offset >> 32, (uint32_t)offset, &loff, whence);
 	if (ret < 0)
 		result = ret;
-	else if (loff != (off_t)loff)
-		result = -EOVERFLOW;
 	else
 		result = loff;
 

-- 
2.51.1.dirty

Re: [PATCH 05/12] tools/nolibc: remove now superfluous overflow check in llseek
Posted by Arnd Bergmann 3 months, 1 week ago
On Wed, Oct 29, 2025, at 17:02, Thomas Weißschuh wrote:
> As off_t is now always 64-bit wide this overflow can not happen anymore,
> remove the check.
>
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>

Reviewed-by: Arnd Bergmann <arnd@arndb.de>