aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLadinu Chandrasinghe <ladinu.pub@gmail.com>2009-09-22 19:43:42 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-23 10:39:28 -0400
commitb7ed698cc9d556306a4088c238e2ea9311ea2cb3 (patch)
treeb0aadfcf2d2c1c1454bdf8f194f7ff94e5d21c46
parent912e837aef72a3dd263dafc3717d92bbc1211a53 (diff)
Documentation/: fix warnings from -Wmissing-prototypes in HOSTCFLAGS
Fix up -Wmissing-prototypes in compileable userspace code, mainly under Documentation/. Signed-off-by: Ladinu Chandrasinghe <ladinu.pub@gmail.com> Signed-off-by: Trevor Keith <tsrk@tsrk.net> Cc: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--Documentation/accounting/getdelays.c12
-rw-r--r--Documentation/auxdisplay/cfag12864b-example.c22
-rw-r--r--Documentation/ia64/aliasing-test.c8
-rw-r--r--Documentation/pcmcia/crc32hash.c2
-rw-r--r--Documentation/spi/spidev_test.c4
-rw-r--r--Documentation/video4linux/v4lgrab.c2
-rw-r--r--Documentation/vm/page-types.c52
-rw-r--r--Documentation/vm/slabinfo.c68
-rw-r--r--Documentation/watchdog/src/watchdog-test.c2
-rw-r--r--firmware/ihex2fw.c2
-rw-r--r--scripts/genksyms/genksyms.c6
11 files changed, 90 insertions, 90 deletions
diff --git a/Documentation/accounting/getdelays.c b/Documentation/accounting/getdelays.c
index aa73e72fd793..6e25c2659e0a 100644
--- a/Documentation/accounting/getdelays.c
+++ b/Documentation/accounting/getdelays.c
@@ -116,7 +116,7 @@ error:
116} 116}
117 117
118 118
119int send_cmd(int sd, __u16 nlmsg_type, __u32 nlmsg_pid, 119static int send_cmd(int sd, __u16 nlmsg_type, __u32 nlmsg_pid,
120 __u8 genl_cmd, __u16 nla_type, 120 __u8 genl_cmd, __u16 nla_type,
121 void *nla_data, int nla_len) 121 void *nla_data, int nla_len)
122{ 122{
@@ -160,7 +160,7 @@ int send_cmd(int sd, __u16 nlmsg_type, __u32 nlmsg_pid,
160 * Probe the controller in genetlink to find the family id 160 * Probe the controller in genetlink to find the family id
161 * for the TASKSTATS family 161 * for the TASKSTATS family
162 */ 162 */
163int get_family_id(int sd) 163static int get_family_id(int sd)
164{ 164{
165 struct { 165 struct {
166 struct nlmsghdr n; 166 struct nlmsghdr n;
@@ -190,7 +190,7 @@ int get_family_id(int sd)
190 return id; 190 return id;
191} 191}
192 192
193void print_delayacct(struct taskstats *t) 193static void print_delayacct(struct taskstats *t)
194{ 194{
195 printf("\n\nCPU %15s%15s%15s%15s\n" 195 printf("\n\nCPU %15s%15s%15s%15s\n"
196 " %15llu%15llu%15llu%15llu\n" 196 " %15llu%15llu%15llu%15llu\n"
@@ -216,7 +216,7 @@ void print_delayacct(struct taskstats *t)
216 (unsigned long long)t->freepages_delay_total); 216 (unsigned long long)t->freepages_delay_total);
217} 217}
218 218
219void task_context_switch_counts(struct taskstats *t) 219static void task_context_switch_counts(struct taskstats *t)
220{ 220{
221 printf("\n\nTask %15s%15s\n" 221 printf("\n\nTask %15s%15s\n"
222 " %15llu%15llu\n", 222 " %15llu%15llu\n",
@@ -224,7 +224,7 @@ void task_context_switch_counts(struct taskstats *t)
224 (unsigned long long)t->nvcsw, (unsigned long long)t->nivcsw); 224 (unsigned long long)t->nvcsw, (unsigned long long)t->nivcsw);
225} 225}
226 226
227void print_cgroupstats(struct cgroupstats *c) 227static void print_cgroupstats(struct cgroupstats *c)
228{ 228{
229 printf("sleeping %llu, blocked %llu, running %llu, stopped %llu, " 229 printf("sleeping %llu, blocked %llu, running %llu, stopped %llu, "
230 "uninterruptible %llu\n", (unsigned long long)c->nr_sleeping, 230 "uninterruptible %llu\n", (unsigned long long)c->nr_sleeping,
@@ -235,7 +235,7 @@ void print_cgroupstats(struct cgroupstats *c)
235} 235}
236 236
237 237
238void print_ioacct(struct taskstats *t) 238static void print_ioacct(struct taskstats *t)
239{ 239{
240 printf("%s: read=%llu, write=%llu, cancelled_write=%llu\n", 240 printf("%s: read=%llu, write=%llu, cancelled_write=%llu\n",
241 t->ac_comm, 241 t->ac_comm,
diff --git a/Documentation/auxdisplay/cfag12864b-example.c b/Documentation/auxdisplay/cfag12864b-example.c
index 2caeea5e4993..1d2c010bae12 100644
--- a/Documentation/auxdisplay/cfag12864b-example.c
+++ b/Documentation/auxdisplay/cfag12864b-example.c
@@ -62,7 +62,7 @@ unsigned char cfag12864b_buffer[CFAG12864B_SIZE];
62 * Unable to open: return = -1 62 * Unable to open: return = -1
63 * Unable to mmap: return = -2 63 * Unable to mmap: return = -2
64 */ 64 */
65int cfag12864b_init(char *path) 65static int cfag12864b_init(char *path)
66{ 66{
67 cfag12864b_fd = open(path, O_RDWR); 67 cfag12864b_fd = open(path, O_RDWR);
68 if (cfag12864b_fd == -1) 68 if (cfag12864b_fd == -1)
@@ -81,7 +81,7 @@ int cfag12864b_init(char *path)
81/* 81/*
82 * exit a cfag12864b framebuffer device 82 * exit a cfag12864b framebuffer device
83 */ 83 */
84void cfag12864b_exit(void) 84static void cfag12864b_exit(void)
85{ 85{
86 munmap(cfag12864b_mem, CFAG12864B_SIZE); 86 munmap(cfag12864b_mem, CFAG12864B_SIZE);
87 close(cfag12864b_fd); 87 close(cfag12864b_fd);
@@ -90,7 +90,7 @@ void cfag12864b_exit(void)
90/* 90/*
91 * set (x, y) pixel 91 * set (x, y) pixel
92 */ 92 */
93void cfag12864b_set(unsigned char x, unsigned char y) 93static void cfag12864b_set(unsigned char x, unsigned char y)
94{ 94{
95 if (CFAG12864B_CHECK(x, y)) 95 if (CFAG12864B_CHECK(x, y))
96 cfag12864b_buffer[CFAG12864B_ADDRESS(x, y)] |= 96 cfag12864b_buffer[CFAG12864B_ADDRESS(x, y)] |=
@@ -100,7 +100,7 @@ void cfag12864b_set(unsigned char x, unsigned char y)
100/* 100/*
101 * unset (x, y) pixel 101 * unset (x, y) pixel
102 */ 102 */
103void cfag12864b_unset(unsigned char x, unsigned char y) 103static void cfag12864b_unset(unsigned char x, unsigned char y)
104{ 104{
105 if (CFAG12864B_CHECK(x, y)) 105 if (CFAG12864B_CHECK(x, y))
106 cfag12864b_buffer[CFAG12864B_ADDRESS(x, y)] &= 106 cfag12864b_buffer[CFAG12864B_ADDRESS(x, y)] &=
@@ -113,7 +113,7 @@ void cfag12864b_unset(unsigned char x, unsigned char y)
113 * Pixel off: return = 0 113 * Pixel off: return = 0
114 * Pixel on: return = 1 114 * Pixel on: return = 1
115 */ 115 */
116unsigned char cfag12864b_isset(unsigned char x, unsigned char y) 116static unsigned char cfag12864b_isset(unsigned char x, unsigned char y)
117{ 117{
118 if (CFAG12864B_CHECK(x, y)) 118 if (CFAG12864B_CHECK(x, y))
119 if (cfag12864b_buffer[CFAG12864B_ADDRESS(x, y)] & 119 if (cfag12864b_buffer[CFAG12864B_ADDRESS(x, y)] &
@@ -126,7 +126,7 @@ unsigned char cfag12864b_isset(unsigned char x, unsigned char y)
126/* 126/*
127 * not (x, y) pixel 127 * not (x, y) pixel
128 */ 128 */
129void cfag12864b_not(unsigned char x, unsigned char y) 129static void cfag12864b_not(unsigned char x, unsigned char y)
130{ 130{
131 if (cfag12864b_isset(x, y)) 131 if (cfag12864b_isset(x, y))
132 cfag12864b_unset(x, y); 132 cfag12864b_unset(x, y);
@@ -137,7 +137,7 @@ void cfag12864b_not(unsigned char x, unsigned char y)
137/* 137/*
138 * fill (set all pixels) 138 * fill (set all pixels)
139 */ 139 */
140void cfag12864b_fill(void) 140static void cfag12864b_fill(void)
141{ 141{
142 unsigned short i; 142 unsigned short i;
143 143
@@ -148,7 +148,7 @@ void cfag12864b_fill(void)
148/* 148/*
149 * clear (unset all pixels) 149 * clear (unset all pixels)
150 */ 150 */
151void cfag12864b_clear(void) 151static void cfag12864b_clear(void)
152{ 152{
153 unsigned short i; 153 unsigned short i;
154 154
@@ -162,7 +162,7 @@ void cfag12864b_clear(void)
162 * Pixel off: src[i] = 0 162 * Pixel off: src[i] = 0
163 * Pixel on: src[i] > 0 163 * Pixel on: src[i] > 0
164 */ 164 */
165void cfag12864b_format(unsigned char * matrix) 165static void cfag12864b_format(unsigned char * matrix)
166{ 166{
167 unsigned char i, j, n; 167 unsigned char i, j, n;
168 168
@@ -182,7 +182,7 @@ void cfag12864b_format(unsigned char * matrix)
182/* 182/*
183 * blit buffer to lcd 183 * blit buffer to lcd
184 */ 184 */
185void cfag12864b_blit(void) 185static void cfag12864b_blit(void)
186{ 186{
187 memcpy(cfag12864b_mem, cfag12864b_buffer, CFAG12864B_SIZE); 187 memcpy(cfag12864b_mem, cfag12864b_buffer, CFAG12864B_SIZE);
188} 188}
@@ -198,7 +198,7 @@ void cfag12864b_blit(void)
198 198
199#define EXAMPLES 6 199#define EXAMPLES 6
200 200
201void example(unsigned char n) 201static void example(unsigned char n)
202{ 202{
203 unsigned short i, j; 203 unsigned short i, j;
204 unsigned char matrix[CFAG12864B_WIDTH * CFAG12864B_HEIGHT]; 204 unsigned char matrix[CFAG12864B_WIDTH * CFAG12864B_HEIGHT];
diff --git a/Documentation/ia64/aliasing-test.c b/Documentation/ia64/aliasing-test.c
index d23610fb2ff9..3dfb76ca6931 100644
--- a/Documentation/ia64/aliasing-test.c
+++ b/Documentation/ia64/aliasing-test.c
@@ -24,7 +24,7 @@
24 24
25int sum; 25int sum;
26 26
27int map_mem(char *path, off_t offset, size_t length, int touch) 27static int map_mem(char *path, off_t offset, size_t length, int touch)
28{ 28{
29 int fd, rc; 29 int fd, rc;
30 void *addr; 30 void *addr;
@@ -62,7 +62,7 @@ int map_mem(char *path, off_t offset, size_t length, int touch)
62 return 0; 62 return 0;
63} 63}
64 64
65int scan_tree(char *path, char *file, off_t offset, size_t length, int touch) 65static int scan_tree(char *path, char *file, off_t offset, size_t length, int touch)
66{ 66{
67 struct dirent **namelist; 67 struct dirent **namelist;
68 char *name, *path2; 68 char *name, *path2;
@@ -119,7 +119,7 @@ skip:
119 119
120char buf[1024]; 120char buf[1024];
121 121
122int read_rom(char *path) 122static int read_rom(char *path)
123{ 123{
124 int fd, rc; 124 int fd, rc;
125 size_t size = 0; 125 size_t size = 0;
@@ -146,7 +146,7 @@ int read_rom(char *path)
146 return size; 146 return size;
147} 147}
148 148
149int scan_rom(char *path, char *file) 149static int scan_rom(char *path, char *file)
150{ 150{
151 struct dirent **namelist; 151 struct dirent **namelist;
152 char *name, *path2; 152 char *name, *path2;
diff --git a/Documentation/pcmcia/crc32hash.c b/Documentation/pcmcia/crc32hash.c
index 4210e5abab8a..44f8beea7260 100644
--- a/Documentation/pcmcia/crc32hash.c
+++ b/Documentation/pcmcia/crc32hash.c
@@ -8,7 +8,7 @@ $ ./crc32hash "Dual Speed"
8#include <ctype.h> 8#include <ctype.h>
9#include <stdlib.h> 9#include <stdlib.h>
10 10
11unsigned int crc32(unsigned char const *p, unsigned int len) 11static unsigned int crc32(unsigned char const *p, unsigned int len)
12{ 12{
13 int i; 13 int i;
14 unsigned int crc = 0; 14 unsigned int crc = 0;
diff --git a/Documentation/spi/spidev_test.c b/Documentation/spi/spidev_test.c
index c1a5aad3c75a..10abd3773e49 100644
--- a/Documentation/spi/spidev_test.c
+++ b/Documentation/spi/spidev_test.c
@@ -69,7 +69,7 @@ static void transfer(int fd)
69 puts(""); 69 puts("");
70} 70}
71 71
72void print_usage(const char *prog) 72static void print_usage(const char *prog)
73{ 73{
74 printf("Usage: %s [-DsbdlHOLC3]\n", prog); 74 printf("Usage: %s [-DsbdlHOLC3]\n", prog);
75 puts(" -D --device device to use (default /dev/spidev1.1)\n" 75 puts(" -D --device device to use (default /dev/spidev1.1)\n"
@@ -85,7 +85,7 @@ void print_usage(const char *prog)
85 exit(1); 85 exit(1);
86} 86}
87 87
88void parse_opts(int argc, char *argv[]) 88static void parse_opts(int argc, char *argv[])
89{ 89{
90 while (1) { 90 while (1) {
91 static const struct option lopts[] = { 91 static const struct option lopts[] = {
diff --git a/Documentation/video4linux/v4lgrab.c b/Documentation/video4linux/v4lgrab.c
index 05769cff1009..c8ded175796e 100644
--- a/Documentation/video4linux/v4lgrab.c
+++ b/Documentation/video4linux/v4lgrab.c
@@ -89,7 +89,7 @@
89 } \ 89 } \
90} 90}
91 91
92int get_brightness_adj(unsigned char *image, long size, int *brightness) { 92static int get_brightness_adj(unsigned char *image, long size, int *brightness) {
93 long i, tot = 0; 93 long i, tot = 0;
94 for (i=0;i<size*3;i++) 94 for (i=0;i<size*3;i++)
95 tot += image[i]; 95 tot += image[i];
diff --git a/Documentation/vm/page-types.c b/Documentation/vm/page-types.c
index 0833f44ba16b..3eda8ea00852 100644
--- a/Documentation/vm/page-types.c
+++ b/Documentation/vm/page-types.c
@@ -158,12 +158,12 @@ static uint64_t page_flags[HASH_SIZE];
158 type __min2 = (y); \ 158 type __min2 = (y); \
159 __min1 < __min2 ? __min1 : __min2; }) 159 __min1 < __min2 ? __min1 : __min2; })
160 160
161unsigned long pages2mb(unsigned long pages) 161static unsigned long pages2mb(unsigned long pages)
162{ 162{
163 return (pages * page_size) >> 20; 163 return (pages * page_size) >> 20;
164} 164}
165 165
166void fatal(const char *x, ...) 166static void fatal(const char *x, ...)
167{ 167{
168 va_list ap; 168 va_list ap;
169 169
@@ -178,7 +178,7 @@ void fatal(const char *x, ...)
178 * page flag names 178 * page flag names
179 */ 179 */
180 180
181char *page_flag_name(uint64_t flags) 181static char *page_flag_name(uint64_t flags)
182{ 182{
183 static char buf[65]; 183 static char buf[65];
184 int present; 184 int present;
@@ -197,7 +197,7 @@ char *page_flag_name(uint64_t flags)
197 return buf; 197 return buf;
198} 198}
199 199
200char *page_flag_longname(uint64_t flags) 200static char *page_flag_longname(uint64_t flags)
201{ 201{
202 static char buf[1024]; 202 static char buf[1024];
203 int i, n; 203 int i, n;
@@ -221,7 +221,7 @@ char *page_flag_longname(uint64_t flags)
221 * page list and summary 221 * page list and summary
222 */ 222 */
223 223
224void show_page_range(unsigned long offset, uint64_t flags) 224static void show_page_range(unsigned long offset, uint64_t flags)
225{ 225{
226 static uint64_t flags0; 226 static uint64_t flags0;
227 static unsigned long index; 227 static unsigned long index;
@@ -241,12 +241,12 @@ void show_page_range(unsigned long offset, uint64_t flags)
241 count = 1; 241 count = 1;
242} 242}
243 243
244void show_page(unsigned long offset, uint64_t flags) 244static void show_page(unsigned long offset, uint64_t flags)
245{ 245{
246 printf("%lu\t%s\n", offset, page_flag_name(flags)); 246 printf("%lu\t%s\n", offset, page_flag_name(flags));
247} 247}
248 248
249void show_summary(void) 249static void show_summary(void)
250{ 250{
251 int i; 251 int i;
252 252
@@ -272,7 +272,7 @@ void show_summary(void)
272 * page flag filters 272 * page flag filters
273 */ 273 */
274 274
275int bit_mask_ok(uint64_t flags) 275static int bit_mask_ok(uint64_t flags)
276{ 276{
277 int i; 277 int i;
278 278
@@ -289,7 +289,7 @@ int bit_mask_ok(uint64_t flags)
289 return 1; 289 return 1;
290} 290}
291 291
292uint64_t expand_overloaded_flags(uint64_t flags) 292static uint64_t expand_overloaded_flags(uint64_t flags)
293{ 293{
294 /* SLOB/SLUB overload several page flags */ 294 /* SLOB/SLUB overload several page flags */
295 if (flags & BIT(SLAB)) { 295 if (flags & BIT(SLAB)) {
@@ -308,7 +308,7 @@ uint64_t expand_overloaded_flags(uint64_t flags)
308 return flags; 308 return flags;
309} 309}
310 310
311uint64_t well_known_flags(uint64_t flags) 311static uint64_t well_known_flags(uint64_t flags)
312{ 312{
313 /* hide flags intended only for kernel hacker */ 313 /* hide flags intended only for kernel hacker */
314 flags &= ~KPF_HACKERS_BITS; 314 flags &= ~KPF_HACKERS_BITS;
@@ -325,7 +325,7 @@ uint64_t well_known_flags(uint64_t flags)
325 * page frame walker 325 * page frame walker
326 */ 326 */
327 327
328int hash_slot(uint64_t flags) 328static int hash_slot(uint64_t flags)
329{ 329{
330 int k = HASH_KEY(flags); 330 int k = HASH_KEY(flags);
331 int i; 331 int i;
@@ -352,7 +352,7 @@ int hash_slot(uint64_t flags)
352 exit(EXIT_FAILURE); 352 exit(EXIT_FAILURE);
353} 353}
354 354
355void add_page(unsigned long offset, uint64_t flags) 355static void add_page(unsigned long offset, uint64_t flags)
356{ 356{
357 flags = expand_overloaded_flags(flags); 357 flags = expand_overloaded_flags(flags);
358 358
@@ -371,7 +371,7 @@ void add_page(unsigned long offset, uint64_t flags)
371 total_pages++; 371 total_pages++;
372} 372}
373 373
374void walk_pfn(unsigned long index, unsigned long count) 374static void walk_pfn(unsigned long index, unsigned long count)
375{ 375{
376 unsigned long batch; 376 unsigned long batch;
377 unsigned long n; 377 unsigned long n;
@@ -404,7 +404,7 @@ void walk_pfn(unsigned long index, unsigned long count)
404 } 404 }
405} 405}
406 406
407void walk_addr_ranges(void) 407static void walk_addr_ranges(void)
408{ 408{
409 int i; 409 int i;
410 410
@@ -428,7 +428,7 @@ void walk_addr_ranges(void)
428 * user interface 428 * user interface
429 */ 429 */
430 430
431const char *page_flag_type(uint64_t flag) 431static const char *page_flag_type(uint64_t flag)
432{ 432{
433 if (flag & KPF_HACKERS_BITS) 433 if (flag & KPF_HACKERS_BITS)
434 return "(r)"; 434 return "(r)";
@@ -437,7 +437,7 @@ const char *page_flag_type(uint64_t flag)
437 return " "; 437 return " ";
438} 438}
439 439
440void usage(void) 440static void usage(void)
441{ 441{
442 int i, j; 442 int i, j;
443 443
@@ -482,7 +482,7 @@ void usage(void)
482 "(r) raw mode bits (o) overloaded bits\n"); 482 "(r) raw mode bits (o) overloaded bits\n");
483} 483}
484 484
485unsigned long long parse_number(const char *str) 485static unsigned long long parse_number(const char *str)
486{ 486{
487 unsigned long long n; 487 unsigned long long n;
488 488
@@ -494,16 +494,16 @@ unsigned long long parse_number(const char *str)
494 return n; 494 return n;
495} 495}
496 496
497void parse_pid(const char *str) 497static void parse_pid(const char *str)
498{ 498{
499 opt_pid = parse_number(str); 499 opt_pid = parse_number(str);
500} 500}
501 501
502void parse_file(const char *name) 502static void parse_file(const char *name)
503{ 503{
504} 504}
505 505
506void add_addr_range(unsigned long offset, unsigned long size) 506static void add_addr_range(unsigned long offset, unsigned long size)
507{ 507{
508 if (nr_addr_ranges >= MAX_ADDR_RANGES) 508 if (nr_addr_ranges >= MAX_ADDR_RANGES)
509 fatal("too much addr ranges\n"); 509 fatal("too much addr ranges\n");
@@ -513,7 +513,7 @@ void add_addr_range(unsigned long offset, unsigned long size)
513 nr_addr_ranges++; 513 nr_addr_ranges++;
514} 514}
515 515
516void parse_addr_range(const char *optarg) 516static void parse_addr_range(const char *optarg)
517{ 517{
518 unsigned long offset; 518 unsigned long offset;
519 unsigned long size; 519 unsigned long size;
@@ -547,7 +547,7 @@ void parse_addr_range(const char *optarg)
547 add_addr_range(offset, size); 547 add_addr_range(offset, size);
548} 548}
549 549
550void add_bits_filter(uint64_t mask, uint64_t bits) 550static void add_bits_filter(uint64_t mask, uint64_t bits)
551{ 551{
552 if (nr_bit_filters >= MAX_BIT_FILTERS) 552 if (nr_bit_filters >= MAX_BIT_FILTERS)
553 fatal("too much bit filters\n"); 553 fatal("too much bit filters\n");
@@ -557,7 +557,7 @@ void add_bits_filter(uint64_t mask, uint64_t bits)
557 nr_bit_filters++; 557 nr_bit_filters++;
558} 558}
559 559
560uint64_t parse_flag_name(const char *str, int len) 560static uint64_t parse_flag_name(const char *str, int len)
561{ 561{
562 int i; 562 int i;
563 563
@@ -577,7 +577,7 @@ uint64_t parse_flag_name(const char *str, int len)
577 return parse_number(str); 577 return parse_number(str);
578} 578}
579 579
580uint64_t parse_flag_names(const char *str, int all) 580static uint64_t parse_flag_names(const char *str, int all)
581{ 581{
582 const char *p = str; 582 const char *p = str;
583 uint64_t flags = 0; 583 uint64_t flags = 0;
@@ -596,7 +596,7 @@ uint64_t parse_flag_names(const char *str, int all)
596 return flags; 596 return flags;
597} 597}
598 598
599void parse_bits_mask(const char *optarg) 599static void parse_bits_mask(const char *optarg)
600{ 600{
601 uint64_t mask; 601 uint64_t mask;
602 uint64_t bits; 602 uint64_t bits;
@@ -621,7 +621,7 @@ void parse_bits_mask(const char *optarg)
621} 621}
622 622
623 623
624struct option opts[] = { 624static struct option opts[] = {
625 { "raw" , 0, NULL, 'r' }, 625 { "raw" , 0, NULL, 'r' },
626 { "pid" , 1, NULL, 'p' }, 626 { "pid" , 1, NULL, 'p' },
627 { "file" , 1, NULL, 'f' }, 627 { "file" , 1, NULL, 'f' },
diff --git a/Documentation/vm/slabinfo.c b/Documentation/vm/slabinfo.c
index df3227605d59..92e729f4b676 100644
--- a/Documentation/vm/slabinfo.c
+++ b/Documentation/vm/slabinfo.c
@@ -87,7 +87,7 @@ int page_size;
87 87
88regex_t pattern; 88regex_t pattern;
89 89
90void fatal(const char *x, ...) 90static void fatal(const char *x, ...)
91{ 91{
92 va_list ap; 92 va_list ap;
93 93
@@ -97,7 +97,7 @@ void fatal(const char *x, ...)
97 exit(EXIT_FAILURE); 97 exit(EXIT_FAILURE);
98} 98}
99 99
100void usage(void) 100static void usage(void)
101{ 101{
102 printf("slabinfo 5/7/2007. (c) 2007 sgi.\n\n" 102 printf("slabinfo 5/7/2007. (c) 2007 sgi.\n\n"
103 "slabinfo [-ahnpvtsz] [-d debugopts] [slab-regexp]\n" 103 "slabinfo [-ahnpvtsz] [-d debugopts] [slab-regexp]\n"
@@ -131,7 +131,7 @@ void usage(void)
131 ); 131 );
132} 132}
133 133
134unsigned long read_obj(const char *name) 134static unsigned long read_obj(const char *name)
135{ 135{
136 FILE *f = fopen(name, "r"); 136 FILE *f = fopen(name, "r");
137 137
@@ -151,7 +151,7 @@ unsigned long read_obj(const char *name)
151/* 151/*
152 * Get the contents of an attribute 152 * Get the contents of an attribute
153 */ 153 */
154unsigned long get_obj(const char *name) 154static unsigned long get_obj(const char *name)
155{ 155{
156 if (!read_obj(name)) 156 if (!read_obj(name))
157 return 0; 157 return 0;
@@ -159,7 +159,7 @@ unsigned long get_obj(const char *name)
159 return atol(buffer); 159 return atol(buffer);
160} 160}
161 161
162unsigned long get_obj_and_str(const char *name, char **x) 162static unsigned long get_obj_and_str(const char *name, char **x)
163{ 163{
164 unsigned long result = 0; 164 unsigned long result = 0;
165 char *p; 165 char *p;
@@ -178,7 +178,7 @@ unsigned long get_obj_and_str(const char *name, char **x)
178 return result; 178 return result;
179} 179}
180 180
181void set_obj(struct slabinfo *s, const char *name, int n) 181static void set_obj(struct slabinfo *s, const char *name, int n)
182{ 182{
183 char x[100]; 183 char x[100];
184 FILE *f; 184 FILE *f;
@@ -192,7 +192,7 @@ void set_obj(struct slabinfo *s, const char *name, int n)
192 fclose(f); 192 fclose(f);
193} 193}
194 194
195unsigned long read_slab_obj(struct slabinfo *s, const char *name) 195static unsigned long read_slab_obj(struct slabinfo *s, const char *name)
196{ 196{
197 char x[100]; 197 char x[100];
198 FILE *f; 198 FILE *f;
@@ -215,7 +215,7 @@ unsigned long read_slab_obj(struct slabinfo *s, const char *name)
215/* 215/*
216 * Put a size string together 216 * Put a size string together
217 */ 217 */
218int store_size(char *buffer, unsigned long value) 218static int store_size(char *buffer, unsigned long value)
219{ 219{
220 unsigned long divisor = 1; 220 unsigned long divisor = 1;
221 char trailer = 0; 221 char trailer = 0;
@@ -247,7 +247,7 @@ int store_size(char *buffer, unsigned long value)
247 return n; 247 return n;
248} 248}
249 249
250void decode_numa_list(int *numa, char *t) 250static void decode_numa_list(int *numa, char *t)
251{ 251{
252 int node; 252 int node;
253 int nr; 253 int nr;
@@ -272,7 +272,7 @@ void decode_numa_list(int *numa, char *t)
272 } 272 }
273} 273}
274 274
275void slab_validate(struct slabinfo *s) 275static void slab_validate(struct slabinfo *s)
276{ 276{
277 if (strcmp(s->name, "*") == 0) 277 if (strcmp(s->name, "*") == 0)
278 return; 278 return;
@@ -280,7 +280,7 @@ void slab_validate(struct slabinfo *s)
280 set_obj(s, "validate", 1); 280 set_obj(s, "validate", 1);
281} 281}
282 282
283void slab_shrink(struct slabinfo *s) 283static void slab_shrink(struct slabinfo *s)
284{ 284{
285 if (strcmp(s->name, "*") == 0) 285 if (strcmp(s->name, "*") == 0)
286 return; 286 return;
@@ -290,7 +290,7 @@ void slab_shrink(struct slabinfo *s)
290 290
291int line = 0; 291int line = 0;
292 292
293void first_line(void) 293static void first_line(void)
294{ 294{
295 if (show_activity) 295 if (show_activity)
296 printf("Name Objects Alloc Free %%Fast Fallb O\n"); 296 printf("Name Objects Alloc Free %%Fast Fallb O\n");
@@ -302,7 +302,7 @@ void first_line(void)
302/* 302/*
303 * Find the shortest alias of a slab 303 * Find the shortest alias of a slab
304 */ 304 */
305struct aliasinfo *find_one_alias(struct slabinfo *find) 305static struct aliasinfo *find_one_alias(struct slabinfo *find)
306{ 306{
307 struct aliasinfo *a; 307 struct aliasinfo *a;
308 struct aliasinfo *best = NULL; 308 struct aliasinfo *best = NULL;
@@ -318,18 +318,18 @@ struct aliasinfo *find_one_alias(struct slabinfo *find)
318 return best; 318 return best;
319} 319}
320 320
321unsigned long slab_size(struct slabinfo *s) 321static unsigned long slab_size(struct slabinfo *s)
322{ 322{
323 return s->slabs * (page_size << s->order); 323 return s->slabs * (page_size << s->order);
324} 324}
325 325
326unsigned long slab_activity(struct slabinfo *s) 326static unsigned long slab_activity(struct slabinfo *s)
327{ 327{
328 return s->alloc_fastpath + s->free_fastpath + 328 return s->alloc_fastpath + s->free_fastpath +
329 s->alloc_slowpath + s->free_slowpath; 329 s->alloc_slowpath + s->free_slowpath;
330} 330}
331 331
332void slab_numa(struct slabinfo *s, int mode) 332static void slab_numa(struct slabinfo *s, int mode)
333{ 333{
334 int node; 334 int node;
335 335
@@ -374,7 +374,7 @@ void slab_numa(struct slabinfo *s, int mode)
374 line++; 374 line++;
375} 375}
376 376
377void show_tracking(struct slabinfo *s) 377static void show_tracking(struct slabinfo *s)
378{ 378{
379 printf("\n%s: Kernel object allocation\n", s->name); 379 printf("\n%s: Kernel object allocation\n", s->name);
380 printf("-----------------------------------------------------------------------\n"); 380 printf("-----------------------------------------------------------------------\n");
@@ -392,7 +392,7 @@ void show_tracking(struct slabinfo *s)
392 392
393} 393}
394 394
395void ops(struct slabinfo *s) 395static void ops(struct slabinfo *s)
396{ 396{
397 if (strcmp(s->name, "*") == 0) 397 if (strcmp(s->name, "*") == 0)
398 return; 398 return;
@@ -405,14 +405,14 @@ void ops(struct slabinfo *s)
405 printf("\n%s has no kmem_cache operations\n", s->name); 405 printf("\n%s has no kmem_cache operations\n", s->name);
406} 406}
407 407
408const char *onoff(int x) 408static const char *onoff(int x)
409{ 409{
410 if (x) 410 if (x)
411 return "On "; 411 return "On ";
412 return "Off"; 412 return "Off";
413} 413}
414 414
415void slab_stats(struct slabinfo *s) 415static void slab_stats(struct slabinfo *s)
416{ 416{
417 unsigned long total_alloc; 417 unsigned long total_alloc;
418 unsigned long total_free; 418 unsigned long total_free;
@@ -477,7 +477,7 @@ void slab_stats(struct slabinfo *s)
477 s->deactivate_to_tail, (s->deactivate_to_tail * 100) / total); 477 s->deactivate_to_tail, (s->deactivate_to_tail * 100) / total);
478} 478}
479 479
480void report(struct slabinfo *s) 480static void report(struct slabinfo *s)
481{ 481{
482 if (strcmp(s->name, "*") == 0) 482 if (strcmp(s->name, "*") == 0)
483 return; 483 return;
@@ -518,7 +518,7 @@ void report(struct slabinfo *s)
518 slab_stats(s); 518 slab_stats(s);
519} 519}
520 520
521void slabcache(struct slabinfo *s) 521static void slabcache(struct slabinfo *s)
522{ 522{
523 char size_str[20]; 523 char size_str[20];
524 char dist_str[40]; 524 char dist_str[40];
@@ -593,7 +593,7 @@ void slabcache(struct slabinfo *s)
593/* 593/*
594 * Analyze debug options. Return false if something is amiss. 594 * Analyze debug options. Return false if something is amiss.
595 */ 595 */
596int debug_opt_scan(char *opt) 596static int debug_opt_scan(char *opt)
597{ 597{
598 if (!opt || !opt[0] || strcmp(opt, "-") == 0) 598 if (!opt || !opt[0] || strcmp(opt, "-") == 0)
599 return 1; 599 return 1;
@@ -642,7 +642,7 @@ int debug_opt_scan(char *opt)
642 return 1; 642 return 1;
643} 643}
644 644
645int slab_empty(struct slabinfo *s) 645static int slab_empty(struct slabinfo *s)
646{ 646{
647 if (s->objects > 0) 647 if (s->objects > 0)
648 return 0; 648 return 0;
@@ -657,7 +657,7 @@ int slab_empty(struct slabinfo *s)
657 return 1; 657 return 1;
658} 658}
659 659
660void slab_debug(struct slabinfo *s) 660static void slab_debug(struct slabinfo *s)
661{ 661{
662 if (strcmp(s->name, "*") == 0) 662 if (strcmp(s->name, "*") == 0)
663 return; 663 return;
@@ -717,7 +717,7 @@ void slab_debug(struct slabinfo *s)
717 set_obj(s, "trace", 1); 717 set_obj(s, "trace", 1);
718} 718}
719 719
720void totals(void) 720static void totals(void)
721{ 721{
722 struct slabinfo *s; 722 struct slabinfo *s;
723 723
@@ -976,7 +976,7 @@ void totals(void)
976 b1, b2, b3); 976 b1, b2, b3);
977} 977}
978 978
979void sort_slabs(void) 979static void sort_slabs(void)
980{ 980{
981 struct slabinfo *s1,*s2; 981 struct slabinfo *s1,*s2;
982 982
@@ -1005,7 +1005,7 @@ void sort_slabs(void)
1005 } 1005 }
1006} 1006}
1007 1007
1008void sort_aliases(void) 1008static void sort_aliases(void)
1009{ 1009{
1010 struct aliasinfo *a1,*a2; 1010 struct aliasinfo *a1,*a2;
1011 1011
@@ -1030,7 +1030,7 @@ void sort_aliases(void)
1030 } 1030 }
1031} 1031}
1032 1032
1033void link_slabs(void) 1033static void link_slabs(void)
1034{ 1034{
1035 struct aliasinfo *a; 1035 struct aliasinfo *a;
1036 struct slabinfo *s; 1036 struct slabinfo *s;
@@ -1048,7 +1048,7 @@ void link_slabs(void)
1048 } 1048 }
1049} 1049}
1050 1050
1051void alias(void) 1051static void alias(void)
1052{ 1052{
1053 struct aliasinfo *a; 1053 struct aliasinfo *a;
1054 char *active = NULL; 1054 char *active = NULL;
@@ -1079,7 +1079,7 @@ void alias(void)
1079} 1079}
1080 1080
1081 1081
1082void rename_slabs(void) 1082static void rename_slabs(void)
1083{ 1083{
1084 struct slabinfo *s; 1084 struct slabinfo *s;
1085 struct aliasinfo *a; 1085 struct aliasinfo *a;
@@ -1102,12 +1102,12 @@ void rename_slabs(void)
1102 } 1102 }
1103} 1103}
1104 1104
1105int slab_mismatch(char *slab) 1105static int slab_mismatch(char *slab)
1106{ 1106{
1107 return regexec(&pattern, slab, 0, NULL, 0); 1107 return regexec(&pattern, slab, 0, NULL, 0);
1108} 1108}
1109 1109
1110void read_slab_dir(void) 1110static void read_slab_dir(void)
1111{ 1111{
1112 DIR *dir; 1112 DIR *dir;
1113 struct dirent *de; 1113 struct dirent *de;
@@ -1209,7 +1209,7 @@ void read_slab_dir(void)
1209 fatal("Too many aliases\n"); 1209 fatal("Too many aliases\n");
1210} 1210}
1211 1211
1212void output_slabs(void) 1212static void output_slabs(void)
1213{ 1213{
1214 struct slabinfo *slab; 1214 struct slabinfo *slab;
1215 1215
diff --git a/Documentation/watchdog/src/watchdog-test.c b/Documentation/watchdog/src/watchdog-test.c
index 65f6c19cb865..a750532ffcf8 100644
--- a/Documentation/watchdog/src/watchdog-test.c
+++ b/Documentation/watchdog/src/watchdog-test.c
@@ -18,7 +18,7 @@ int fd;
18 * the PC Watchdog card to reset its internal timer so it doesn't trigger 18 * the PC Watchdog card to reset its internal timer so it doesn't trigger
19 * a computer reset. 19 * a computer reset.
20 */ 20 */
21void keep_alive(void) 21static void keep_alive(void)
22{ 22{
23 int dummy; 23 int dummy;
24 24
diff --git a/firmware/ihex2fw.c b/firmware/ihex2fw.c
index 8f7fdaa9e010..5a03ba8c8364 100644
--- a/firmware/ihex2fw.c
+++ b/firmware/ihex2fw.c
@@ -56,7 +56,7 @@ static int output_records(int outfd);
56static int sort_records = 0; 56static int sort_records = 0;
57static int wide_records = 0; 57static int wide_records = 0;
58 58
59int usage(void) 59static int usage(void)
60{ 60{
61 fprintf(stderr, "ihex2fw: Convert ihex files into binary " 61 fprintf(stderr, "ihex2fw: Convert ihex files into binary "
62 "representation for use by Linux kernel\n"); 62 "representation for use by Linux kernel\n");
diff --git a/scripts/genksyms/genksyms.c b/scripts/genksyms/genksyms.c
index 3a8297b5184c..af6b8363a2d5 100644
--- a/scripts/genksyms/genksyms.c
+++ b/scripts/genksyms/genksyms.c
@@ -176,7 +176,7 @@ static int is_unknown_symbol(struct symbol *sym)
176 strcmp(defn->string, "{") == 0); 176 strcmp(defn->string, "{") == 0);
177} 177}
178 178
179struct symbol *__add_symbol(const char *name, enum symbol_type type, 179static struct symbol *__add_symbol(const char *name, enum symbol_type type,
180 struct string_list *defn, int is_extern, 180 struct string_list *defn, int is_extern,
181 int is_reference) 181 int is_reference)
182{ 182{
@@ -265,7 +265,7 @@ struct symbol *add_symbol(const char *name, enum symbol_type type,
265 return __add_symbol(name, type, defn, is_extern, 0); 265 return __add_symbol(name, type, defn, is_extern, 0);
266} 266}
267 267
268struct symbol *add_reference_symbol(const char *name, enum symbol_type type, 268static struct symbol *add_reference_symbol(const char *name, enum symbol_type type,
269 struct string_list *defn, int is_extern) 269 struct string_list *defn, int is_extern)
270{ 270{
271 return __add_symbol(name, type, defn, is_extern, 1); 271 return __add_symbol(name, type, defn, is_extern, 1);
@@ -313,7 +313,7 @@ static int equal_list(struct string_list *a, struct string_list *b)
313 313
314#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) 314#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
315 315
316struct string_list *read_node(FILE *f) 316static struct string_list *read_node(FILE *f)
317{ 317{
318 char buffer[256]; 318 char buffer[256];
319 struct string_list node = { 319 struct string_list node = {