[rtems commit] bsps/sparc: Make local functions for amba plug&play static.

Joel Sherrill joel at rtems.org
Mon Mar 24 16:38:09 UTC 2014


Module:    rtems
Branch:    master
Commit:    67a4842b59c8c355be7d80ee1672541422ded80f
Changeset: http://git.rtems.org/rtems/commit/?id=67a4842b59c8c355be7d80ee1672541422ded80f

Author:    Daniel Cederman <cederman at gaisler.com>
Date:      Mon Mar 24 08:54:15 2014 +0100

bsps/sparc: Make local functions for amba plug&play static.

---

 c/src/lib/libbsp/sparc/shared/amba/ambapp.c       |   12 ++++++------
 c/src/lib/libbsp/sparc/shared/amba/ambapp_freq.c  |    2 +-
 c/src/lib/libbsp/sparc/shared/amba/ambapp_names.c |    1 +
 c/src/lib/libbsp/sparc/shared/amba/ambapp_old.c   |    2 +-
 c/src/lib/libbsp/sparc/shared/amba/ambapp_show.c  |    5 +----
 5 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/c/src/lib/libbsp/sparc/shared/amba/ambapp.c b/c/src/lib/libbsp/sparc/shared/amba/ambapp.c
index 143963e..dba56c1 100644
--- a/c/src/lib/libbsp/sparc/shared/amba/ambapp.c
+++ b/c/src/lib/libbsp/sparc/shared/amba/ambapp.c
@@ -21,7 +21,7 @@
 #define AMBA_APB_SLAVES 16
 
 /* Allocate one AMBA device */
-struct ambapp_dev *ambapp_alloc_dev_struct(int dev_type)
+static struct ambapp_dev *ambapp_alloc_dev_struct(int dev_type)
 {
   int size = sizeof(struct ambapp_dev);
   struct ambapp_dev *dev;
@@ -38,7 +38,7 @@ struct ambapp_dev *ambapp_alloc_dev_struct(int dev_type)
   return dev;
 }
 
-unsigned int
+static unsigned int
 ambapp_addr_from (struct ambapp_mmap *mmaps, unsigned int address)
 {
   /* no translation? */
@@ -55,7 +55,7 @@ ambapp_addr_from (struct ambapp_mmap *mmaps, unsigned int address)
   return 1;
 }
 
-void ambapp_ahb_dev_init(
+static void ambapp_ahb_dev_init(
   unsigned int ioarea,
   struct ambapp_mmap *mmaps,
   struct ambapp_pnp_ahb *ahb,
@@ -102,7 +102,7 @@ void ambapp_ahb_dev_init(
   }
 }
 
-void ambapp_apb_dev_init(
+static void ambapp_apb_dev_init(
   unsigned int base,
   struct ambapp_mmap *mmaps,
   struct ambapp_pnp_apb *apb,
@@ -123,7 +123,7 @@ void ambapp_apb_dev_init(
   apb_info->mask = ambapp_pnp_apb_mask(apb->iobar);
 }
 
-int ambapp_add_ahbbus(
+static int ambapp_add_ahbbus(
   struct ambapp_bus *abus,
   unsigned int ioarea
   )
@@ -298,7 +298,7 @@ int ambapp_scan(
 }
 
 /* Match search options againt device */
-int ambapp_dev_match_options(struct ambapp_dev *dev, unsigned int options, int vendor, int device)
+static int ambapp_dev_match_options(struct ambapp_dev *dev, unsigned int options, int vendor, int device)
 {
   if ((((options & (OPTIONS_ALL_DEVS)) == OPTIONS_ALL_DEVS) || /* TYPE */
       ((options & OPTIONS_AHB_MSTS) && (dev->dev_type == DEV_AHB_MST)) ||
diff --git a/c/src/lib/libbsp/sparc/shared/amba/ambapp_freq.c b/c/src/lib/libbsp/sparc/shared/amba/ambapp_freq.c
index c1a0285..59db15f 100644
--- a/c/src/lib/libbsp/sparc/shared/amba/ambapp_freq.c
+++ b/c/src/lib/libbsp/sparc/shared/amba/ambapp_freq.c
@@ -21,7 +21,7 @@
  * If a unsupported bridge is found the invalid frequncy of 0Hz is
  * returned.
  */
-unsigned int ambapp_freq_calc(
+static unsigned int ambapp_freq_calc(
   struct ambapp_bus *abus,
   int ahbidx,
   unsigned int freq_hz,
diff --git a/c/src/lib/libbsp/sparc/shared/amba/ambapp_names.c b/c/src/lib/libbsp/sparc/shared/amba/ambapp_names.c
index 6e52632..3bcb0fd 100644
--- a/c/src/lib/libbsp/sparc/shared/amba/ambapp_names.c
+++ b/c/src/lib/libbsp/sparc/shared/amba/ambapp_names.c
@@ -12,6 +12,7 @@
  *  http://www.rtems.org/license/LICENSE.
  */
 
+#include <ambapp.h>
 #include <ambapp_ids.h>
 #include <string.h>
 
diff --git a/c/src/lib/libbsp/sparc/shared/amba/ambapp_old.c b/c/src/lib/libbsp/sparc/shared/amba/ambapp_old.c
index 34c83cb..2be77a4 100644
--- a/c/src/lib/libbsp/sparc/shared/amba/ambapp_old.c
+++ b/c/src/lib/libbsp/sparc/shared/amba/ambapp_old.c
@@ -19,7 +19,7 @@ struct ambapp_dev_find_match_arg {
 };
 
 /* AMBA PP find routines */
-int ambapp_dev_find_match(struct ambapp_dev *dev, int index, void *arg)
+static int ambapp_dev_find_match(struct ambapp_dev *dev, int index, void *arg)
 {
   struct ambapp_dev_find_match_arg *p = arg;
 
diff --git a/c/src/lib/libbsp/sparc/shared/amba/ambapp_show.c b/c/src/lib/libbsp/sparc/shared/amba/ambapp_show.c
index 819efa9..1ed15c6 100644
--- a/c/src/lib/libbsp/sparc/shared/amba/ambapp_show.c
+++ b/c/src/lib/libbsp/sparc/shared/amba/ambapp_show.c
@@ -12,16 +12,13 @@
 #include <stdio.h>
 #include <ambapp.h>
 
-extern char *ambapp_device_id2str(int vendor, int id);
-extern char *ambapp_vendor_id2str(int vendor);
-
 struct ambapp_dev_print_arg {
   int show_depth;
 };
 
 static char *unknown = "unknown";
 
-int ambapp_dev_print(struct ambapp_dev *dev, int index, void *arg)
+static int ambapp_dev_print(struct ambapp_dev *dev, int index, void *arg)
 {
   char *dev_str, *ven_str, *type_str;
   struct ambapp_dev_print_arg *p = arg;




More information about the vc mailing list