[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YsMRtGg8xQ2Qicr2@kroah.com>
Date: Mon, 4 Jul 2022 18:13:40 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Carlos Llamas <cmllamas@...gle.com>
Cc: Arve Hjønnevåg <arve@...roid.com>,
Todd Kjos <tkjos@...roid.com>,
Martijn Coenen <maco@...roid.com>,
Christian Brauner <brauner@...nel.org>,
Joel Fernandes <joel@...lfernandes.org>,
Hridya Valsaraju <hridya@...gle.com>,
Suren Baghdasaryan <surenb@...gle.com>,
kernel-team@...roid.com, linux-kernel@...r.kernel.org,
kernel test robot <lkp@...el.com>
Subject: Re: [PATCH] binder: fix redefinition of seq_file attributes
On Fri, Jul 01, 2022 at 06:20:41PM +0000, Carlos Llamas wrote:
> + binder_for_each_debugfs_entry(db_entry) {
> + dentry = binderfs_create_file(binder_logs_root_dir,
> + db_entry->name,
> + db_entry->fops,
> + db_entry->data);
> + if (IS_ERR(dentry)) {
> + ret = PTR_ERR(dentry);
> + goto out;
> + }
I know this is a copy of what is there already, but there is never a
need to check the result of a debugfs_create_* call. Just call it and
move on, never "abort" based on the result of a debugfs call, that's not
a good idea.
So can you change this here, or want to send a follow-on patch that
removes these checks?
> }
>
> proc_log_dir = binderfs_create_dir(binder_logs_root_dir, "proc");
Also there's never a need to save a directory, you can always look it up
when you want to remove it.
thanks,
greg k-h
Powered by blists - more mailing lists