mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ipc/sem.c: use unsigned int for nsops
@ 2026-05-25  0:42 Yi Xie
  2026-05-27 12:10 ` Christian Brauner
  2026-05-27 15:54 ` Lorenzo Stoakes
  0 siblings, 2 replies; 3+ messages in thread
From: Yi Xie @ 2026-05-25  0:42 UTC (permalink / raw)
  To: Christian Brauner, Lorenzo Stoakes; +Cc: linux-kernel, Yi Xie

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

Signed-off-by: Yi Xie <xieyi@kylinos.cn>
---
 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ipc/sem.c: use unsigned int for nsops
  2026-05-25  0:42 [PATCH] ipc/sem.c: use unsigned int for nsops Yi Xie
@ 2026-05-27 12:10 ` Christian Brauner
  2026-05-27 15:54 ` Lorenzo Stoakes
  1 sibling, 0 replies; 3+ messages in thread
From: Christian Brauner @ 2026-05-27 12:10 UTC (permalink / raw)
  To: Lorenzo Stoakes, Yi Xie; +Cc: Christian Brauner, linux-kernel

On Mon, 25 May 2026 08:42:20 +0800, Yi Xie wrote:
> Use unsigned int instead of unsigned for nsops parameter,
> to match declaration in syscalls.h.

Applied to the kernel-7.2.misc branch of the vfs/vfs.git tree.
Patches in the kernel-7.2.misc branch should appear in linux-next soon.

Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.

It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.

Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: kernel-7.2.misc

[1/1] ipc/sem.c: use unsigned int for nsops
      https://git.kernel.org/vfs/vfs/c/69d18b6c900c

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ipc/sem.c: use unsigned int for nsops
  2026-05-25  0:42 [PATCH] ipc/sem.c: use unsigned int for nsops Yi Xie
  2026-05-27 12:10 ` Christian Brauner
@ 2026-05-27 15:54 ` Lorenzo Stoakes
  1 sibling, 0 replies; 3+ messages in thread
From: Lorenzo Stoakes @ 2026-05-27 15:54 UTC (permalink / raw)
  To: Yi Xie; +Cc: Christian Brauner, linux-kernel

On Mon, May 25, 2026 at 08:42:20AM +0800, Yi Xie wrote:
> Use unsigned int instead of unsigned for nsops parameter,
> to match declaration in syscalls.h.
>
> Signed-off-by: Yi Xie <xieyi@kylinos.cn>

Pretty sure I R-b'd this :P (didn't I?) not sure if too late since Christian
took but FWIW:

Reviewed-by: Lorenzo Stoakes <ljs@kernel.org>

Cheers, Lorenzo

> ---
>  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
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-05-27 15:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-25  0:42 [PATCH] ipc/sem.c: use unsigned int for nsops Yi Xie
2026-05-27 12:10 ` Christian Brauner
2026-05-27 15:54 ` Lorenzo Stoakes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®