Remove unnecessary includes of <linux/screen_info.h>
Subsystems (9)
Thomas Zimmermann
maintainerv2 cover Remove unnecessary includes of <linux/screen_info.h>
(was: arch,fbdev: Move screen_info into arch/)
Remove include statements of <linux/screen_info.h> The patches have been reviewed as part of the patchset at [1]. Patch 1 has a fix to make it build on loongarch.
v2:
* update loongarch
[1] https://patchwork.freedesktop.org/series/120010/#rev1
Thomas Zimmermann (4):
efi: Do not include <linux/screen_info.h> from EFI header fbdev/sm712fb: Do not include <linux/screen_info.h>
sysfb: Do not include <linux/screen_info.h> from sysfb header staging/sm750fb: Do not include <linux/screen_info.h>
arch/arm/kernel/efi.c | 2 ++ arch/arm64/kernel/efi.c | 1 + arch/loongarch/kernel/efi.c | 1 + drivers/firmware/efi/libstub/efi-stub-entry.c | 2 ++ drivers/firmware/efi/libstub/screen_info.c | 2 ++ drivers/staging/sm750fb/sm750.c | 1 - drivers/staging/sm750fb/sm750_accel.c | 1 - drivers/staging/sm750fb/sm750_cursor.c | 1 - drivers/staging/sm750fb/sm750_hw.c | 1 - drivers/video/fbdev/sm712fb.c | 9 +++++++-- include/linux/efi.h | 3 ++- include/linux/sysfb.h | 3 ++- 12 files changed, 19 insertions(+), 8 deletions(-)
Signature · 1 line
2.41.0
Thomas Zimmermann
maintainerPATCH v2 1/4 efi: Do not include <linux/screen_info.h> from EFI header
The header file <linux/efi.h> does not need anything from <linux/screen_info.h>. Declare struct screen_info and remove the include statements. Update a number of source files that require struct screen_info's definition.
v2:
* update loongarch (Jingfeng)
--- arch/arm/kernel/efi.c | 2 ++ arch/arm64/kernel/efi.c | 1 + arch/loongarch/kernel/efi.c | 1 + drivers/firmware/efi/libstub/efi-stub-entry.c | 2 ++ drivers/firmware/efi/libstub/screen_info.c | 2 ++ include/linux/efi.h | 3 ++- 6 files changed, 10 insertions(+), 1 deletion(-)
arch/arm/kernel/efi.c +2 -0
@@ -5,6 +5,8 @@#include <linux/efi.h> #include <linux/memblock.h> +#include <linux/screen_info.h> +#include <asm/efi.h> #include <asm/mach/map.h> #include <asm/mmu_context.h>
arch/arm64/kernel/efi.c +1 -0
@@ -9,6 +9,7 @@#include <linux/efi.h> #include <linux/init.h> +#include <linux/screen_info.h> #include <asm/efi.h> #include <asm/stacktrace.h>
arch/loongarch/kernel/efi.c +1 -0
@@ -18,6 +18,7 @@#include <linux/kobject.h> #include <linux/memblock.h> #include <linux/reboot.h> +#include <linux/screen_info.h> #include <linux/uaccess.h> #include <asm/early_ioremap.h>
drivers/firmware/efi/libstub/efi-stub-entry.c +2 -0
@@ -1,6 +1,8 @@// SPDX-License-Identifier: GPL-2.0-only #include <linux/efi.h> +#include <linux/screen_info.h> +#include <asm/efi.h> #include "efistub.h"
drivers/firmware/efi/libstub/screen_info.c +2 -0
@@ -1,6 +1,8 @@// SPDX-License-Identifier: GPL-2.0 #include <linux/efi.h> +#include <linux/screen_info.h> +#include <asm/efi.h> #include "efistub.h"
include/linux/efi.h +2 -1
@@ -24,10 +24,11 @@#include <linux/range.h> #include <linux/reboot.h> #include <linux/uuid.h> -#include <linux/screen_info.h> #include <asm/page.h> +struct screen_info ; +#define EFI_SUCCESS 0#define EFI_LOAD_ERROR ( 1 | (1UL << (BITS_PER_LONG-1)))#define EFI_INVALID_PARAMETER ( 2 | (1UL << (BITS_PER_LONG-1)))
Signature · 1 line
2.41.0
Re: [PATCH v2 1/4] efi: Do not include <linux/screen_info.h> from EFI header
Quoted 8 lines · Thomas Zimmermann
The header file <
linux/efi.h> does not need anything from <linux/screen_info.h>. Declare structscreen_infoand remove the include statements. Update a number of source files that require struct screen_info's definition.v2:
* update loongarch (Jingfeng)
Quoted 7 lines
Signed-off-by Thomas Zimmermann <[email protected]>Reviewed-by Javier Martinez Canillas <[email protected]>Reviewed-by Sui Jingfeng <[email protected]>Cc Ard Biesheuvel <[email protected]>Cc Russell King <[email protected]>Cc Catalin Marinas <[email protected]>Cc Will Deacon <[email protected]>
Thomas Zimmermann
maintainerPATCH v2 2/4 fbdev/sm712fb: Do not include <linux/screen_info.h>
In reply to Thomas ZimmermannSm712fb's dependency on <linux/screen_info.h> is artificial in that it only uses struct screen_info for its internals. Replace the use of struct screen_info with a custom data structure and remove the include of <linux/screen_info.h>.
--- drivers/video/fbdev/sm712fb.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/video/fbdev/sm712fb.c +7 -2
@@ -27,12 +27,17 @@#include <linux/uaccess.h> #include <linux/module.h> #include <linux/console.h> -#include <linux/screen_info.h> #include <linux/pm.h> #include "sm712.h" +struct smtcfb_screen_info { +u16 lfb_width; +u16 lfb_height; +u16 lfb_depth; +}; +/* * Private structure */
@@ -829,7 +834,7 @@ static const struct modeinit vgamode[] = { }, }; -static struct screen_info smtc_scr_info; +static struct smtcfb_screen_info smtc_scr_info;static char *mode_option;
Signature · 1 line
2.41.0
Re: [PATCH v2 2/4] fbdev/sm712fb: Do not include <linux/screen_info.h>
Quoted 10 lines · Thomas Zimmermann
Sm712fb's dependency on <
linux/screen_info.h> is artificial in that it only uses structscreen_infofor its internals. Replace the use of structscreen_infowith a custom data structure and remove the include of <linux/screen_info.h>.Signed-off-by Thomas Zimmermann <[email protected]>Reviewed-by Javier Martinez Canillas <[email protected]>Cc Sudip Mukherjee <[email protected]>Cc Teddy Wang <[email protected]>Cc Helge Deller <[email protected]>
Thomas Zimmermann
maintainerPATCH v2 3/4 sysfb: Do not include <linux/screen_info.h> from sysfb header
In reply to Thomas ZimmermannThe header file <linux/sysfb.h> does not need anything from <linux/screen_info.h>. Declare struct screen_info and remove the include statements.
--- include/linux/sysfb.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
include/linux/sysfb.h +2 -1
@@ -9,7 +9,8 @@#include <linux/kernel.h> #include <linux/platform_data/simplefb.h> -#include <linux/screen_info.h> + +struct screen_info ;enum {M_I17 ,/* 17-Inch iMac */
Signature · 1 line
2.41.0
Re: [PATCH v2 3/4] sysfb: Do not include <linux/screen_info.h> from sysfb header
Quoted 10 lines · Thomas Zimmermann
The header file <
linux/sysfb.h> does not need anything from <linux/screen_info.h>. Declare structscreen_infoand remove the include statements.Signed-off-by Thomas Zimmermann <[email protected]>Reviewed-by Javier Martinez Canillas <[email protected]>Reviewed-by Sui Jingfeng <[email protected]>Cc Ard Biesheuvel <[email protected]>Cc Hans de Goede <[email protected]>Cc Javier Martinez Canillas <[email protected]>
Thomas Zimmermann
maintainerPATCH v2 4/4 staging/sm750fb: Do not include <linux/screen_info.h>
In reply to Thomas ZimmermannThe sm750fb driver does not need anything from <linux/screen_info.h>. Remove the include statements.
--- drivers/staging/sm750fb/sm750.c | 1 - drivers/staging/sm750fb/sm750_accel.c | 1 - drivers/staging/sm750fb/sm750_cursor.c | 1 - drivers/staging/sm750fb/sm750_hw.c | 1 - 4 files changed, 4 deletions(-)
drivers/staging/sm750fb/sm750.c +0 -1
@@ -14,7 +14,6 @@#include <linux/mm_types.h> #include <linux/vmalloc.h> #include <linux/pagemap.h> -#include <linux/screen_info.h> #include <linux/console.h> #include "sm750.h"
drivers/staging/sm750fb/sm750_accel.c +0 -1
@@ -14,7 +14,6 @@#include <linux/pagemap.h> #include <linux/console.h> #include <linux/platform_device.h> -#include <linux/screen_info.h> #include "sm750.h" #include "sm750_accel.h"
drivers/staging/sm750fb/sm750_cursor.c +0 -1
@@ -14,7 +14,6 @@#include <linux/pagemap.h> #include <linux/console.h> #include <linux/platform_device.h> -#include <linux/screen_info.h> #include "sm750.h" #include "sm750_cursor.h"
drivers/staging/sm750fb/sm750_hw.c +0 -1
@@ -17,7 +17,6 @@#include <asm/mtrr.h> #endif #include <linux/platform_device.h> -#include <linux/screen_info.h> #include <linux/sizes.h> #include "sm750.h"
Signature · 1 line
2.41.0
Re: [PATCH v2 4/4] staging/sm750fb: Do not include <linux/screen_info.h>
Quoted 7 lines · Thomas Zimmermann
The sm750fb driver does not need anything from <
linux/screen_info.h>. Remove the include statements.Signed-off-by Thomas Zimmermann <[email protected]>Reviewed-by Javier Martinez Canillas <[email protected]>Cc Sudip Mukherjee <[email protected]>Cc Teddy Wang <[email protected]>
Quoted 7 lines
--- drivers/staging/sm750fb/sm750.c | 1 - drivers/staging/sm750fb/sm750_accel.c | 1 - drivers/staging/sm750fb/sm750_cursor.c | 1 - drivers/staging/sm750fb/sm750_hw.c | 1 - 4 files changed, 4 deletions(-)