Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Documentation: make functions static to avoid prototype warnings

Signed-off-by: Peter Foley <pefoley2@pefoley.com>
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>

authored by

Peter Foley and committed by
Jiri Kosina
0421fc83 adb19fb6

+16 -13
+3 -3
Documentation/arm/SH-Mobile/vrl4.c
··· 77 77 78 78 #define ROUND_UP(x) ((x + ALIGN - 1) & ~(ALIGN - 1)) 79 79 80 - ssize_t do_read(int fd, void *buf, size_t count) 80 + static ssize_t do_read(int fd, void *buf, size_t count) 81 81 { 82 82 size_t offset = 0; 83 83 ssize_t l; ··· 98 98 return offset; 99 99 } 100 100 101 - ssize_t do_write(int fd, const void *buf, size_t count) 101 + static ssize_t do_write(int fd, const void *buf, size_t count) 102 102 { 103 103 size_t offset = 0; 104 104 ssize_t l; ··· 117 117 return offset; 118 118 } 119 119 120 - ssize_t write_zero(int fd, size_t len) 120 + static ssize_t write_zero(int fd, size_t len) 121 121 { 122 122 size_t i = len; 123 123
+6 -5
Documentation/prctl/disable-tsc-ctxt-sw-stress-test.c
··· 27 27 # define PR_TSC_SIGSEGV 2 /* throw a SIGSEGV instead of reading the TSC */ 28 28 #endif 29 29 30 - uint64_t rdtsc() { 30 + static uint64_t rdtsc(void) 31 + { 31 32 uint32_t lo, hi; 32 33 /* We cannot use "=A", since this would use %rax on x86_64 */ 33 34 __asm__ __volatile__ ("rdtsc" : "=a" (lo), "=d" (hi)); 34 35 return (uint64_t)hi << 32 | lo; 35 36 } 36 37 37 - void sigsegv_expect(int sig) 38 + static void sigsegv_expect(int sig) 38 39 { 39 40 /* */ 40 41 } 41 42 42 - void segvtask(void) 43 + static void segvtask(void) 43 44 { 44 45 if (prctl(PR_SET_TSC, PR_TSC_SIGSEGV) < 0) 45 46 { ··· 55 54 } 56 55 57 56 58 - void sigsegv_fail(int sig) 57 + static void sigsegv_fail(int sig) 59 58 { 60 59 fprintf(stderr, "FATAL ERROR, rdtsc() failed while enabled\n"); 61 60 exit(0); 62 61 } 63 62 64 - void rdtsctask(void) 63 + static void rdtsctask(void) 65 64 { 66 65 if (prctl(PR_SET_TSC, PR_TSC_ENABLE) < 0) 67 66 {
+4 -3
Documentation/prctl/disable-tsc-on-off-stress-test.c
··· 29 29 30 30 /* snippet from wikipedia :-) */ 31 31 32 - uint64_t rdtsc() { 32 + static uint64_t rdtsc(void) 33 + { 33 34 uint32_t lo, hi; 34 35 /* We cannot use "=A", since this would use %rax on x86_64 */ 35 36 __asm__ __volatile__ ("rdtsc" : "=a" (lo), "=d" (hi)); ··· 39 38 40 39 int should_segv = 0; 41 40 42 - void sigsegv_cb(int sig) 41 + static void sigsegv_cb(int sig) 43 42 { 44 43 if (!should_segv) 45 44 { ··· 56 55 rdtsc(); 57 56 } 58 57 59 - void task(void) 58 + static void task(void) 60 59 { 61 60 signal(SIGSEGV, sigsegv_cb); 62 61 alarm(10);
+3 -2
Documentation/prctl/disable-tsc-test.c
··· 29 29 [PR_TSC_SIGSEGV] = "PR_TSC_SIGSEGV", 30 30 }; 31 31 32 - uint64_t rdtsc() { 32 + static uint64_t rdtsc(void) 33 + { 33 34 uint32_t lo, hi; 34 35 /* We cannot use "=A", since this would use %rax on x86_64 */ 35 36 __asm__ __volatile__ ("rdtsc" : "=a" (lo), "=d" (hi)); 36 37 return (uint64_t)hi << 32 | lo; 37 38 } 38 39 39 - void sigsegv_cb(int sig) 40 + static void sigsegv_cb(int sig) 40 41 { 41 42 int tsc_val = 0; 42 43