lkml.org 
[lkml]   [2025]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] Rename get_unused_fd_flags to get_unused_fd
On Sun, May 18, 2025 at 1:43 PM Carlos Llamas <cmllamas@google.com> wrote:
>
> I don't understand the "unused flags" argument. Did you interpret the
> current naming as "get the flags not used by a certain fd"?

Right

> If it helps, this kind of patches are usually tagged as "treewide:" and
> are often implemented using coccinelle scripts.

Oh neat, I had no idea about conccinelle: thanks for cluing me in

> Also, for this patch in particular I would:
> Cc: Al Viro <viro@zeniv.linux.org.uk>
> Cc: Christian Brauner <brauner@kernel.org>
>
> > diff --git a/drivers/android/binder.c b/drivers/android/binder.c
> > index 76052006bd87..e162d92e8c1d 100644
> > --- a/drivers/android/binder.c
> > +++ b/drivers/android/binder.c
> > @@ -4618,7 +4618,7 @@ static int binder_apply_fd_fixups(struct binder_proc *proc,
> > int ret = 0;
> >
> > list_for_each_entry(fixup, &t->fd_fixups, fixup_entry) {
> > - int fd = get_unused_fd_flags(O_CLOEXEC);
> > + int fd = get_unused_fd(O_CLOEXEC);
> >
> > if (fd < 0) {
> > binder_debug(BINDER_DEBUG_TRANSACTION,
>
> This is the only reason I found this patch (binder), and fwiw the
> renaming looks OK to me.
>
> Cheers,
> Carlos Llamas

\
 
 \ /
  Last update: 2025-05-20 20:21    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog