lkml.org 
[lkml]   [2014]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 11/11] drivers: acpi: Include header file in debugfs.c and rectify prototype declaration in internal.h
Date
On Sunday, January 05, 2014 07:28:49 PM Josh Triplett wrote:
> On Mon, Jan 06, 2014 at 12:33:57AM +0100, Rafael J. Wysocki wrote:
> > On Tuesday, December 17, 2013 03:06:54 PM Rashika Kheria wrote:
> > > Include header file internal.h in debugfs.c and change the return
> > > value's type in header file internal.h.
> > >
> > > This eliminates the following warning in debugfs.c:
> > > drivers/acpi/debugfs.c:16:13: warning: no previous prototype for ‘acpi_debugfs_init’ [-Wmissing-prototypes]
> > >
> > > Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
> > > Reviewed-by: Josh Triplett <josh@joshtriplett.org>
> > > ---
> > > drivers/acpi/debugfs.c | 3 +++
> > > drivers/acpi/internal.h | 2 +-
> > > 2 files changed, 4 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/acpi/debugfs.c b/drivers/acpi/debugfs.c
> > > index b55d6a2..96bcaf7 100644
> > > --- a/drivers/acpi/debugfs.c
> > > +++ b/drivers/acpi/debugfs.c
> > > @@ -6,6 +6,7 @@
> > > #include <linux/init.h>
> > > #include <linux/debugfs.h>
> > > #include <acpi/acpi_drivers.h>
> > > +#include "internal.h"
> > >
> > > #define _COMPONENT ACPI_SYSTEM_COMPONENT
> > > ACPI_MODULE_NAME("debugfs");
> > > @@ -13,7 +14,9 @@ ACPI_MODULE_NAME("debugfs");
> > > struct dentry *acpi_debugfs_dir;
> > > EXPORT_SYMBOL_GPL(acpi_debugfs_dir);
> > >
> > > +#ifdef CONFIG_DEBUG_FS
> > > void __init acpi_debugfs_init(void)
> > > {
> > > acpi_debugfs_dir = debugfs_create_dir("acpi", NULL);
> > > }
> > > +#endif
> >
> > What about avoiding to build the entire debugfs.c for CONFIG_DEBUG_FS unset?
> >
> > That surely would make sense?
>
> It exports the symbol acpi_debugfs_dir, which is used unconditionally.

It's only used by drivers/acpi/custom_method.c which also should only be
compiled for CONFIG_DEBUG_FS set.

Thanks,
Rafael

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2014-01-06 12:21    [W:0.051 / U:0.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site