All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@stusta.de>
To: davej@codemonkey.org.uk
Cc: linux-kernel@vger.kernel.org
Subject: [2.6 patch] AGP: make some code static
Date: Sun, 30 Jan 2005 19:10:46 +0100	[thread overview]
Message-ID: <20050130181046.GS3185@stusta.de> (raw)

This patch makes some needlessly global code static.

Yes, I've read the comment in intel-mch-agp.c my patch removes - but 
agp_intelmch_init isn't called from anywhere outside of this file.

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

 drivers/char/agp/ali-agp.c       |    4 ++--
 drivers/char/agp/amd-k7-agp.c    |    2 +-
 drivers/char/agp/amd64-agp.c     |    2 +-
 drivers/char/agp/ati-agp.c       |    2 +-
 drivers/char/agp/backend.c       |    6 +++---
 drivers/char/agp/efficeon-agp.c  |    2 +-
 drivers/char/agp/frontend.c      |    6 +++---
 drivers/char/agp/intel-mch-agp.c |    4 +---
 drivers/char/agp/nvidia-agp.c    |    2 +-
 drivers/char/agp/sis-agp.c       |    2 +-
 drivers/char/agp/sworks-agp.c    |    2 +-
 drivers/char/agp/via-agp.c       |    4 ++--
 include/linux/agp_backend.h      |    2 --
 13 files changed, 18 insertions(+), 22 deletions(-)

--- linux-2.6.11-rc2-mm2-full/drivers/char/agp/ali-agp.c.old	2005-01-30 18:46:21.000000000 +0100
+++ linux-2.6.11-rc2-mm2-full/drivers/char/agp/ali-agp.c	2005-01-30 18:46:45.000000000 +0100
@@ -192,7 +192,7 @@
 	{4, 1024, 0, 3}
 };
 
