linux-stable/drivers/staging/media
Guenter Roeck 0894da849f 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: fc96d58c10 ("[media] v4l: omap4iss: Add support for OMAP4 camera interface - Video devices")
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Acked-by: David S. Miller <davem@davemloft.net>
Cc: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
[ Added explanation of C scope rules - Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-07-24 10:43:34 -07:00
..
bcm2048 docs: Fix some broken references 2018-06-15 18:10:01 -03:00
davinci_vpfe media: Remove depends on HAS_DMA in case of platform dependency 2018-05-28 16:17:08 -04:00
imx treewide: devm_kzalloc() -> devm_kcalloc() 2018-06-12 16:19:22 -07:00
imx074 media: imx074: deprecate, move to staging 2018-02-23 02:30:26 -05:00
mt9t031 media: mt9t031: deprecate, move to staging 2018-02-23 02:31:38 -05:00
omap4iss media: staging: omap4iss: Include asm/cacheflush.h after generic includes 2018-07-24 10:43:34 -07:00
tegra-vde media: staging: tegra-vde: Reset VDE regardless of memory client resetting failure 2018-06-05 09:49:24 -04:00
zoran media: v4l: fix broken video4linux docs locations 2018-06-15 18:10:01 -03:00
Kconfig media: zoran: move to staging in preparation for removal 2018-05-25 15:21:36 -04:00
Makefile media: zoran: move to staging in preparation for removal 2018-05-25 15:21:36 -04:00