lkml.org 
[lkml]   [2013]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC PATCH -next] Fix printk_once build errors due to __read_mostly
From
Date
On Wed, 2013-10-30 at 13:48 -0700, Andrew Morton wrote:
> On Wed, 30 Oct 2013 10:18:21 +0000 James Hogan <james.hogan@imgtec.com> wrote:
[]
> > Note that this actually adds a recursive include, since <linux/cache.h>
> > includes <linux/kernel.h>, which includes <linux/printk.h>. The actual
> > dependencies are all in macros so it doesn't actually seem to result in
> > any build failures, but it's clearly less than ideal.
>
> Yitch.

Yeah.

There are about ~700 files in the tree that use __read_mostly.
Only about ~25 of those actually #include <linux/cache.h>

I did a script that adds the #include, but 700 files is a _lot_.

For today's next:

$ git grep -w --name-only __read_mostly | \
xargs grep -P -l "^\s*#\s*include\s+<linux/cache.h>" | wc -l
28

$ git grep -w --name-only __read_mostly | \
xargs grep -P -L "^\s*#\s*include\s+<linux/cache.h>" | wc -l
716

Untangling that crud is nasty.



\
 
 \ /
  Last update: 2013-10-31 01:41    [W:0.098 / U:1.756 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site