-struct agp_bridge_driver ali_generic_bridge = {
+static struct agp_bridge_driver ali_generic_bridge = {
 	.owner			= THIS_MODULE,
 	.aperture_sizes		= ali_generic_sizes,
 	.size_type		= U32_APER_SIZE,
@@ -215,7 +215,7 @@
 	.agp_destroy_page	= ali_destroy_page,
 };
 
-struct agp_bridge_driver ali_m1541_bridge = {
+static struct agp_bridge_driver ali_m1541_bridge = {
 	.owner			= THIS_MODULE,
 	.aperture_sizes		= ali_generic_sizes,
 	.size_type		= U32_APER_SIZE,
--- linux-2.6.11-rc2-mm2-full/drivers/char/agp/amd-k7-agp.c.old	2005-01-30 18:46:58.000000000 +0100
+++ linux-2.6.11-rc2-mm2-full/drivers/char/agp/amd-k7-agp.c	2005-01-30 18:47:08.000000000 +0100
@@ -358,7 +358,7 @@
 	{.mask = 1, .type = 0}
 };
 
-struct agp_bridge_driver amd_irongate_driver = {
+static struct agp_bridge_driver amd_irongate_driver = {
 	.owner			= THIS_MODULE,
 	.aperture_sizes		= amd_irongate_sizes,
 	.size_type		= LVL2_APER_SIZE,
--- linux-2.6.11-rc2-mm2-full/drivers/char/agp/amd64-agp.c.old	2005-01-30 18:47:31.000000000 +0100
+++ linux-2.6.11-rc2-mm2-full/drivers/char/agp/amd64-agp.c	2005-01-30 18:47:39.000000000 +0100
@@ -243,7 +243,7 @@
 }
 
 
-struct agp_bridge_driver amd_8151_driver = {
+static struct agp_bridge_driver amd_8151_driver = {
 	.owner			= THIS_MODULE,
 	.aperture_sizes		= amd_8151_sizes,
 	.size_type		= U32_APER_SIZE,
--- linux-2.6.11-rc2-mm2-full/drivers/char/agp/ati-agp.c.old	2005-01-30 18:48:22.000000000 +0100
+++ linux-2.6.11-rc2-mm2-full/drivers/char/agp/ati-agp.c	2005-01-30 18:48:30.000000000 +0100
@@ -393,7 +393,7 @@
 	return 0;
 }
 
-struct agp_bridge_driver ati_generic_bridge = {
+static struct agp_bridge_driver ati_generic_bridge = {
 	.owner			= THIS_MODULE,
 	.aperture_sizes		= ati_generic_sizes,
 	.size_type		= LVL2_APER_SIZE,
--- linux-2.6.11-rc2-mm2-full/include/linux/agp_backend.h.old	2005-01-30 18:49:55.000000000 +0100
+++ linux-2.6.11-rc2-mm2-full/include/linux/agp_backend.h	2005-01-30 18:50:02.000000000 +0100
@@ -94,8 +94,6 @@
 extern struct agp_bridge_data *agp_bridge;
 extern struct list_head agp_bridges;
 
-extern struct agp_bridge_data *(*agp_find_bridge)(struct pci_dev *);
-
 extern void agp_free_memory(struct agp_memory *);
 extern struct agp_memory *agp_allocate_memory(struct agp_bridge_data *, size_t, u32);
 extern int agp_copy_info(struct agp_bridge_data *, struct agp_kern_info *);
--- linux-2.6.11-rc2-mm2-full/drivers/char/agp/backend.c.old	2005-01-30 18:48:45.000000000 +0100
+++ linux-2.6.11-rc2-mm2-full/drivers/char/agp/backend.c	2005-01-30 18:50:19.000000000 +0100
@@ -50,7 +50,7 @@
 	.minor = AGPGART_VERSION_MINOR,
 };
 
-struct agp_bridge_data *(*agp_find_bridge)(struct pci_dev *) =
+static struct agp_bridge_data *(*agp_find_bridge)(struct pci_dev *) =
 	&agp_generic_find_bridge;
 
 struct agp_bridge_data *agp_bridge;
@@ -96,7 +96,7 @@
 EXPORT_SYMBOL(agp_backend_release);
 
 
-struct { int mem, agp; } maxes_table[] = {
+static struct { int mem, agp; } maxes_table[] = {
 	{0, 0},
 	{32, 4},
 	{64, 28},
@@ -323,7 +323,7 @@
 	return 0;
 }
 
-void __exit agp_exit(void)
+static void __exit agp_exit(void)
 {
 }
 
--- linux-2.6.11-rc2-mm2-full/drivers/char/agp/efficeon-agp.c.old	2005-01-30 18:50:32.000000000 +0100
+++ linux-2.6.11-rc2-mm2-full/drivers/char/agp/efficeon-agp.c	2005-01-30 18:50:42.000000000 +0100
@@ -303,7 +303,7 @@
 }
 
 
-struct agp_bridge_driver efficeon_driver = {
+static struct agp_bridge_driver efficeon_driver = {
 	.owner			= THIS_MODULE,
 	.aperture_sizes		= efficeon_generic_sizes,
 	.size_type		= LVL2_APER_SIZE,
--- linux-2.6.11-rc2-mm2-full/drivers/char/agp/frontend.c.old	2005-01-30 18:50:57.000000000 +0100
+++ linux-2.6.11-rc2-mm2-full/drivers/char/agp/frontend.c	2005-01-30 18:51:27.000000000 +0100
@@ -235,7 +235,7 @@
 
 /* File private list routines */
 
-struct agp_file_private *agp_find_private(pid_t pid)
+static struct agp_file_private *agp_find_private(pid_t pid)
 {
 	struct agp_file_private *curr;
 
@@ -250,7 +250,7 @@
 	return NULL;
 }
 
-void agp_insert_file_private(struct agp_file_private * priv)
+static void agp_insert_file_private(struct agp_file_private * priv)
 {
 	struct agp_file_private *prev;
 
@@ -262,7 +262,7 @@
 	agp_fe.file_priv_list = priv;
 }
 
-void agp_remove_file_private(struct agp_file_private * priv)
+static void agp_remove_file_private(struct agp_file_private * priv)
 {
 	struct agp_file_private *next;
 	struct agp_file_private *prev;
--- linux-2.6.11-rc2-mm2-full/drivers/char/agp/intel-mch-agp.c.old	2005-01-30 18:51:48.000000000 +0100
+++ linux-2.6.11-rc2-mm2-full/drivers/char/agp/intel-mch-agp.c	2005-01-30 18:52:02.000000000 +0100
@@ -619,9 +619,7 @@
 	.resume		= agp_intelmch_resume,
 };
 
-/* intel_agp_init() must not be declared static for explicit
-   early initialization to work (ie i810fb) */
-int __init agp_intelmch_init(void)
+static int __init agp_intelmch_init(void)
 {
 	static int agp_initialised=0;
 	if (agp_off)
--- linux-2.6.11-rc2-mm2-full/drivers/char/agp/nvidia-agp.c.old	2005-01-30 18:52:18.000000000 +0100
+++ linux-2.6.11-rc2-mm2-full/drivers/char/agp/nvidia-agp.c	2005-01-30 18:52:26.000000000 +0100
@@ -288,7 +288,7 @@
 };
 
 
-struct agp_bridge_driver nvidia_driver = {
+static struct agp_bridge_driver nvidia_driver = {
 	.owner			= THIS_MODULE,
 	.aperture_sizes		= nvidia_generic_sizes,
 	.size_type		= U8_APER_SIZE,
--- linux-2.6.11-rc2-mm2-full/drivers/char/agp/sis-agp.c.old	2005-01-30 18:52:39.000000000 +0100
+++ linux-2.6.11-rc2-mm2-full/drivers/char/agp/sis-agp.c	2005-01-30 18:52:47.000000000 +0100
@@ -119,7 +119,7 @@
 	{4, 1024, 0, 3}
 };
 
-struct agp_bridge_driver sis_driver = {
+static struct agp_bridge_driver sis_driver = {
 	.owner			= THIS_MODULE,
 	.aperture_sizes 	= sis_generic_sizes,
 	.size_type		= U8_APER_SIZE,
--- linux-2.6.11-rc2-mm2-full/drivers/char/agp/sworks-agp.c.old	2005-01-30 18:52:59.000000000 +0100
+++ linux-2.6.11-rc2-mm2-full/drivers/char/agp/sworks-agp.c	2005-01-30 18:53:08.000000000 +0100
@@ -409,7 +409,7 @@
 	agp_device_command(command, 0);
 }
 
-struct agp_bridge_driver sworks_driver = {
+static struct agp_bridge_driver sworks_driver = {
 	.owner			= THIS_MODULE,
 	.aperture_sizes		= serverworks_sizes,
 	.size_type		= LVL2_APER_SIZE,
--- linux-2.6.11-rc2-mm2-full/drivers/char/agp/via-agp.c.old	2005-01-30 18:53:41.000000000 +0100
+++ linux-2.6.11-rc2-mm2-full/drivers/char/agp/via-agp.c	2005-01-30 18:54:19.000000000 +0100
@@ -162,7 +162,7 @@
 }
 
 
-struct agp_bridge_driver via_agp3_driver = {
+static struct agp_bridge_driver via_agp3_driver = {
 	.owner			= THIS_MODULE,
 	.aperture_sizes		= agp3_generic_sizes,
 	.size_type		= U8_APER_SIZE,
@@ -185,7 +185,7 @@
 	.agp_destroy_page	= agp_generic_destroy_page,
 };
 
-struct agp_bridge_driver via_driver = {
+static struct agp_bridge_driver via_driver = {
 	.owner			= THIS_MODULE,
 	.aperture_sizes		= via_generic_sizes,
 	.size_type		= U8_APER_SIZE,


             reply	other threads:[~2005-01-30 18:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-30 18:10 Adrian Bunk [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-02-24 23:38 [2.6 patch] AGP: make some code static Adrian Bunk
2005-03-11 18:16 Adrian Bunk

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=20050130181046.GS3185@stusta.de \
    --to=bunk@stusta.de \
    --cc=davej@codemonkey.org.uk \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.