Message ID | 20201103081016.16532-1-song.bao.hua@hisilicon.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | mm/gup_benchmark: mark gup_benchmark_init as __init function | expand |
On Tue, Nov 03, 2020 at 09:10:16PM +1300, Barry Song wrote: > gup_benchmark_init() is only called during initialization, mark it as > __init to save some memory. > > Cc: John Hubbard <jhubbard@nvidia.com> > Cc: Jan Kara <jack@suse.cz> > Cc: Jérôme Glisse <jglisse@redhat.com> > Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org> > Cc: Al Viro <viro@zeniv.linux.org.uk> > Cc: Christoph Hellwig <hch@infradead.org> > Cc: Dan Williams <dan.j.williams@intel.com> > Cc: Dave Chinner <david@fromorbit.com> > Cc: Jason Gunthorpe <jgg@ziepe.ca> > Cc: Jonathan Corbet <corbet@lwn.net> > Cc: Michal Hocko <mhocko@suse.com> > Cc: Mike Kravetz <mike.kravetz@oracle.com> > Cc: Shuah Khan <shuah@kernel.org> > Cc: Vlastimil Babka <vbabka@suse.cz> > Signed-off-by: Barry Song <song.bao.hua@hisilicon.com> > --- > mm/gup_benchmark.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Hardly seems worthwhile, but looks correct Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Jason
diff --git a/mm/gup_benchmark.c b/mm/gup_benchmark.c index 8b3e5b5..1d10553 100644 --- a/mm/gup_benchmark.c +++ b/mm/gup_benchmark.c @@ -199,7 +199,7 @@ static const struct file_operations gup_benchmark_fops = { .unlocked_ioctl = gup_benchmark_ioctl, }; -static int gup_benchmark_init(void) +static int __init gup_benchmark_init(void) { debugfs_create_file_unsafe("gup_benchmark", 0600, NULL, NULL, &gup_benchmark_fops);
gup_benchmark_init() is only called during initialization, mark it as __init to save some memory. Cc: John Hubbard <jhubbard@nvidia.com> Cc: Jan Kara <jack@suse.cz> Cc: Jérôme Glisse <jglisse@redhat.com> Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Christoph Hellwig <hch@infradead.org> Cc: Dan Williams <dan.j.williams@intel.com> Cc: Dave Chinner <david@fromorbit.com> Cc: Jason Gunthorpe <jgg@ziepe.ca> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Michal Hocko <mhocko@suse.com> Cc: Mike Kravetz <mike.kravetz@oracle.com> Cc: Shuah Khan <shuah@kernel.org> Cc: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Barry Song <song.bao.hua@hisilicon.com> --- mm/gup_benchmark.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)