Thread (5 messages) 5 messages, 3 authors, 2016-01-31

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

From: Vlastimil Babka <hidden>
Date: 2016-01-29 11:25:21
Also in: linux-s390

On 01/29/2016 11:53 AM, Stephen Rothwell wrote:
Hi Vlastimil,

On Fri, 29 Jan 2016 11:28:59 +0100 Vlastimil Babka [off-list ref] wrote:
quoted
quoted
   include/linux/jump_label.h: In function 'static_key_count':  
quoted
quoted
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<----
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help