Commit 7e40c210 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'kbuild-fixes-v6.9' of...

Merge tag 'kbuild-fixes-v6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild

Pull Kbuild fixes from Masahiro Yamada:

 - Deduplicate Kconfig entries for CONFIG_CXL_PMU

 - Fix unselectable choice entry in MIPS Kconfig, and forbid this
   structure

 - Remove unused include/asm-generic/export.h

 - Fix a NULL pointer dereference bug in modpost

 - Enable -Woverride-init warning consistently with W=1

 - Drop KCSAN flags from *.mod.c files

* tag 'kbuild-fixes-v6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
  kconfig: Fix typo HEIGTH to HEIGHT
  Documentation/llvm: Note s390 LLVM=1 support with LLVM 18.1.0 and newer
  kbuild: Disable KCSAN for autogenerated *.mod.c intermediaries
  kbuild: make -Woverride-init warnings more consistent
  modpost: do not make find_tosym() return NULL
  export.h: remove include/asm-generic/export.h
  kconfig: do not reparent the menu inside a choice block
  MIPS: move unselectable FIT_IMAGE_FDT_EPM5 out of the "System type" choice
  cxl: remove CONFIG_CXL_PMU entry in drivers/cxl/Kconfig
parents 18737353 89e5462b
...@@ -178,7 +178,7 @@ yet. Bug reports are always welcome at the issue tracker below! ...@@ -178,7 +178,7 @@ yet. Bug reports are always welcome at the issue tracker below!
- ``LLVM=1`` - ``LLVM=1``
* - s390 * - s390
- Maintained - Maintained
- ``CC=clang`` - ``LLVM=1`` (LLVM >= 18.1.0), ``CC=clang`` (LLVM < 18.1.0)
* - um (User Mode) * - um (User Mode)
- Maintained - Maintained
- ``LLVM=1`` - ``LLVM=1``
......
...@@ -619,15 +619,6 @@ config MACH_EYEQ5 ...@@ -619,15 +619,6 @@ config MACH_EYEQ5
bool bool
config FIT_IMAGE_FDT_EPM5
bool "Include FDT for Mobileye EyeQ5 development platforms"
depends on MACH_EYEQ5
default n
help
Enable this to include the FDT for the EyeQ5 development platforms
from Mobileye in the FIT kernel image.
This requires u-boot on the platform.
config MACH_NINTENDO64 config MACH_NINTENDO64
bool "Nintendo 64 console" bool "Nintendo 64 console"
select CEVT_R4K select CEVT_R4K
...@@ -1011,6 +1002,15 @@ config CAVIUM_OCTEON_SOC ...@@ -1011,6 +1002,15 @@ config CAVIUM_OCTEON_SOC
endchoice endchoice
config FIT_IMAGE_FDT_EPM5
bool "Include FDT for Mobileye EyeQ5 development platforms"
depends on MACH_EYEQ5
default n
help
Enable this to include the FDT for the EyeQ5 development platforms
from Mobileye in the FIT kernel image.
This requires u-boot on the platform.
source "arch/mips/alchemy/Kconfig" source "arch/mips/alchemy/Kconfig"
source "arch/mips/ath25/Kconfig" source "arch/mips/ath25/Kconfig"
source "arch/mips/ath79/Kconfig" source "arch/mips/ath79/Kconfig"
......
...@@ -144,17 +144,4 @@ config CXL_REGION_INVALIDATION_TEST ...@@ -144,17 +144,4 @@ config CXL_REGION_INVALIDATION_TEST
If unsure, or if this kernel is meant for production environments, If unsure, or if this kernel is meant for production environments,
say N. say N.
config CXL_PMU
tristate "CXL Performance Monitoring Unit"
default CXL_BUS
depends on PERF_EVENTS
help
Support performance monitoring as defined in CXL rev 3.0
section 13.2: Performance Monitoring. CXL components may have
one or more CXL Performance Monitoring Units (CPMUs).
Say 'y/m' to enable a driver that will attach to performance
monitoring units and provide standard perf based interfaces.
If unsure say 'm'.
endif endif
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
# Makefile for the 'controller' sub-component of DAL. # Makefile for the 'controller' sub-component of DAL.
# It provides the control and status of HW CRTC block. # It provides the control and status of HW CRTC block.
CFLAGS_$(AMDDALPATH)/dc/dce110/dce110_resource.o = $(call cc-disable-warning, override-init) CFLAGS_$(AMDDALPATH)/dc/dce110/dce110_resource.o = -Wno-override-init
DCE110 = dce110_timing_generator.o \ DCE110 = dce110_timing_generator.o \
dce110_compressor.o dce110_opp_regamma_v.o \ dce110_compressor.o dce110_opp_regamma_v.o \
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
# Makefile for the 'controller' sub-component of DAL. # Makefile for the 'controller' sub-component of DAL.
# It provides the control and status of HW CRTC block. # It provides the control and status of HW CRTC block.
CFLAGS_$(AMDDALPATH)/dc/dce112/dce112_resource.o = $(call cc-disable-warning, override-init) CFLAGS_$(AMDDALPATH)/dc/dce112/dce112_resource.o = -Wno-override-init
DCE112 = dce112_compressor.o DCE112 = dce112_compressor.o
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
# It provides the control and status of HW CRTC block. # It provides the control and status of HW CRTC block.
CFLAGS_$(AMDDALPATH)/dc/dce120/dce120_resource.o = $(call cc-disable-warning, override-init) CFLAGS_$(AMDDALPATH)/dc/dce120/dce120_resource.o = -Wno-override-init
DCE120 = dce120_timing_generator.o DCE120 = dce120_timing_generator.o
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
# Makefile for the 'controller' sub-component of DAL. # Makefile for the 'controller' sub-component of DAL.
# It provides the control and status of HW CRTC block. # It provides the control and status of HW CRTC block.
CFLAGS_$(AMDDALPATH)/dc/dce60/dce60_resource.o = $(call cc-disable-warning, override-init) CFLAGS_$(AMDDALPATH)/dc/dce60/dce60_resource.o = -Wno-override-init
DCE60 = dce60_timing_generator.o dce60_hw_sequencer.o \ DCE60 = dce60_timing_generator.o dce60_hw_sequencer.o \
dce60_resource.o dce60_resource.o
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
# Makefile for the 'controller' sub-component of DAL. # Makefile for the 'controller' sub-component of DAL.
# It provides the control and status of HW CRTC block. # It provides the control and status of HW CRTC block.
CFLAGS_$(AMDDALPATH)/dc/dce80/dce80_resource.o = $(call cc-disable-warning, override-init) CFLAGS_$(AMDDALPATH)/dc/dce80/dce80_resource.o = -Wno-override-init
DCE80 = dce80_timing_generator.o DCE80 = dce80_timing_generator.o
......
...@@ -33,9 +33,9 @@ endif ...@@ -33,9 +33,9 @@ endif
subdir-ccflags-$(CONFIG_DRM_I915_WERROR) += -Werror subdir-ccflags-$(CONFIG_DRM_I915_WERROR) += -Werror
# Fine grained warnings disable # Fine grained warnings disable
CFLAGS_i915_pci.o = $(call cc-disable-warning, override-init) CFLAGS_i915_pci.o = -Wno-override-init
CFLAGS_display/intel_display_device.o = $(call cc-disable-warning, override-init) CFLAGS_display/intel_display_device.o = -Wno-override-init
CFLAGS_display/intel_fbdev.o = $(call cc-disable-warning, override-init) CFLAGS_display/intel_fbdev.o = -Wno-override-init
# Support compiling the display code separately for both i915 and xe # Support compiling the display code separately for both i915 and xe
# drivers. Define I915 when building i915. # drivers. Define I915 when building i915.
......
...@@ -172,8 +172,8 @@ subdir-ccflags-$(CONFIG_DRM_XE_DISPLAY) += \ ...@@ -172,8 +172,8 @@ subdir-ccflags-$(CONFIG_DRM_XE_DISPLAY) += \
-Ddrm_i915_gem_object=xe_bo \ -Ddrm_i915_gem_object=xe_bo \
-Ddrm_i915_private=xe_device -Ddrm_i915_private=xe_device
CFLAGS_i915-display/intel_fbdev.o = $(call cc-disable-warning, override-init) CFLAGS_i915-display/intel_fbdev.o = -Wno-override-init
CFLAGS_i915-display/intel_display_device.o = $(call cc-disable-warning, override-init) CFLAGS_i915-display/intel_display_device.o = -Wno-override-init
# Rule to build SOC code shared with i915 # Rule to build SOC code shared with i915
$(obj)/i915-soc/%.o: $(srctree)/drivers/gpu/drm/i915/soc/%.c FORCE $(obj)/i915-soc/%.o: $(srctree)/drivers/gpu/drm/i915/soc/%.c FORCE
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
* the macros available to do this only define GCC 8. * the macros available to do this only define GCC 8.
*/ */
__diag_push(); __diag_push();
__diag_ignore(GCC, 8, "-Woverride-init", __diag_ignore_all("-Woverride-init",
"logic to initialize all and then override some is OK"); "logic to initialize all and then override some is OK");
static const u16 sh_eth_offset_gigabit[SH_ETH_MAX_REGISTER_OFFSET] = { static const u16 sh_eth_offset_gigabit[SH_ETH_MAX_REGISTER_OFFSET] = {
SH_ETH_OFFSET_DEFAULTS, SH_ETH_OFFSET_DEFAULTS,
......
# SPDX-License-Identifier: GPL-2.0-only # SPDX-License-Identifier: GPL-2.0-only
# Aspeed pinctrl support # Aspeed pinctrl support
ccflags-y += $(call cc-option,-Woverride-init) ccflags-y += -Woverride-init
obj-$(CONFIG_PINCTRL_ASPEED) += pinctrl-aspeed.o pinmux-aspeed.o obj-$(CONFIG_PINCTRL_ASPEED) += pinctrl-aspeed.o pinmux-aspeed.o
obj-$(CONFIG_PINCTRL_ASPEED_G4) += pinctrl-aspeed-g4.o obj-$(CONFIG_PINCTRL_ASPEED_G4) += pinctrl-aspeed-g4.o
obj-$(CONFIG_PINCTRL_ASPEED_G5) += pinctrl-aspeed-g5.o obj-$(CONFIG_PINCTRL_ASPEED_G5) += pinctrl-aspeed-g5.o
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
obj-y += proc.o obj-y += proc.o
CFLAGS_task_mmu.o += $(call cc-option,-Wno-override-init,) CFLAGS_task_mmu.o += -Wno-override-init
proc-y := nommu.o task_nommu.o proc-y := nommu.o task_nommu.o
proc-$(CONFIG_MMU) := task_mmu.o proc-$(CONFIG_MMU) := task_mmu.o
......
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef __ASM_GENERIC_EXPORT_H
#define __ASM_GENERIC_EXPORT_H
/*
* <asm/export.h> and <asm-generic/export.h> are deprecated.
* Please include <linux/export.h> directly.
*/
#include <linux/export.h>
#endif
...@@ -4,7 +4,7 @@ ifneq ($(CONFIG_BPF_JIT_ALWAYS_ON),y) ...@@ -4,7 +4,7 @@ ifneq ($(CONFIG_BPF_JIT_ALWAYS_ON),y)
# ___bpf_prog_run() needs GCSE disabled on x86; see 3193c0836f203 for details # ___bpf_prog_run() needs GCSE disabled on x86; see 3193c0836f203 for details
cflags-nogcse-$(CONFIG_X86)$(CONFIG_CC_IS_GCC) := -fno-gcse cflags-nogcse-$(CONFIG_X86)$(CONFIG_CC_IS_GCC) := -fno-gcse
endif endif
CFLAGS_core.o += $(call cc-disable-warning, override-init) $(cflags-nogcse-yy) CFLAGS_core.o += -Wno-override-init $(cflags-nogcse-yy)
obj-$(CONFIG_BPF_SYSCALL) += syscall.o verifier.o inode.o helpers.o tnum.o log.o token.o obj-$(CONFIG_BPF_SYSCALL) += syscall.o verifier.o inode.o helpers.o tnum.o log.o token.o
obj-$(CONFIG_BPF_SYSCALL) += bpf_iter.o map_iter.o task_iter.o prog_iter.o link_iter.o obj-$(CONFIG_BPF_SYSCALL) += bpf_iter.o map_iter.o task_iter.o prog_iter.o link_iter.o
......
...@@ -29,8 +29,7 @@ KCOV_INSTRUMENT_mmzone.o := n ...@@ -29,8 +29,7 @@ KCOV_INSTRUMENT_mmzone.o := n
KCOV_INSTRUMENT_vmstat.o := n KCOV_INSTRUMENT_vmstat.o := n
KCOV_INSTRUMENT_failslab.o := n KCOV_INSTRUMENT_failslab.o := n
CFLAGS_init-mm.o += $(call cc-disable-warning, override-init) CFLAGS_init-mm.o += -Wno-override-init
CFLAGS_init-mm.o += $(call cc-disable-warning, initializer-overrides)
mmu-y := nommu.o mmu-y := nommu.o
mmu-$(CONFIG_MMU) := highmem.o memory.o mincore.o \ mmu-$(CONFIG_MMU) := highmem.o memory.o mincore.o \
......
...@@ -114,6 +114,8 @@ KBUILD_CFLAGS += $(call cc-disable-warning, format-overflow) ...@@ -114,6 +114,8 @@ KBUILD_CFLAGS += $(call cc-disable-warning, format-overflow)
KBUILD_CFLAGS += $(call cc-disable-warning, format-truncation) KBUILD_CFLAGS += $(call cc-disable-warning, format-truncation)
KBUILD_CFLAGS += $(call cc-disable-warning, stringop-truncation) KBUILD_CFLAGS += $(call cc-disable-warning, stringop-truncation)
KBUILD_CFLAGS += -Wno-override-init # alias for -Wno-initializer-overrides in clang
ifdef CONFIG_CC_IS_CLANG ifdef CONFIG_CC_IS_CLANG
# Clang before clang-16 would warn on default argument promotions. # Clang before clang-16 would warn on default argument promotions.
ifneq ($(call clang-min-version, 160000),y) ifneq ($(call clang-min-version, 160000),y)
...@@ -151,10 +153,6 @@ KBUILD_CFLAGS += -Wtype-limits ...@@ -151,10 +153,6 @@ KBUILD_CFLAGS += -Wtype-limits
KBUILD_CFLAGS += $(call cc-option, -Wmaybe-uninitialized) KBUILD_CFLAGS += $(call cc-option, -Wmaybe-uninitialized)
KBUILD_CFLAGS += $(call cc-option, -Wunused-macros) KBUILD_CFLAGS += $(call cc-option, -Wunused-macros)
ifdef CONFIG_CC_IS_CLANG
KBUILD_CFLAGS += -Winitializer-overrides
endif
KBUILD_CPPFLAGS += -DKBUILD_EXTRA_WARN2 KBUILD_CPPFLAGS += -DKBUILD_EXTRA_WARN2
else else
...@@ -164,9 +162,7 @@ KBUILD_CFLAGS += -Wno-missing-field-initializers ...@@ -164,9 +162,7 @@ KBUILD_CFLAGS += -Wno-missing-field-initializers
KBUILD_CFLAGS += -Wno-type-limits KBUILD_CFLAGS += -Wno-type-limits
KBUILD_CFLAGS += -Wno-shift-negative-value KBUILD_CFLAGS += -Wno-shift-negative-value
ifdef CONFIG_CC_IS_CLANG ifdef CONFIG_CC_IS_GCC
KBUILD_CFLAGS += -Wno-initializer-overrides
else
KBUILD_CFLAGS += -Wno-maybe-uninitialized KBUILD_CFLAGS += -Wno-maybe-uninitialized
endif endif
......
...@@ -23,7 +23,7 @@ modname = $(notdir $(@:.mod.o=)) ...@@ -23,7 +23,7 @@ modname = $(notdir $(@:.mod.o=))
part-of-module = y part-of-module = y
quiet_cmd_cc_o_c = CC [M] $@ quiet_cmd_cc_o_c = CC [M] $@
cmd_cc_o_c = $(CC) $(filter-out $(CC_FLAGS_CFI) $(CFLAGS_GCOV), $(c_flags)) -c -o $@ $< cmd_cc_o_c = $(CC) $(filter-out $(CC_FLAGS_CFI) $(CFLAGS_GCOV) $(CFLAGS_KCSAN), $(c_flags)) -c -o $@ $<
%.mod.o: %.mod.c FORCE %.mod.o: %.mod.c FORCE
$(call if_changed_dep,cc_o_c) $(call if_changed_dep,cc_o_c)
......
...@@ -552,11 +552,6 @@ static int conf_choice(struct menu *menu) ...@@ -552,11 +552,6 @@ static int conf_choice(struct menu *menu)
continue; continue;
} }
sym_set_tristate_value(child->sym, yes); sym_set_tristate_value(child->sym, yes);
for (child = child->list; child; child = child->next) {
indent += 2;
conf(child);
indent -= 2;
}
return 1; return 1;
} }
} }
......
...@@ -89,7 +89,7 @@ void menu_add_visibility(struct expr *dep); ...@@ -89,7 +89,7 @@ void menu_add_visibility(struct expr *dep);
struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep); struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep);
void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep); void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep);
void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep); void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep);
void menu_finalize(struct menu *parent); void menu_finalize(void);
void menu_set_type(int type); void menu_set_type(int type);
extern struct menu rootmenu; extern struct menu rootmenu;
......
...@@ -119,7 +119,7 @@ int dialog_checklist(const char *title, const char *prompt, int height, ...@@ -119,7 +119,7 @@ int dialog_checklist(const char *title, const char *prompt, int height,
} }
do_resize: do_resize:
if (getmaxy(stdscr) < (height + CHECKLIST_HEIGTH_MIN)) if (getmaxy(stdscr) < (height + CHECKLIST_HEIGHT_MIN))
return -ERRDISPLAYTOOSMALL; return -ERRDISPLAYTOOSMALL;
if (getmaxx(stdscr) < (width + CHECKLIST_WIDTH_MIN)) if (getmaxx(stdscr) < (width + CHECKLIST_WIDTH_MIN))
return -ERRDISPLAYTOOSMALL; return -ERRDISPLAYTOOSMALL;
......
...@@ -162,17 +162,17 @@ int on_key_esc(WINDOW *win); ...@@ -162,17 +162,17 @@ int on_key_esc(WINDOW *win);
int on_key_resize(void); int on_key_resize(void);
/* minimum (re)size values */ /* minimum (re)size values */
#define CHECKLIST_HEIGTH_MIN 6 /* For dialog_checklist() */ #define CHECKLIST_HEIGHT_MIN 6 /* For dialog_checklist() */
#define CHECKLIST_WIDTH_MIN 6 #define CHECKLIST_WIDTH_MIN 6
#define INPUTBOX_HEIGTH_MIN 2 /* For dialog_inputbox() */ #define INPUTBOX_HEIGHT_MIN 2 /* For dialog_inputbox() */
#define INPUTBOX_WIDTH_MIN 2 #define INPUTBOX_WIDTH_MIN 2
#define MENUBOX_HEIGTH_MIN 15 /* For dialog_menu() */ #define MENUBOX_HEIGHT_MIN 15 /* For dialog_menu() */
#define MENUBOX_WIDTH_MIN 65 #define MENUBOX_WIDTH_MIN 65
#define TEXTBOX_HEIGTH_MIN 8 /* For dialog_textbox() */ #define TEXTBOX_HEIGHT_MIN 8 /* For dialog_textbox() */
#define TEXTBOX_WIDTH_MIN 8 #define TEXTBOX_WIDTH_MIN 8
#define YESNO_HEIGTH_MIN 4 /* For dialog_yesno() */ #define YESNO_HEIGHT_MIN 4 /* For dialog_yesno() */
#define YESNO_WIDTH_MIN 4 #define YESNO_WIDTH_MIN 4
#define WINDOW_HEIGTH_MIN 19 /* For init_dialog() */ #define WINDOW_HEIGHT_MIN 19 /* For init_dialog() */
#define WINDOW_WIDTH_MIN 80 #define WINDOW_WIDTH_MIN 80
int init_dialog(const char *backtitle); int init_dialog(const char *backtitle);
......
...@@ -43,7 +43,7 @@ int dialog_inputbox(const char *title, const char *prompt, int height, int width ...@@ -43,7 +43,7 @@ int dialog_inputbox(const char *title, const char *prompt, int height, int width
strcpy(instr, init); strcpy(instr, init);
do_resize: do_resize:
if (getmaxy(stdscr) <= (height - INPUTBOX_HEIGTH_MIN)) if (getmaxy(stdscr) <= (height - INPUTBOX_HEIGHT_MIN))
return -ERRDISPLAYTOOSMALL; return -ERRDISPLAYTOOSMALL;
if (getmaxx(stdscr) <= (width - INPUTBOX_WIDTH_MIN)) if (getmaxx(stdscr) <= (width - INPUTBOX_WIDTH_MIN))
return -ERRDISPLAYTOOSMALL; return -ERRDISPLAYTOOSMALL;
......
...@@ -172,7 +172,7 @@ int dialog_menu(const char *title, const char *prompt, ...@@ -172,7 +172,7 @@ int dialog_menu(const char *title, const char *prompt,
do_resize: do_resize:
height = getmaxy(stdscr); height = getmaxy(stdscr);
width = getmaxx(stdscr); width = getmaxx(stdscr);
if (height < MENUBOX_HEIGTH_MIN || width < MENUBOX_WIDTH_MIN) if (height < MENUBOX_HEIGHT_MIN || width < MENUBOX_WIDTH_MIN)
return -ERRDISPLAYTOOSMALL; return -ERRDISPLAYTOOSMALL;
height -= 4; height -= 4;
......
...@@ -175,7 +175,7 @@ int dialog_textbox(const char *title, const char *tbuf, int initial_height, ...@@ -175,7 +175,7 @@ int dialog_textbox(const char *title, const char *tbuf, int initial_height,
do_resize: do_resize:
getmaxyx(stdscr, height, width); getmaxyx(stdscr, height, width);
if (height < TEXTBOX_HEIGTH_MIN || width < TEXTBOX_WIDTH_MIN) if (height < TEXTBOX_HEIGHT_MIN || width < TEXTBOX_WIDTH_MIN)
return -ERRDISPLAYTOOSMALL; return -ERRDISPLAYTOOSMALL;
if (initial_height != 0) if (initial_height != 0)
height = initial_height; height = initial_height;
......
...@@ -291,7 +291,7 @@ int init_dialog(const char *backtitle) ...@@ -291,7 +291,7 @@ int init_dialog(const char *backtitle)
getyx(stdscr, saved_y, saved_x); getyx(stdscr, saved_y, saved_x);
getmaxyx(stdscr, height, width); getmaxyx(stdscr, height, width);
if (height < WINDOW_HEIGTH_MIN || width < WINDOW_WIDTH_MIN) { if (height < WINDOW_HEIGHT_MIN || width < WINDOW_WIDTH_MIN) {
endwin(); endwin();
return -ERRDISPLAYTOOSMALL; return -ERRDISPLAYTOOSMALL;
} }
......
...@@ -32,7 +32,7 @@ int dialog_yesno(const char *title, const char *prompt, int height, int width) ...@@ -32,7 +32,7 @@ int dialog_yesno(const char *title, const char *prompt, int height, int width)
WINDOW *dialog; WINDOW *dialog;
do_resize: do_resize:
if (getmaxy(stdscr) < (height + YESNO_HEIGTH_MIN)) if (getmaxy(stdscr) < (height + YESNO_HEIGHT_MIN))
return -ERRDISPLAYTOOSMALL; return -ERRDISPLAYTOOSMALL;
if (getmaxx(stdscr) < (width + YESNO_WIDTH_MIN)) if (getmaxx(stdscr) < (width + YESNO_WIDTH_MIN))
return -ERRDISPLAYTOOSMALL; return -ERRDISPLAYTOOSMALL;
......
...@@ -659,9 +659,9 @@ static void conf_choice(struct menu *menu) ...@@ -659,9 +659,9 @@ static void conf_choice(struct menu *menu)
dialog_clear(); dialog_clear();
res = dialog_checklist(prompt ? prompt : "Main Menu", res = dialog_checklist(prompt ? prompt : "Main Menu",
radiolist_instructions, radiolist_instructions,
MENUBOX_HEIGTH_MIN, MENUBOX_HEIGHT_MIN,
MENUBOX_WIDTH_MIN, MENUBOX_WIDTH_MIN,
CHECKLIST_HEIGTH_MIN); CHECKLIST_HEIGHT_MIN);
selected = item_activate_selected(); selected = item_activate_selected();
switch (res) { switch (res) {
case 0: case 0:
......
...@@ -282,7 +282,7 @@ static void sym_check_prop(struct symbol *sym) ...@@ -282,7 +282,7 @@ static void sym_check_prop(struct symbol *sym)
} }
} }
void menu_finalize(struct menu *parent) static void _menu_finalize(struct menu *parent, bool inside_choice)
{ {
struct menu *menu, *last_menu; struct menu *menu, *last_menu;
struct symbol *sym; struct symbol *sym;
...@@ -296,7 +296,12 @@ void menu_finalize(struct menu *parent) ...@@ -296,7 +296,12 @@ void menu_finalize(struct menu *parent)
* and propagate parent dependencies before moving on. * and propagate parent dependencies before moving on.
*/ */
if (sym && sym_is_choice(sym)) { bool is_choice = false;
if (sym && sym_is_choice(sym))
is_choice = true;
if (is_choice) {
if (sym->type == S_UNKNOWN) { if (sym->type == S_UNKNOWN) {
/* find the first choice value to find out choice type */ /* find the first choice value to find out choice type */
current_entry = parent; current_entry = parent;
...@@ -394,7 +399,7 @@ void menu_finalize(struct menu *parent) ...@@ -394,7 +399,7 @@ void menu_finalize(struct menu *parent)
} }
} }
if (sym && sym_is_choice(sym)) if (is_choice)
expr_free(parentdep); expr_free(parentdep);
/* /*
...@@ -402,8 +407,8 @@ void menu_finalize(struct menu *parent) ...@@ -402,8 +407,8 @@ void menu_finalize(struct menu *parent)
* moving on * moving on
*/ */
for (menu = parent->list; menu; menu = menu->next) for (menu = parent->list; menu; menu = menu->next)
menu_finalize(menu); _menu_finalize(menu, is_choice);
} else if (sym) { } else if (!inside_choice && sym) {
/* /*
* Automatic submenu creation. If sym is a symbol and A, B, C, * Automatic submenu creation. If sym is a symbol and A, B, C,
* ... are consecutive items (symbols, menus, ifs, etc.) that * ... are consecutive items (symbols, menus, ifs, etc.) that
...@@ -463,7 +468,7 @@ void menu_finalize(struct menu *parent) ...@@ -463,7 +468,7 @@ void menu_finalize(struct menu *parent)
/* Superset, put in submenu */ /* Superset, put in submenu */
expr_free(dep2); expr_free(dep2);
next: next:
menu_finalize(menu); _menu_finalize(menu, false);
menu->parent = parent; menu->parent = parent;
last_menu = menu; last_menu = menu;
} }
...@@ -582,6 +587,11 @@ void menu_finalize(struct menu *parent) ...@@ -582,6 +587,11 @@ void menu_finalize(struct menu *parent)
} }
} }
void menu_finalize(void)
{
_menu_finalize(&rootmenu, false);
}
bool menu_has_prompt(struct menu *menu) bool menu_has_prompt(struct menu *menu)
{ {
if (!menu->prompt) if (!menu->prompt)
......
...@@ -515,7 +515,7 @@ void conf_parse(const char *name) ...@@ -515,7 +515,7 @@ void conf_parse(const char *name)
menu_add_prompt(P_MENU, "Main menu", NULL); menu_add_prompt(P_MENU, "Main menu", NULL);
} }
menu_finalize(&rootmenu); menu_finalize();
menu = &rootmenu; menu = &rootmenu;
while (menu) { while (menu) {
......
...@@ -1007,6 +1007,8 @@ static Elf_Sym *find_fromsym(struct elf_info *elf, Elf_Addr addr, ...@@ -1007,6 +1007,8 @@ static Elf_Sym *find_fromsym(struct elf_info *elf, Elf_Addr addr,
static Elf_Sym *find_tosym(struct elf_info *elf, Elf_Addr addr, Elf_Sym *sym) static Elf_Sym *find_tosym(struct elf_info *elf, Elf_Addr addr, Elf_Sym *sym)
{ {
Elf_Sym *new_sym;
/* If the supplied symbol has a valid name, return it */ /* If the supplied symbol has a valid name, return it */
if (is_valid_name(elf, sym)) if (is_valid_name(elf, sym))
return sym; return sym;
...@@ -1015,8 +1017,9 @@ static Elf_Sym *find_tosym(struct elf_info *elf, Elf_Addr addr, Elf_Sym *sym) ...@@ -1015,8 +1017,9 @@ static Elf_Sym *find_tosym(struct elf_info *elf, Elf_Addr addr, Elf_Sym *sym)
* Strive to find a better symbol name, but the resulting name may not * Strive to find a better symbol name, but the resulting name may not
* match the symbol referenced in the original code. * match the symbol referenced in the original code.
*/ */
return symsearch_find_nearest(elf, addr, get_secindex(elf, sym), new_sym = symsearch_find_nearest(elf, addr, get_secindex(elf, sym),
true, 20); true, 20);
return new_sym ? new_sym : sym;
} }
static bool is_executable_section(struct elf_info *elf, unsigned int secndx) static bool is_executable_section(struct elf_info *elf, unsigned int secndx)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment