[PATCH] ipc/sem.c: use unsigned int for nsops

From: Yi Xie

Date: Sun May 24 2026 - 20:42:58 EST


Use unsigned int instead of unsigned for nsops parameter,
to match declaration in syscalls.h.

Signed-off-by: Yi Xie <xieyi@xxxxxxxxxx>
---
ipc/sem.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ipc/sem.c b/ipc/sem.c
index 6cdf862b1f5c..5ec41de7e85b 100644
--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -1981,7 +1981,7 @@ static struct sem_undo *find_alloc_undo(struct ipc_namespace *ns, int semid)
}

long __do_semtimedop(int semid, struct sembuf *sops,
- unsigned nsops, const struct timespec64 *timeout,
+ unsigned int nsops, const struct timespec64 *timeout,
struct ipc_namespace *ns)
{
int error = -EINVAL;
@@ -2220,7 +2220,7 @@ long __do_semtimedop(int semid, struct sembuf *sops,
}

static long do_semtimedop(int semid, struct sembuf __user *tsops,
- unsigned nsops, const struct timespec64 *timeout)
+ unsigned int nsops, const struct timespec64 *timeout)
{
struct sembuf fast_sops[SEMOPM_FAST];
struct sembuf *sops = fast_sops;
@@ -2294,7 +2294,7 @@ SYSCALL_DEFINE4(semtimedop_time32, int, semid, struct sembuf __user *, tsems,
#endif

SYSCALL_DEFINE3(semop, int, semid, struct sembuf __user *, tsops,
- unsigned, nsops)
+ unsigned int, nsops)
{
return do_semtimedop(semid, tsops, nsops, NULL);
}
--
2.25.1