public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: SeongJae Park <sj38.park@gmail.com>
Cc: devel@driverdev.osuosl.org, swetland@google.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] staging: android: binder: use stack for locally used variable
Date: Tue, 18 Feb 2014 09:07:31 -0800	[thread overview]
Message-ID: <20140218170730.GA32227@kroah.com> (raw)
In-Reply-To: <1392722606-965-2-git-send-email-sj38.park@gmail.com>

On Tue, Feb 18, 2014 at 08:23:26PM +0900, SeongJae Park wrote:
> The variable `binder_debugfs_dir_entry_root` is declared as static
> global variable although it is accessed from init function only. Declare
> it as init function's local variable because it would be better to read
> and memory efficiency.

Are you sure?  You now just lost that pointer and it can never be freed.

Not that it ever was, but before it was obvious as to what would need to
be done if the module could ever be made to be unloaded...

As it is, this code is fine, I can't take this patch.

greg k-h

  reply	other threads:[~2014-02-18 17:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-18 11:23 [PATCH 1/2] staging: android: binder: remove unnecessary comment SeongJae Park
2014-02-18 11:23 ` [PATCH 2/2] staging: android: binder: use stack for locally used variable SeongJae Park
2014-02-18 17:07   ` Greg KH [this message]
2014-02-19  0:31     ` SeongJae Park
2014-02-18 17:07 ` [PATCH 1/2] staging: android: binder: remove unnecessary comment Greg KH
2014-02-19  0:28   ` SeongJae Park
2014-02-19  3:04     ` Sachin Kamat
2014-02-19  3:11       ` SeongJae Park

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=20140218170730.GA32227@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=devel@driverdev.osuosl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sj38.park@gmail.com \
    --cc=swetland@google.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