From e09b41010ba33a20a87472ee821fa407a5b8da36 Mon Sep 17 00:00:00 2001 From: José Pekkarinen Date: Mon, 11 Apr 2016 10:41:07 +0300 Subject: These changes are the raw update to linux-4.4.6-rt14. Kernel sources are taken from kernel.org, and rt patch from the rt wiki download page. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit During the rebasing, the following patch collided: Force tick interrupt and get rid of softirq magic(I70131fb85). Collisions have been removed because its logic was found on the source already. Change-Id: I7f57a4081d9deaa0d9ccfc41a6c8daccdee3b769 Signed-off-by: José Pekkarinen --- kernel/scripts/dtc/srcpos.c | 49 ++++++++++++++++----------------------------- 1 file changed, 17 insertions(+), 32 deletions(-) (limited to 'kernel/scripts/dtc/srcpos.c') diff --git a/kernel/scripts/dtc/srcpos.c b/kernel/scripts/dtc/srcpos.c index c20bc5315..f534c22a8 100644 --- a/kernel/scripts/dtc/srcpos.c +++ b/kernel/scripts/dtc/srcpos.c @@ -34,7 +34,7 @@ struct search_path { static struct search_path *search_path_head, **search_path_tail; -static char *dirname(const char *path) +static char *get_dirname(const char *path) { const char *slash = strrchr(path, '/'); @@ -77,7 +77,7 @@ static char *try_open(const char *dirname, const char *fname, FILE **fp) else fullname = join_path(dirname, fname); - *fp = fopen(fullname, "r"); + *fp = fopen(fullname, "rb"); if (!*fp) { free(fullname); fullname = NULL; @@ -150,7 +150,7 @@ void srcfile_push(const char *fname) srcfile = xmalloc(sizeof(*srcfile)); srcfile->f = srcfile_relative_open(fname, &srcfile->name); - srcfile->dir = dirname(srcfile->name); + srcfile->dir = get_dirname(srcfile->name); srcfile->prev = current_srcfile; srcfile->lineno = 1; @@ -159,7 +159,7 @@ void srcfile_push(const char *fname) current_srcfile = srcfile; } -int srcfile_pop(void) +bool srcfile_pop(void) { struct srcfile_state *srcfile = current_srcfile; @@ -177,7 +177,7 @@ int srcfile_pop(void) * fix this we could either allocate all the files from a * table, or use a pool allocator. */ - return current_srcfile ? 1 : 0; + return current_srcfile ? true : false; } void srcfile_add_search_path(const char *dirname) @@ -290,42 +290,27 @@ srcpos_string(struct srcpos *pos) return pos_str; } -void -srcpos_verror(struct srcpos *pos, char const *fmt, va_list va) +void srcpos_verror(struct srcpos *pos, const char *prefix, + const char *fmt, va_list va) { - const char *srcstr; - - srcstr = srcpos_string(pos); + char *srcstr; - fprintf(stderr, "Error: %s ", srcstr); - vfprintf(stderr, fmt, va); - fprintf(stderr, "\n"); -} + srcstr = srcpos_string(pos); -void -srcpos_error(struct srcpos *pos, char const *fmt, ...) -{ - va_list va; + fprintf(stderr, "%s: %s ", prefix, srcstr); + vfprintf(stderr, fmt, va); + fprintf(stderr, "\n"); - va_start(va, fmt); - srcpos_verror(pos, fmt, va); - va_end(va); + free(srcstr); } - -void -srcpos_warn(struct srcpos *pos, char const *fmt, ...) +void srcpos_error(struct srcpos *pos, const char *prefix, + const char *fmt, ...) { - const char *srcstr; va_list va; - va_start(va, fmt); - - srcstr = srcpos_string(pos); - - fprintf(stderr, "Warning: %s ", srcstr); - vfprintf(stderr, fmt, va); - fprintf(stderr, "\n"); + va_start(va, fmt); + srcpos_verror(pos, prefix, fmt, va); va_end(va); } -- cgit 1.2.3-korg