From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Carlos Llamas <cmllamas@google.com>
Cc: "Arve Hjønnevåg" <arve@android.com>,
"Todd Kjos" <tkjos@android.com>,
"Martijn Coenen" <maco@android.com>,
"Christian Brauner" <brauner@kernel.org>,
"Joel Fernandes" <joel@joelfernandes.org>,
"Hridya Valsaraju" <hridya@google.com>,
"Suren Baghdasaryan" <surenb@google.com>,
kernel-team@android.com, linux-kernel@vger.kernel.org,
"kernel test robot" <lkp@intel.com>
Subject: Re: [PATCH] binder: fix redefinition of seq_file attributes
Date: Mon, 4 Jul 2022 18:13:40 +0200 [thread overview]
Message-ID: <YsMRtGg8xQ2Qicr2@kroah.com> (raw)
In-Reply-To: <20220701182041.2134313-1-cmllamas@google.com>
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
next prev parent reply other threads:[~2022-07-04 16:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-01 18:20 Carlos Llamas
2022-07-04 16:13 ` Greg Kroah-Hartman [this message]
2022-07-07 21:21 ` Carlos Llamas
2022-07-08 6:00 ` Greg Kroah-Hartman
2022-07-08 14:30 ` Carlos Llamas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YsMRtGg8xQ2Qicr2@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=arve@android.com \
--cc=brauner@kernel.org \
--cc=cmllamas@google.com \
--cc=hridya@google.com \
--cc=joel@joelfernandes.org \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=maco@android.com \
--cc=surenb@google.com \
--cc=tkjos@android.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®