Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b7ed698c authored by Ladinu Chandrasinghe's avatar Ladinu Chandrasinghe Committed by Linus Torvalds
Browse files

Documentation/: fix warnings from -Wmissing-prototypes in HOSTCFLAGS



Fix up -Wmissing-prototypes in compileable userspace code, mainly under
Documentation/.

Signed-off-by: default avatarLadinu Chandrasinghe <ladinu.pub@gmail.com>
Signed-off-by: default avatarTrevor Keith <tsrk@tsrk.net>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 912e837a
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -116,7 +116,7 @@ static int create_nl_socket(int protocol)
}


int send_cmd(int sd, __u16 nlmsg_type, __u32 nlmsg_pid,
static int send_cmd(int sd, __u16 nlmsg_type, __u32 nlmsg_pid,
	     __u8 genl_cmd, __u16 nla_type,
	     void *nla_data, int nla_len)
{
@@ -160,7 +160,7 @@ int send_cmd(int sd, __u16 nlmsg_type, __u32 nlmsg_pid,
 * Probe the controller in genetlink to find the family id
 * for the TASKSTATS family
 */
int get_family_id(int sd)
static int get_family_id(int sd)
{
	struct {
		struct nlmsghdr n;
@@ -190,7 +190,7 @@ int get_family_id(int sd)
	return id;
}

void print_delayacct(struct taskstats *t)
static void print_delayacct(struct taskstats *t)
{
	printf("\n\nCPU   %15s%15s%15s%15s\n"
	       "      %15llu%15llu%15llu%15llu\n"
@@ -216,7 +216,7 @@ void print_delayacct(struct taskstats *t)
	       (unsigned long long)t->freepages_delay_total);
}

void task_context_switch_counts(struct taskstats *t)
static void task_context_switch_counts(struct taskstats *t)
{
	printf("\n\nTask   %15s%15s\n"
	       "       %15llu%15llu\n",
@@ -224,7 +224,7 @@ void task_context_switch_counts(struct taskstats *t)
	       (unsigned long long)t->nvcsw, (unsigned long long)t->nivcsw);
}

void print_cgroupstats(struct cgroupstats *c)
static void print_cgroupstats(struct cgroupstats *c)
{
	printf("sleeping %llu, blocked %llu, running %llu, stopped %llu, "
		"uninterruptible %llu\n", (unsigned long long)c->nr_sleeping,
@@ -235,7 +235,7 @@ void print_cgroupstats(struct cgroupstats *c)
}


void print_ioacct(struct taskstats *t)
static void print_ioacct(struct taskstats *t)
{
	printf("%s: read=%llu, write=%llu, cancelled_write=%llu\n",
		t->ac_comm,
+11 −11
Original line number Diff line number Diff line
@@ -62,7 +62,7 @@ unsigned char cfag12864b_buffer[CFAG12864B_SIZE];
 * Unable to open: return = -1
 * Unable to mmap: return = -2
 */
int cfag12864b_init(char *path)
static int cfag12864b_init(char *path)
{
	cfag12864b_fd = open(path, O_RDWR);
	if (cfag12864b_fd == -1)
@@ -81,7 +81,7 @@ int cfag12864b_init(char *path)
/*
 * exit a cfag12864b framebuffer device
 */
void cfag12864b_exit(void)
static void cfag12864b_exit(void)
{
	munmap(cfag12864b_mem, CFAG12864B_SIZE);
	close(cfag12864b_fd);
@@ -90,7 +90,7 @@ void cfag12864b_exit(void)
/*
 * set (x, y) pixel
 */
void cfag12864b_set(unsigned char x, unsigned char y)
static void cfag12864b_set(unsigned char x, unsigned char y)
{
	if (CFAG12864B_CHECK(x, y))
		cfag12864b_buffer[CFAG12864B_ADDRESS(x, y)] |=
@@ -100,7 +100,7 @@ void cfag12864b_set(unsigned char x, unsigned char y)
/*
 * unset (x, y) pixel
 */
void cfag12864b_unset(unsigned char x, unsigned char y)
static void cfag12864b_unset(unsigned char x, unsigned char y)
{
	if (CFAG12864B_CHECK(x, y))
		cfag12864b_buffer[CFAG12864B_ADDRESS(x, y)] &=
@@ -113,7 +113,7 @@ void cfag12864b_unset(unsigned char x, unsigned char y)
 * Pixel off: return = 0
 * Pixel on:  return = 1
 */
unsigned char cfag12864b_isset(unsigned char x, unsigned char y)
static unsigned char cfag12864b_isset(unsigned char x, unsigned char y)
{
	if (CFAG12864B_CHECK(x, y))
		if (cfag12864b_buffer[CFAG12864B_ADDRESS(x, y)] &
@@ -126,7 +126,7 @@ unsigned char cfag12864b_isset(unsigned char x, unsigned char y)
/*
 * not (x, y) pixel
 */
void cfag12864b_not(unsigned char x, unsigned char y)
static void cfag12864b_not(unsigned char x, unsigned char y)
{
	if (cfag12864b_isset(x, y))
		cfag12864b_unset(x, y);
@@ -137,7 +137,7 @@ void cfag12864b_not(unsigned char x, unsigned char y)
/*
 * fill (set all pixels)
 */
void cfag12864b_fill(void)
static void cfag12864b_fill(void)
{
	unsigned short i;

@@ -148,7 +148,7 @@ void cfag12864b_fill(void)
/*
 * clear (unset all pixels)
 */
void cfag12864b_clear(void)
static void cfag12864b_clear(void)
{
	unsigned short i;

@@ -162,7 +162,7 @@ void cfag12864b_clear(void)
 * Pixel off: src[i] = 0
 * Pixel on:  src[i] > 0
 */
void cfag12864b_format(unsigned char * matrix)
static void cfag12864b_format(unsigned char * matrix)
{
	unsigned char i, j, n;

@@ -182,7 +182,7 @@ void cfag12864b_format(unsigned char * matrix)
/*
 * blit buffer to lcd
 */
void cfag12864b_blit(void)
static void cfag12864b_blit(void)
{
	memcpy(cfag12864b_mem, cfag12864b_buffer, CFAG12864B_SIZE);
}
@@ -198,7 +198,7 @@ void cfag12864b_blit(void)

#define EXAMPLES	6

void example(unsigned char n)
static void example(unsigned char n)
{
	unsigned short i, j;
	unsigned char matrix[CFAG12864B_WIDTH * CFAG12864B_HEIGHT];
+4 −4
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@

int sum;

int map_mem(char *path, off_t offset, size_t length, int touch)
static int map_mem(char *path, off_t offset, size_t length, int touch)
{
	int fd, rc;
	void *addr;
@@ -62,7 +62,7 @@ int map_mem(char *path, off_t offset, size_t length, int touch)
	return 0;
}

int scan_tree(char *path, char *file, off_t offset, size_t length, int touch)
static int scan_tree(char *path, char *file, off_t offset, size_t length, int touch)
{
	struct dirent **namelist;
	char *name, *path2;
@@ -119,7 +119,7 @@ int scan_tree(char *path, char *file, off_t offset, size_t length, int touch)

char buf[1024];

int read_rom(char *path)
static int read_rom(char *path)
{
	int fd, rc;
	size_t size = 0;
@@ -146,7 +146,7 @@ int read_rom(char *path)
	return size;
}

int scan_rom(char *path, char *file)
static int scan_rom(char *path, char *file)
{
	struct dirent **namelist;
	char *name, *path2;
+1 −1
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@
#include <ctype.h>
#include <stdlib.h>

unsigned int crc32(unsigned char const *p, unsigned int len)
static unsigned int crc32(unsigned char const *p, unsigned int len)
{
	int i;
	unsigned int crc = 0;
+2 −2
Original line number Diff line number Diff line
@@ -69,7 +69,7 @@ static void transfer(int fd)
	puts("");
}

void print_usage(const char *prog)
static void print_usage(const char *prog)
{
	printf("Usage: %s [-DsbdlHOLC3]\n", prog);
	puts("  -D --device   device to use (default /dev/spidev1.1)\n"
@@ -85,7 +85,7 @@ void print_usage(const char *prog)
	exit(1);
}

void parse_opts(int argc, char *argv[])
static void parse_opts(int argc, char *argv[])
{
	while (1) {
		static const struct option lopts[] = {
Loading