Where possible, make functions and variables tatic in
kexec/arch/ppc64/fs2dt.c
Signed-off-by: Simon Horman <[EMAIL PROTECTED]>
Index: kexec-tools-testing/kexec/arch/ppc64/fs2dt.c
===================================================================
--- kexec-tools-testing.orig/kexec/arch/ppc64/fs2dt.c 2006-12-08
16:56:34.000000000 +0900
+++ kexec-tools-testing/kexec/arch/ppc64/fs2dt.c 2006-12-08
16:56:43.000000000 +0900
@@ -48,7 +48,7 @@
ERR_RESERVE,
};
-void err(const char *str, int rc)
+static void err(const char *str, int rc)
{
if (errno)
perror(str);
@@ -57,17 +57,18 @@
exit(rc);
}
-char pathname[MAXPATH], *pathstart;
-char propnames[NAMESPACE];
-unsigned dtstruct[TREEWORDS], *dt;
-unsigned long long mem_rsrv[2*MEMRESERVE];
+static char pathname[MAXPATH], *pathstart;
+static char propnames[NAMESPACE];
+static unsigned dtstruct[TREEWORDS], *dt;
+static unsigned long long mem_rsrv[2*MEMRESERVE];
static int initrd_found = 0;
static int crash_param = 0;
-char local_cmdline[COMMAND_LINE_SIZE] = { "" };
-unsigned *dt_len; /* changed len of modified cmdline in flat device-tree */
+static char local_cmdline[COMMAND_LINE_SIZE] = { "" };
+static unsigned *dt_len; /* changed len of modified cmdline
+ in flat device-tree */
extern mem_rgns_t usablemem_rgns;
-struct bootblock bb[1];
+static struct bootblock bb[1];
void reserve(unsigned long long where, unsigned long long length)
{
@@ -83,7 +84,7 @@
}
/* look for properties we need to reserve memory space for */
-void checkprop(char *name, unsigned *data)
+static void checkprop(char *name, unsigned *data)
{
static unsigned long long base, size, end;
@@ -113,7 +114,7 @@
* return the property index for a property name, creating a new one
* if needed.
*/
-unsigned propnum(const char *name)
+static unsigned propnum(const char *name)
{
unsigned offset = 0;
@@ -128,7 +129,7 @@
return offset;
}
-void add_usable_mem_property(int fd, int len)
+static void add_usable_mem_property(int fd, int len)
{
char fname[MAXPATH], *bname;
char buf[MAXBYTES +1];
@@ -190,7 +191,7 @@
}
/* put all properties (files) in the property structure */
-void putprops(char *fn, struct dirent **nlist, int numlist)
+static void putprops(char *fn, struct dirent **nlist, int numlist)
{
struct dirent *dp;
int i = 0, fd, len;
@@ -301,7 +302,7 @@
* Compare function used to sort the device-tree directories
* This function will be passed to scandir.
*/
-int comparefunc(const void *dentry1, const void *dentry2)
+static int comparefunc(const void *dentry1, const void *dentry2)
{
char *str1 = (*(struct dirent **)dentry1)->d_name;
char *str2 = (*(struct dirent **)dentry2)->d_name;
@@ -323,7 +324,7 @@
* put a node (directory) in the property structure. first properties
* then children.
*/
-void putnode(void)
+static void putnode(void)
{
char *dn;
struct dirent *dp;
--
--
Horms
H: http://www.vergenet.net/~horms/
W: http://www.valinux.co.jp/en/
_______________________________________________
fastboot mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/fastboot