lkml.org 
[lkml]   [2005]   [Jan]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [2.6 patch] drivers/char/sonypi.c: make 3 structs static
On Mon, 31 Jan 2005 23:27:54 +0100, Stelian Pop <stelian@popies.net> wrote:
> On Mon, Jan 31, 2005 at 05:13:22PM -0500, Dmitry Torokhov wrote:
>
> > On Mon, 31 Jan 2005 22:49:05 +0100, Stelian Pop <stelian@popies.net> wrote:
> > >
> > > sonypi.h is a "local" header file used only by sonypi.c.
> > >
> > > I would like to keep those tables in sonypi.h rather than putting
> > > all into sonypi.c (or we could as well remove sonypi.h and put all the
> > > contents into the .c).
> > >
> >
> > Hi,
> >
> > What is the point of having an .h file if it is not used by anyone?
> > Judging by the fact that it completely protected by #ifdef __KERNEL__
> > there should be no userspace clients either.
> >
> > I always thought that the only time .h is needed is when you define
> > interface to your code. I'd fold it to sonpypi.c.
>
> It isn't strictly *needed*, but it does separate a bit the data
> structures and the constants (in the .h) from the code (in the .c).

Right, but why is it a good thing? Is it more convenient to
review/edit 2 files instead of one? And that header even defines (as
opposed to declaring) bunch of static variables in header file. They
are internal to the module, they do not form an _interface_.

--
Dmitry
-
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: 2005-03-22 14:10    [W:0.431 / U:0.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site