Skip to content

Commit 0894da8

Browse files
groecktorvalds
authored andcommitted
media: staging: omap4iss: Include asm/cacheflush.h after generic includes
Including asm/cacheflush.h first results in the following build error when trying to build sparc32:allmodconfig, because 'struct page' has not been declared, and the function declaration ends up creating a separate (private) declaration of struct page (as a result of function arguments being in the scope of the function declaration and definition, not in global scope). The C scoping rules do not just affect variable visibility, they also affect type declaration visibility. The end result is that when the actual call site is seen in <linux/highmem.h>, the 'struct page' type in the caller is not the same 'struct page' that the function was declared with, resulting in: In file included from arch/sparc/include/asm/page.h:10:0, ... from drivers/staging/media/omap4iss/iss_video.c:15: include/linux/highmem.h: In function 'clear_user_highpage': include/linux/highmem.h:137:31: error: passing argument 1 of 'sparc_flush_page_to_ram' from incompatible pointer type Include generic includes files first to fix the problem. Fixes: fc96d58 ("[media] v4l: omap4iss: Add support for OMAP4 camera interface - Video devices") Suggested-by: Linus Torvalds <[email protected]> Acked-by: David S. Miller <[email protected]> Cc: Randy Dunlap <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> [ Added explanation of C scope rules - Linus ] Signed-off-by: Linus Torvalds <[email protected]>
1 parent d72e90f commit 0894da8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/staging/media/omap4iss/iss_video.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
* (at your option) any later version.
1212
*/
1313

14-
#include <asm/cacheflush.h>
1514
#include <linux/clk.h>
1615
#include <linux/mm.h>
1716
#include <linux/pagemap.h>
@@ -24,6 +23,8 @@
2423
#include <media/v4l2-ioctl.h>
2524
#include <media/v4l2-mc.h>
2625

26+
#include <asm/cacheflush.h>
27+
2728
#include "iss_video.h"
2829
#include "iss.h"
2930

0 commit comments

Comments
 (0)