All code using these memory parsing functions already includes getopt.h, which is the primary file for option parsing. Therefore, let's move these two functions there as well. Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx> --- include/common.h | 5 ----- include/getopt.h | 8 ++++++++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/include/common.h b/include/common.h index 9a0b4768b015..12961abbf2f5 100644 --- a/include/common.h +++ b/include/common.h @@ -31,11 +31,6 @@ void reginfo(void); /* common/memsize.c */ long get_ram_size (volatile long *, long); -int mem_parse_options(int argc, char *argv[], char *optstr, int *mode, - char **sourcefile, char **destfile, int *swab); -int memcpy_parse_options(int argc, char *argv[], int *sourcefd, - int *destfd, loff_t *count, - int rwsize, int destmode); #define RW_BUF_SIZE (unsigned)4096 #endif /* __COMMON_H_ */ diff --git a/include/getopt.h b/include/getopt.h index d4c01e793ad6..aa3b8d8ec6f9 100644 --- a/include/getopt.h +++ b/include/getopt.h @@ -8,6 +8,8 @@ #ifndef __GETOPT_H #define __GETOPT_H +#include <linux/types.h> + extern int opterr; extern int optind; extern int optopt; @@ -44,4 +46,10 @@ struct getopt_context { void getopt_context_store(struct getopt_context *ctx); void getopt_context_restore(struct getopt_context *ctx); +int mem_parse_options(int argc, char *argv[], char *optstr, int *mode, + char **sourcefile, char **destfile, int *swab); +int memcpy_parse_options(int argc, char *argv[], int *sourcefd, + int *destfd, loff_t *count, + int rwsize, int destmode); + #endif /* __GETOPT_H */ -- 2.39.5