From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Stelian Pop <stelian@popies.net>,
dtor_core@ameritech.net, Adrian Bunk <bunk@stusta.de>,
linux-kernel@vger.kernel.org
Subject: Re: [2.6 patch] drivers/char/sonypi.c: make 3 structs static
Date: Mon, 31 Jan 2005 17:39:10 -0500 [thread overview]
Message-ID: <d120d5000501311439261775f@mail.gmail.com> (raw)
In-Reply-To: <20050131222753.GG28886@deep-space-9.dsnet>
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
prev parent reply other threads:[~2005-01-31 22:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-31 17:35 [2.6 patch] drivers/char/sonypi.c: make 3 structs static Adrian Bunk
2005-01-31 21:49 ` Stelian Pop
2005-01-31 21:53 ` Adrian Bunk
2005-01-31 22:13 ` Dmitry Torokhov
2005-01-31 22:27 ` Stelian Pop
2005-01-31 22:39 ` Dmitry Torokhov [this message]
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=d120d5000501311439261775f@mail.gmail.com \
--to=dmitry.torokhov@gmail.com \
--cc=bunk@stusta.de \
--cc=dtor_core@ameritech.net \
--cc=linux-kernel@vger.kernel.org \
--cc=stelian@popies.net \
/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