Re: [linux-next:master 1875/2100] include/linux/jump_label.h:122:2: error: implicit declaration of function 'atomic_read'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/29/2016 11:53 AM, Stephen Rothwell wrote:
> Hi Vlastimil,
> 
> On Fri, 29 Jan 2016 11:28:59 +0100 Vlastimil Babka <vbabka@xxxxxxx> wrote:
>> >    include/linux/jump_label.h: In function 'static_key_count':  
>> >>> include/linux/jump_label.h:122:2: error: implicit declaration of function 'atomic_read' [-Werror=implicit-function-declaration]  
>> >      return atomic_read(&key->enabled);  
>> 
>> Sigh.
>> 
>> I don't get it, there's "#include <linux/atomic.h>" in jump_label.h right before
>> it gets used. So, what implicit declaration?
> 
> But we are in the process of reading linux/atomic.h already, and the
> #include in jump_label.h will just not read it then (because of the
> include guards) so the body of linux/atomic.h has not yet been read
> when we process static_key_count().  i.e. we have a circular inclusion.
 
Oh, of course, doh. Thanks.

Please replace the -fix with this patch. Sorry again.

----8<----
>From 1e6b1ae6bf55410fb816cf910c4d91533642072b Mon Sep 17 00:00:00 2001
From: Vlastimil Babka <vbabka@xxxxxxx>
Date: Fri, 29 Jan 2016 12:18:21 +0100
Subject: [PATCH] mm, printk: introduce new format string for flags-fix

Due to rebasing mistake, mmdebug.h keeps including tracepoint.h, causing
header dependency issues on some arches.
Remove the include, and related declarations of flags arrays, which reside
in mm/internal.h and lib/vsprintf.c already includes that header.

Signed-off-by: Vlastimil Babka <vbabka@xxxxxxx>
---
 include/linux/mmdebug.h | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/include/linux/mmdebug.h b/include/linux/mmdebug.h
index 3fb9bc65d61d..de7be78c6f0e 100644
--- a/include/linux/mmdebug.h
+++ b/include/linux/mmdebug.h
@@ -3,17 +3,11 @@
 
 #include <linux/bug.h>
 #include <linux/stringify.h>
-#include <linux/types.h>
-#include <linux/tracepoint.h>
 
 struct page;
 struct vm_area_struct;
 struct mm_struct;
 
-extern const struct trace_print_flags pageflag_names[];
-extern const struct trace_print_flags vmaflag_names[];
-extern const struct trace_print_flags gfpflag_names[];
-
 extern void dump_page(struct page *page, const char *reason);
 extern void __dump_page(struct page *page, const char *reason);
 void dump_vma(const struct vm_area_struct *vma);
-- 
2.7.0


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]