public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Stelian Pop <stelian@popies.net>
To: Adrian Bunk <bunk@stusta.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [2.6 patch] drivers/char/sonypi.c: make 3 structs static
Date: Mon, 31 Jan 2005 22:49:05 +0100	[thread overview]
Message-ID: <20050131214905.GF28886@deep-space-9.dsnet> (raw)
In-Reply-To: <20050131173508.GS18316@stusta.de>

On Mon, Jan 31, 2005 at 06:35:08PM +0100, Adrian Bunk wrote:

> This patch makes three needlessly global structs static.
> 
> Signed-off-by: Adrian Bunk <bunk@stusta.de>
> 
> ---
> 
>  drivers/char/sonypi.c |   76 +++++++++++++++++++++++++++++++++++++++++-
>  drivers/char/sonypi.h |   74 ----------------------------------------
>  2 files changed, 75 insertions(+), 75 deletions(-)

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).

What about:

 sonypi.c |    2 +-
 sonypi.h |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

Index: drivers/char/sonypi.h
===================================================================
--- a/drivers/char/sonypi.h	(revision 26543)
+++ b/drivers/char/sonypi.h	(working copy)
@@ -304,7 +304,7 @@ static struct sonypi_event sonypi_batter
 	{ 0, 0 }
 };
 
-struct sonypi_eventtypes {
+static struct sonypi_eventtypes {
 	int			model;
 	u8			data;
 	unsigned long		mask;
@@ -347,7 +347,7 @@ struct sonypi_eventtypes {
 #define SONYPI_KEY_INPUTNAME	"Sony Vaio Keys"
 
 /* Correspondance table between sonypi events and input layer events */
-struct {
+static struct {
 	int sonypiev;
 	int inputev;
 } sonypi_inputkeys[] = {
Index: drivers/char/sonypi.c
===================================================================
--- a/drivers/char/sonypi.c	(revision 26543)
+++ b/drivers/char/sonypi.c	(working copy)
@@ -645,7 +645,7 @@ static struct file_operations sonypi_mis
 	.ioctl		= sonypi_misc_ioctl,
 };
 
-struct miscdevice sonypi_misc_device = {
+static struct miscdevice sonypi_misc_device = {
 	.minor		= -1,
 	.name		= "sonypi",
 	.fops		= &sonypi_misc_fops,
> 

-- 
Stelian Pop <stelian@popies.net>

  reply	other threads:[~2005-01-31 21:49 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 [this message]
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

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=20050131214905.GF28886@deep-space-9.dsnet \
    --to=stelian@popies.net \
    --cc=bunk@stusta.de \
    --cc=linux-kernel@vger.kernel.org \
    /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