Re: [PATCH 2/2] staging: android: binder: use stack for locally used variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux