From 2349ecffec5fc91d3c8964725865132c73d68f15 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Fri, 15 Jul 2022 01:58:24 +0200 Subject: [PATCH 01/11] mmc: Do not send status of send_status is false MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit 44645f87de5 ("mmc: Fix mmc_switch excessive timeout") introduced a side effect where CMD13 SEND_STATUS is issued in case mmc_wait_dat0() does not return -ENOSYS and $send_status is not set. This happens on all hardware which does implement .mmc_wait_dat0 callback, e.g. i.MX8M . This leads to lengthy timeout before booting OS in case of eMMC in one of the HS200/HS400 modes, since the card cannot respond to CMD13 while downgrading from HS200/HS400 to regular HS mode. Fix this by adding the missing conditional. Fixes: 44645f87de5 ("mmc: Fix mmc_switch excessive timeout") Signed-off-by: Marek Vasut Cc: Jaehoon Chung Cc: Kirill Kapranov Cc: Marek Behún Cc: Pantelis Antoniou Cc: Ye Li Reviewed-by: Jaehoon Chung --- drivers/mmc/mmc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 8efee9977e4..0b7c0be8cbc 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -831,6 +831,9 @@ static int __mmc_switch(struct mmc *mmc, u8 set, u8 index, u8 value, return 0; } + if (!send_status) + return 0; + /* Finally wait until the card is ready or indicates a failure * to switch. It doesn't hurt to use CMD13 here even if send_status * is false, because by now (after 'timeout_ms' ms) the bus should be From c252fa5cdbb421bbcca750866e5c5f9f6c8c1c34 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 3 Aug 2022 12:08:29 -0600 Subject: [PATCH 02/11] Makefile: Correct the rule removing old of-platdata files This makes use of makefile variables that don't exist anymore. Fix it and also remove the object files in that directory. Also add FORCE as a dependency as required by the if_changed macro. Fixes 354d2324635 ("Makefile: Remove old of-platdata files before regenerating") Reported-by: Heinrich Schuchardt Signed-off-by: Simon Glass --- scripts/Makefile.spl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl index 1cfb8115e31..3bafeb4fe98 100644 --- a/scripts/Makefile.spl +++ b/scripts/Makefile.spl @@ -358,13 +358,14 @@ $(obj)/dts/dt-%.o: $(obj)/dts/dt-%.c $(platdata-hdr) $(call if_changed,plat) # Don't use dts_dir here, since it forces running this expensive rule every time -$(platdata-hdr) $(u-boot-spl-platdata_c) &: $(obj)/$(SPL_BIN).dtb +$(platdata-hdr) $(u-boot-spl-platdata_c) &: $(obj)/$(SPL_BIN).dtb FORCE @[ -d $(obj)/dts ] || mkdir -p $(obj)/dts @# Remove old files since which ones we generate depends on the setting @# of OF_PLATDATA_INST and this might change between builds. Leaving old @# ones around is confusing and it is possible that switching the @# setting again will use the old one instead of regenerating it. - @rm -f $(u-boot-spl-all-platdata_c) $(u-boot-spl-all-platdata) + @rm -f $(u-boot-spl-old-platdata_c) $(u-boot-spl-platdata_c) \ + $(u-boot-spl-old-platdata) $(call if_changed,dtoc) ifneq ($(CONFIG_ARCH_EXYNOS)$(CONFIG_ARCH_S5PC1XX),) From 5e2548c1d6e0331edbf94edcfc95d55b5e9a6cab Mon Sep 17 00:00:00 2001 From: Patrice Chotard Date: Tue, 2 Aug 2022 10:21:35 +0200 Subject: [PATCH 03/11] lmb: Fix LMB_MEMORY_REGIONS flag usage This patch is fixing a broken boot observed on stm32mp157c-dk2 board. IS_ENABLED macro should be used to check if a compilation flag is set to "y" or "m". LMB_MEMORY_REGIONS is set to a numerical value, IS_ENABLED macro is not suitable in this case. Fixes: 7c1860fce4e3 ("lmb: Fix lmb property's defination under struct lmb") Signed-off-by: Patrice Chotard Acked-by: Michal Simek Reviewed-by: Tom Rini --- include/lmb.h | 2 +- lib/lmb.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/lmb.h b/include/lmb.h index 1476d78c282..7298c2ccc40 100644 --- a/include/lmb.h +++ b/include/lmb.h @@ -68,7 +68,7 @@ struct lmb_region { struct lmb { struct lmb_region memory; struct lmb_region reserved; -#if IS_ENABLED(CONFIG_LMB_MEMORY_REGIONS) +#ifdef CONFIG_LMB_MEMORY_REGIONS struct lmb_property memory_regions[CONFIG_LMB_MEMORY_REGIONS]; struct lmb_property reserved_regions[CONFIG_LMB_RESERVED_REGIONS]; #endif diff --git a/lib/lmb.c b/lib/lmb.c index f21fe672ae9..c599608fa38 100644 --- a/lib/lmb.c +++ b/lib/lmb.c @@ -108,7 +108,7 @@ void lmb_init(struct lmb *lmb) #if IS_ENABLED(CONFIG_LMB_USE_MAX_REGIONS) lmb->memory.max = CONFIG_LMB_MAX_REGIONS; lmb->reserved.max = CONFIG_LMB_MAX_REGIONS; -#elif IS_ENABLED(CONFIG_LMB_MEMORY_REGIONS) +#elif defined(CONFIG_LMB_MEMORY_REGIONS) lmb->memory.max = CONFIG_LMB_MEMORY_REGIONS; lmb->reserved.max = CONFIG_LMB_RESERVED_REGIONS; lmb->memory.region = lmb->memory_regions; From 29784d62eded89332254307bdb63ad8a7d8249d2 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 1 Aug 2022 07:57:59 -0600 Subject: [PATCH 04/11] test: Add some tests for kconfig.h The macros in this file are a little confusing and we currently have no tests to check that they work as expected. Add some tests which check the macros in C code. Add a few tests which check that the build errors are generated correctly too, using buildman's -a option. Signed-off-by: Simon Glass --- test/Kconfig | 3 +- test/Makefile | 4 ++- test/lib/Kconfig | 23 ++++++++++++++ test/lib/Makefile | 5 +++ test/lib/kconfig.c | 58 +++++++++++++++++++++++++++++++++++ test/lib/kconfig_spl.c | 44 ++++++++++++++++++++++++++ test/py/tests/test_kconfig.py | 39 +++++++++++++++++++++++ 7 files changed, 174 insertions(+), 2 deletions(-) create mode 100644 test/lib/Kconfig create mode 100644 test/lib/kconfig.c create mode 100644 test/lib/kconfig_spl.c create mode 100644 test/py/tests/test_kconfig.py diff --git a/test/Kconfig b/test/Kconfig index 9b283a57ba9..a6b463e4d06 100644 --- a/test/Kconfig +++ b/test/Kconfig @@ -20,7 +20,7 @@ config SPL_UNIT_TEST config UT_LIB bool "Unit tests for library functions" depends on UNIT_TEST - default y + default y if !SANDBOX_VPL help Enables the 'ut lib' command which tests library functions like memcat(), memcyp(), memmove() and ASN1 compiler/decoder. @@ -99,5 +99,6 @@ config UT_UNICODE source "test/dm/Kconfig" source "test/env/Kconfig" +source "test/lib/Kconfig" source "test/optee/Kconfig" source "test/overlay/Kconfig" diff --git a/test/Makefile b/test/Makefile index 1dfd5677440..178773647a8 100644 --- a/test/Makefile +++ b/test/Makefile @@ -17,6 +17,9 @@ obj-$(CONFIG_$(SPL_)CMDLINE) += command_ut.o obj-$(CONFIG_$(SPL_)UT_COMPRESSION) += compression.o obj-y += dm/ obj-$(CONFIG_FUZZ) += fuzz/ +ifndef CONFIG_SANDBOX_VPL +obj-$(CONFIG_UNIT_TEST) += lib/ +endif obj-$(CONFIG_$(SPL_)CMDLINE) += print_ut.o obj-$(CONFIG_$(SPL_)CMDLINE) += str_ut.o obj-$(CONFIG_UT_TIME) += time_ut.o @@ -25,7 +28,6 @@ obj-y += ut.o ifeq ($(CONFIG_SPL_BUILD),) obj-$(CONFIG_UNIT_TEST) += boot/ obj-$(CONFIG_UNIT_TEST) += common/ -obj-$(CONFIG_UNIT_TEST) += lib/ obj-y += log/ obj-$(CONFIG_$(SPL_)UT_UNICODE) += unicode_ut.o endif diff --git a/test/lib/Kconfig b/test/lib/Kconfig new file mode 100644 index 00000000000..dbb03e4a36f --- /dev/null +++ b/test/lib/Kconfig @@ -0,0 +1,23 @@ +# SPDX-License-Identifier: GPL-2.0+ +# Copyright 2022 Google LLC + +if SANDBOX + +config TEST_KCONFIG + bool "Enable detection of Kconfig macro errors" + help + This is used to test that the IF_ENABLED_INT() macro causes a build error + if the value is used when the CONFIG Is not enabled. + +config TEST_KCONFIG_ENABLE + bool "Option to enable" + help + This is the option that controls whether the value is present. + +config TEST_KCONFIG_VALUE + int "Value associated with the option" + depends on TEST_KCONFIG_ENABLE + help + This is the value whgch is present if TEST_KCONFIG_ENABLE is enabled. + +endif # SANDBOX diff --git a/test/lib/Makefile b/test/lib/Makefile index d244bb431d4..7e7922fe3b4 100644 --- a/test/lib/Makefile +++ b/test/lib/Makefile @@ -2,11 +2,13 @@ # # (C) Copyright 2018 # Mario Six, Guntermann & Drunck GmbH, mario.six@gdsys.cc +ifeq ($(CONFIG_SPL_BUILD),) obj-y += cmd_ut_lib.o obj-y += abuf.o obj-$(CONFIG_EFI_LOADER) += efi_device_path.o obj-$(CONFIG_EFI_SECURE_BOOT) += efi_image_region.o obj-y += hexdump.o +obj-$(CONFIG_SANDBOX) += kconfig.o obj-y += lmb.o obj-y += longjmp.o obj-$(CONFIG_CONSOLE_RECORD) += test_print.o @@ -19,3 +21,6 @@ obj-$(CONFIG_UT_LIB_RSA) += rsa.o obj-$(CONFIG_AES) += test_aes.o obj-$(CONFIG_GETOPT) += getopt.o obj-$(CONFIG_UT_LIB_CRYPT) += test_crypt.o +else +obj-$(CONFIG_SANDBOX) += kconfig_spl.o +endif diff --git a/test/lib/kconfig.c b/test/lib/kconfig.c new file mode 100644 index 00000000000..472d2c57280 --- /dev/null +++ b/test/lib/kconfig.c @@ -0,0 +1,58 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Test of linux/kconfig.h macros + * + * Copyright 2022 Google LLC + * Written by Simon Glass + */ + +#include +#include +#include +#include + +static int lib_test_is_enabled(struct unit_test_state *uts) +{ + ulong val; + + ut_asserteq(1, IS_ENABLED(CONFIG_CMDLINE)) + ut_asserteq(0, IS_ENABLED(CONFIG__UNDEFINED)) + + ut_asserteq(1, CONFIG_IS_ENABLED(CMDLINE)) + ut_asserteq(0, CONFIG_IS_ENABLED(OF_PLATDATA)) + ut_asserteq(0, CONFIG_IS_ENABLED(_UNDEFINED)) + + ut_asserteq(0xc000, + IF_ENABLED_INT(CONFIG_BLOBLIST_FIXED, CONFIG_BLOBLIST_ADDR)); + ut_asserteq(0xc000, + CONFIG_IF_ENABLED_INT(BLOBLIST_FIXED, BLOBLIST_ADDR)); + + /* + * This fails if CONFIG_TEST_KCONFIG_ENABLE is not enabled, since the + * value is used. Disable for SPL so that the errors in kconfig_spl.c + * are detected, since otherwise a build error when building U-Boot may + * cause SPL to not be built. + */ + if (!IS_ENABLED(CONFIG_SANDBOX_SPL) && + IS_ENABLED(CONFIG_TEST_KCONFIG)) { + val = IF_ENABLED_INT(CONFIG_TEST_KCONFIG_ENABLE, + CONFIG_TEST_KCONFIG_VALUE); + printf("value %ld\n", val); + } + + /* + * This fails if CONFIG_TEST_KCONFIG_ENABLE is not enabled, since the + * value is used. Disable for SPL so that the errors in kconfig_spl.c + * are detected, since otherwise a build error when building U-Boot may + * cause SPL to not be built. + */ + if (!IS_ENABLED(CONFIG_SANDBOX_SPL) && + CONFIG_IS_ENABLED(TEST_KCONFIG)) { + val = CONFIG_IF_ENABLED_INT(TEST_KCONFIG_ENABLE, + TEST_KCONFIG_VALUE); + printf("value2 %ld\n", val); + } + + return 0; +} +LIB_TEST(lib_test_is_enabled, 0); diff --git a/test/lib/kconfig_spl.c b/test/lib/kconfig_spl.c new file mode 100644 index 00000000000..c89ceaec66f --- /dev/null +++ b/test/lib/kconfig_spl.c @@ -0,0 +1,44 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Test of linux/kconfig.h macros for SPL + * + * Copyright 2022 Google LLC + * Written by Simon Glass + */ + +#include +#include +#include +#include + +static int lib_test_spl_is_enabled(struct unit_test_state *uts) +{ + ulong val; + + ut_asserteq(0, CONFIG_IS_ENABLED(CMDLINE)) + ut_asserteq(1, CONFIG_IS_ENABLED(OF_PLATDATA)) + ut_asserteq(0, CONFIG_IS_ENABLED(_UNDEFINED)) + + /* + * This fails if CONFIG_TEST_KCONFIG_ENABLE is not enabled, since the + * value is used. + */ + if (IS_ENABLED(CONFIG_TEST_KCONFIG)) { + val = IF_ENABLED_INT(CONFIG_TEST_KCONFIG_ENABLE, + CONFIG_TEST_KCONFIG_VALUE); + printf("value %ld\n", val); + } + + /* + * This fails if CONFIG_TEST_KCONFIG_ENABLE is not enabled, since the + * value is used. + */ + if (CONFIG_IS_ENABLED(TEST_KCONFIG)) { + val = CONFIG_IF_ENABLED_INT(TEST_KCONFIG_ENABLE, + TEST_KCONFIG_VALUE); + printf("value2 %ld\n", val); + } + + return 0; +} +LIB_TEST(lib_test_spl_is_enabled, 0); diff --git a/test/py/tests/test_kconfig.py b/test/py/tests/test_kconfig.py new file mode 100644 index 00000000000..0b9e6bc3bd1 --- /dev/null +++ b/test/py/tests/test_kconfig.py @@ -0,0 +1,39 @@ +# SPDX-License-Identifier: GPL-2.0 +# Copyright 2022 Google LLC +# Written by Simon Glass + +import pytest + +import u_boot_utils as util + +# This is needed for Azure, since the default '..' directory is not writeable +TMPDIR = '/tmp/test_kconfig' + +@pytest.mark.slow +@pytest.mark.boardspec('sandbox') +def test_kconfig(u_boot_console): + """Test build failures when IF_ENABLED_INT() option is not enabled""" + cons = u_boot_console + + # This detects build errors in test/lib/kconfig.c + out = util.run_and_log( + cons, ['./tools/buildman/buildman', '-m', '--board', 'sandbox', + '-a', 'TEST_KCONFIG', '-o', TMPDIR], ignore_errors=True) + assert 'invalid_use_of_IF_ENABLED_INT' in out + assert 'invalid_use_of_CONFIG_IF_ENABLED_INT' in out + +@pytest.mark.slow +@pytest.mark.boardspec('sandbox_spl') +def test_kconfig_spl(u_boot_console): + """Test build failures when IF_ENABLED_INT() option is not enabled""" + cons = u_boot_console + + # This detects build errors in test/lib/kconfig_spl.c + out = util.run_and_log( + cons, ['./tools/buildman/buildman', '-m', '--board', 'sandbox_spl', + '-a', 'TEST_KCONFIG', '-o', TMPDIR], ignore_errors=True) + assert 'invalid_use_of_IF_ENABLED_INT' in out + + # There is no CONFIG_SPL_TEST_KCONFIG, so the CONFIG_IF_ENABLED_INT() + # line should not generate an error + assert 'invalid_use_of_CONFIG_IF_ENABLED_INT' not in out From 8b8accb8bf2a5d6dc02b801281dac19214b85b84 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Mon, 1 Aug 2022 15:17:49 +0200 Subject: [PATCH 05/11] cmd: inconsistent return type of command_process() The declarations in the header and in the implementation must match. Reported-by: Sergei Antonov Signed-off-by: Heinrich Schuchardt Reviewed-by: Simon Glass --- include/command.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/command.h b/include/command.h index 44c91f655d4..8917da8b21c 100644 --- a/include/command.h +++ b/include/command.h @@ -229,10 +229,10 @@ enum command_ret_t { * is left unchanged. * @param ticks If ticks is not null, this function set it to the * number of ticks the command took to complete. - * Return: 0 if the command succeeded, 1 if it failed + * Return: 0 if command succeeded, else non-zero (CMD_RET_...) */ -int cmd_process(int flag, int argc, char *const argv[], int *repeatable, - unsigned long *ticks); +enum command_ret_t cmd_process(int flag, int argc, char *const argv[], + int *repeatable, unsigned long *ticks); void fixup_cmdtable(struct cmd_tbl *cmdtp, int size); From 99699a770744b91d93399daccf3b3caf506c04c7 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Mon, 1 Aug 2022 14:19:06 +0200 Subject: [PATCH 06/11] power: regulator: Remove i2c header from gpio regulator i2c is not used that's why header is not needed. Signed-off-by: Michal Simek --- drivers/power/regulator/fan53555.c | 1 - drivers/power/regulator/gpio-regulator.c | 1 - drivers/power/regulator/lp873x_regulator.c | 1 - drivers/power/regulator/lp87565_regulator.c | 1 - drivers/power/regulator/max77686.c | 1 - drivers/power/regulator/palmas_regulator.c | 1 - drivers/power/regulator/pfuze100.c | 1 - drivers/power/regulator/s2mps11_regulator.c | 1 - drivers/power/regulator/s5m8767.c | 1 - drivers/power/regulator/sandbox.c | 1 - drivers/power/regulator/tps65219_regulator.c | 1 - drivers/power/regulator/tps65941_regulator.c | 1 - 12 files changed, 12 deletions(-) diff --git a/drivers/power/regulator/fan53555.c b/drivers/power/regulator/fan53555.c index 9d8a235b79b..5681206bbaf 100644 --- a/drivers/power/regulator/fan53555.c +++ b/drivers/power/regulator/fan53555.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/power/regulator/gpio-regulator.c b/drivers/power/regulator/gpio-regulator.c index e5e08a33d3d..9c0a68aa5af 100644 --- a/drivers/power/regulator/gpio-regulator.c +++ b/drivers/power/regulator/gpio-regulator.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/power/regulator/lp873x_regulator.c b/drivers/power/regulator/lp873x_regulator.c index ec1037d7a5f..c326f8efa47 100644 --- a/drivers/power/regulator/lp873x_regulator.c +++ b/drivers/power/regulator/lp873x_regulator.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/power/regulator/lp87565_regulator.c b/drivers/power/regulator/lp87565_regulator.c index 7214dc1b824..6bbc831d2c8 100644 --- a/drivers/power/regulator/lp87565_regulator.c +++ b/drivers/power/regulator/lp87565_regulator.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/power/regulator/max77686.c b/drivers/power/regulator/max77686.c index f05d791b7cb..cef20e11897 100644 --- a/drivers/power/regulator/max77686.c +++ b/drivers/power/regulator/max77686.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/power/regulator/palmas_regulator.c b/drivers/power/regulator/palmas_regulator.c index aaa5f3cfc62..3c4eb83be77 100644 --- a/drivers/power/regulator/palmas_regulator.c +++ b/drivers/power/regulator/palmas_regulator.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/power/regulator/pfuze100.c b/drivers/power/regulator/pfuze100.c index 698a6fa5923..1d926689b3b 100644 --- a/drivers/power/regulator/pfuze100.c +++ b/drivers/power/regulator/pfuze100.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/power/regulator/s2mps11_regulator.c b/drivers/power/regulator/s2mps11_regulator.c index 1c6d8358d5b..93fb580407a 100644 --- a/drivers/power/regulator/s2mps11_regulator.c +++ b/drivers/power/regulator/s2mps11_regulator.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/power/regulator/s5m8767.c b/drivers/power/regulator/s5m8767.c index ad0b98621ce..23575831f38 100644 --- a/drivers/power/regulator/s5m8767.c +++ b/drivers/power/regulator/s5m8767.c @@ -7,7 +7,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/power/regulator/sandbox.c b/drivers/power/regulator/sandbox.c index c52fe3d1083..e8b66bf2b14 100644 --- a/drivers/power/regulator/sandbox.c +++ b/drivers/power/regulator/sandbox.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/power/regulator/tps65219_regulator.c b/drivers/power/regulator/tps65219_regulator.c index 023cf211fc4..f87d07e61fb 100644 --- a/drivers/power/regulator/tps65219_regulator.c +++ b/drivers/power/regulator/tps65219_regulator.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/power/regulator/tps65941_regulator.c b/drivers/power/regulator/tps65941_regulator.c index 89918c38fa7..b0411267750 100644 --- a/drivers/power/regulator/tps65941_regulator.c +++ b/drivers/power/regulator/tps65941_regulator.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include From 4e4bf9449b4f436419490a4a8cf4de17433cac15 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 31 Jul 2022 12:28:48 -0600 Subject: [PATCH 07/11] common: Drop display_options.h from common header Move this out of the common header and include it only where needed. Signed-off-by: Simon Glass --- arch/arm/cpu/armv7/s5p-common/cpu_info.c | 1 + arch/arm/mach-at91/arm926ejs/eflash.c | 1 + arch/arm/mach-imx/hab.c | 1 + arch/powerpc/cpu/mpc85xx/cpu.c | 1 + arch/powerpc/cpu/mpc85xx/cpu_init.c | 1 + arch/powerpc/cpu/mpc85xx/tlb.c | 1 + arch/powerpc/cpu/mpc8xx/cpu.c | 1 + arch/powerpc/cpu/mpc8xxx/law.c | 1 + arch/x86/cpu/broadwell/refcode.c | 1 + board/freescale/ls1028a/ls1028a.c | 1 + board/freescale/ls1088a/ls1088a.c | 1 + board/freescale/ls2080aqds/ls2080aqds.c | 1 + board/freescale/ls2080ardb/ls2080ardb.c | 1 + board/freescale/lx2160a/lx2160a.c | 1 + board/freescale/mpc8548cds/mpc8548cds.c | 1 + board/kosagi/novena/novena.c | 1 + board/traverse/ten64/ten64.c | 1 + boot/image-board.c | 1 + boot/image.c | 1 + cmd/acpi.c | 1 + cmd/axi.c | 1 + cmd/bcb.c | 1 + cmd/cpu.c | 1 + cmd/fpgad.c | 1 + cmd/io.c | 1 + cmd/mem.c | 1 + cmd/mmc.c | 1 + cmd/rtc.c | 1 + cmd/sf.c | 1 + cmd/version.c | 1 + common/bloblist.c | 1 + common/board_f.c | 1 + common/board_r.c | 1 + common/console.c | 1 + common/log.c | 1 + common/splash.c | 1 + drivers/core/acpi.c | 1 + drivers/cpu/bmips_cpu.c | 1 + drivers/ddr/fsl/main.c | 1 + drivers/mmc/gen_atmel_mci.c | 1 + drivers/mtd/onenand/onenand_uboot.c | 1 + drivers/mtd/spi/sf_dataflash.c | 1 + drivers/mtd/spi/spi-nor-core.c | 1 + drivers/net/xilinx_axi_emac.c | 1 + drivers/tpm/tpm_atmel_twi.c | 1 + drivers/tpm/tpm_tis_sandbox.c | 1 + fs/fs.c | 1 + include/common.h | 1 - include/display_options.h | 1 + lib/aes.c | 1 + lib/display_options.c | 1 + lib/fdtdec.c | 1 + net/nfs.c | 1 + net/tftp.c | 1 + 54 files changed, 53 insertions(+), 1 deletion(-) diff --git a/arch/arm/cpu/armv7/s5p-common/cpu_info.c b/arch/arm/cpu/armv7/s5p-common/cpu_info.c index d910282e2b2..fb2920950d4 100644 --- a/arch/arm/cpu/armv7/s5p-common/cpu_info.c +++ b/arch/arm/cpu/armv7/s5p-common/cpu_info.c @@ -4,6 +4,7 @@ * Minkyu Kang */ #include +#include #include #include #include diff --git a/arch/arm/mach-at91/arm926ejs/eflash.c b/arch/arm/mach-at91/arm926ejs/eflash.c index 043f06a8271..aade13cc014 100644 --- a/arch/arm/mach-at91/arm926ejs/eflash.c +++ b/arch/arm/mach-at91/arm926ejs/eflash.c @@ -43,6 +43,7 @@ * do a read-modify-write for partially programmed pages */ #include +#include #include #include #include diff --git a/arch/arm/mach-imx/hab.c b/arch/arm/mach-imx/hab.c index 55317abba23..0d1a7766be8 100644 --- a/arch/arm/mach-imx/hab.c +++ b/arch/arm/mach-imx/hab.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/powerpc/cpu/mpc85xx/cpu.c b/arch/powerpc/cpu/mpc85xx/cpu.c index ba9736ebef4..ffa8b602426 100644 --- a/arch/powerpc/cpu/mpc85xx/cpu.c +++ b/arch/powerpc/cpu/mpc85xx/cpu.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init.c b/arch/powerpc/cpu/mpc85xx/cpu_init.c index 5fa4234fd09..92a7e608ceb 100644 --- a/arch/powerpc/cpu/mpc85xx/cpu_init.c +++ b/arch/powerpc/cpu/mpc85xx/cpu_init.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include diff --git a/arch/powerpc/cpu/mpc85xx/tlb.c b/arch/powerpc/cpu/mpc85xx/tlb.c index 4f6778c720d..ab616497fa0 100644 --- a/arch/powerpc/cpu/mpc85xx/tlb.c +++ b/arch/powerpc/cpu/mpc85xx/tlb.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/arch/powerpc/cpu/mpc8xx/cpu.c b/arch/powerpc/cpu/mpc8xx/cpu.c index 0ccb9f6df6f..9b587fbbe87 100644 --- a/arch/powerpc/cpu/mpc8xx/cpu.c +++ b/arch/powerpc/cpu/mpc8xx/cpu.c @@ -18,6 +18,7 @@ #include #include +#include #include #include #include diff --git a/arch/powerpc/cpu/mpc8xxx/law.c b/arch/powerpc/cpu/mpc8xxx/law.c index 713ff172bce..198b5b10a52 100644 --- a/arch/powerpc/cpu/mpc8xxx/law.c +++ b/arch/powerpc/cpu/mpc8xxx/law.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/arch/x86/cpu/broadwell/refcode.c b/arch/x86/cpu/broadwell/refcode.c index aced3e5e26a..94c2e05346a 100644 --- a/arch/x86/cpu/broadwell/refcode.c +++ b/arch/x86/cpu/broadwell/refcode.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/ls1028a/ls1028a.c b/board/freescale/ls1028a/ls1028a.c index 1a7806fad77..faecb609924 100644 --- a/board/freescale/ls1028a/ls1028a.c +++ b/board/freescale/ls1028a/ls1028a.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/freescale/ls1088a/ls1088a.c b/board/freescale/ls1088a/ls1088a.c index 5bf13dcdeb3..0157377354a 100644 --- a/board/freescale/ls1088a/ls1088a.c +++ b/board/freescale/ls1088a/ls1088a.c @@ -4,6 +4,7 @@ */ #include #include +#include #include #include #include diff --git a/board/freescale/ls2080aqds/ls2080aqds.c b/board/freescale/ls2080aqds/ls2080aqds.c index 5bdafebb6b1..5df85722d1d 100644 --- a/board/freescale/ls2080aqds/ls2080aqds.c +++ b/board/freescale/ls2080aqds/ls2080aqds.c @@ -5,6 +5,7 @@ */ #include #include +#include #include #include #include diff --git a/board/freescale/ls2080ardb/ls2080ardb.c b/board/freescale/ls2080ardb/ls2080ardb.c index f5ebb934eb9..fb0699cb94f 100644 --- a/board/freescale/ls2080ardb/ls2080ardb.c +++ b/board/freescale/ls2080ardb/ls2080ardb.c @@ -5,6 +5,7 @@ */ #include #include +#include #include #include #include diff --git a/board/freescale/lx2160a/lx2160a.c b/board/freescale/lx2160a/lx2160a.c index a078643708f..5f0cc9eb7e9 100644 --- a/board/freescale/lx2160a/lx2160a.c +++ b/board/freescale/lx2160a/lx2160a.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/board/freescale/mpc8548cds/mpc8548cds.c b/board/freescale/mpc8548cds/mpc8548cds.c index cfb5b0b38bb..dac821f1acc 100644 --- a/board/freescale/mpc8548cds/mpc8548cds.c +++ b/board/freescale/mpc8548cds/mpc8548cds.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/board/kosagi/novena/novena.c b/board/kosagi/novena/novena.c index 0e1b4a0a46c..815ecf55c4d 100644 --- a/board/kosagi/novena/novena.c +++ b/board/kosagi/novena/novena.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/board/traverse/ten64/ten64.c b/board/traverse/ten64/ten64.c index bdabc214b26..a15b81b0cfd 100644 --- a/board/traverse/ten64/ten64.c +++ b/board/traverse/ten64/ten64.c @@ -5,6 +5,7 @@ * Copyright 2019-2021 Traverse Technologies */ #include +#include #include #include #include diff --git a/boot/image-board.c b/boot/image-board.c index b846bff2491..4e4d1c157d7 100644 --- a/boot/image-board.c +++ b/boot/image-board.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/boot/image.c b/boot/image.c index 5dcb55ba46a..a0d0cc2403d 100644 --- a/boot/image.c +++ b/boot/image.c @@ -9,6 +9,7 @@ #ifndef USE_HOSTCC #include #include +#include #include #include #include diff --git a/cmd/acpi.c b/cmd/acpi.c index 0e473b415dd..d0fc062ef8c 100644 --- a/cmd/acpi.c +++ b/cmd/acpi.c @@ -5,6 +5,7 @@ */ #include #include +#include #include #include #include diff --git a/cmd/axi.c b/cmd/axi.c index 0c80fef0533..b97b43eb7d0 100644 --- a/cmd/axi.c +++ b/cmd/axi.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include diff --git a/cmd/bcb.c b/cmd/bcb.c index 92f4d27990d..1bbd1fae998 100644 --- a/cmd/bcb.c +++ b/cmd/bcb.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/cmd/cpu.c b/cmd/cpu.c index 2ca4d05ae8a..a09736e1bb9 100644 --- a/cmd/cpu.c +++ b/cmd/cpu.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include diff --git a/cmd/fpgad.c b/cmd/fpgad.c index e65441bb76a..dfc6220b5e0 100644 --- a/cmd/fpgad.c +++ b/cmd/fpgad.c @@ -11,6 +11,7 @@ #include #include #include +#include #include diff --git a/cmd/io.c b/cmd/io.c index e23ea627006..2de1111998f 100644 --- a/cmd/io.c +++ b/cmd/io.c @@ -9,6 +9,7 @@ #include #include +#include #include /* Display values from last command */ diff --git a/cmd/mem.c b/cmd/mem.c index 1f4e3fcdede..6a7b4014edc 100644 --- a/cmd/mem.c +++ b/cmd/mem.c @@ -16,6 +16,7 @@ #include #include #include +#include #ifdef CONFIG_MTD_NOR_FLASH #include #endif diff --git a/cmd/mmc.c b/cmd/mmc.c index f7b02b3149b..7bd4cd9e016 100644 --- a/cmd/mmc.c +++ b/cmd/mmc.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/cmd/rtc.c b/cmd/rtc.c index 75d4b64d688..a344cfa76b1 100644 --- a/cmd/rtc.c +++ b/cmd/rtc.c @@ -2,6 +2,7 @@ #include #include +#include #include #include #include diff --git a/cmd/sf.c b/cmd/sf.c index 058635cb2f8..bd102f5af9d 100644 --- a/cmd/sf.c +++ b/cmd/sf.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/cmd/version.c b/cmd/version.c index f83f6aff92c..190ef6a9061 100644 --- a/cmd/version.c +++ b/cmd/version.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/common/bloblist.c b/common/bloblist.c index 406073c8105..8488663354b 100644 --- a/common/bloblist.c +++ b/common/bloblist.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include diff --git a/common/board_f.c b/common/board_f.c index 5c86faeb217..18e2246733b 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include diff --git a/common/board_r.c b/common/board_r.c index e702f0234ee..56eb60fa275 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #ifdef CONFIG_MTD_NOR_FLASH #include diff --git a/common/console.c b/common/console.c index dc071f1ed66..bde94122399 100644 --- a/common/console.c +++ b/common/console.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/common/log.c b/common/log.c index 7254aa70bfd..57b71ed1b36 100644 --- a/common/log.c +++ b/common/log.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/common/splash.c b/common/splash.c index 98f0089266d..0e520cc1030 100644 --- a/common/splash.c +++ b/common/splash.c @@ -21,6 +21,7 @@ */ #include +#include #include #include #include diff --git a/drivers/core/acpi.c b/drivers/core/acpi.c index 8457733edb5..0ebd288ab42 100644 --- a/drivers/core/acpi.c +++ b/drivers/core/acpi.c @@ -9,6 +9,7 @@ #define LOG_CATEOGRY LOGC_ACPI #include +#include #include #include #include diff --git a/drivers/cpu/bmips_cpu.c b/drivers/cpu/bmips_cpu.c index 172bc9980f6..3dd04fa8858 100644 --- a/drivers/cpu/bmips_cpu.c +++ b/drivers/cpu/bmips_cpu.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include diff --git a/drivers/ddr/fsl/main.c b/drivers/ddr/fsl/main.c index f389e5ef952..1903562ac47 100644 --- a/drivers/ddr/fsl/main.c +++ b/drivers/ddr/fsl/main.c @@ -11,6 +11,7 @@ */ #include +#include #include #include #include diff --git a/drivers/mmc/gen_atmel_mci.c b/drivers/mmc/gen_atmel_mci.c index da81425038d..607a22368cb 100644 --- a/drivers/mmc/gen_atmel_mci.c +++ b/drivers/mmc/gen_atmel_mci.c @@ -10,6 +10,7 @@ #include #include +#include #include #include #include diff --git a/drivers/mtd/onenand/onenand_uboot.c b/drivers/mtd/onenand/onenand_uboot.c index 6893394e089..3a8c7b867eb 100644 --- a/drivers/mtd/onenand/onenand_uboot.c +++ b/drivers/mtd/onenand/onenand_uboot.c @@ -14,6 +14,7 @@ */ #include +#include #include #include #include diff --git a/drivers/mtd/spi/sf_dataflash.c b/drivers/mtd/spi/sf_dataflash.c index e19e34244d1..6a0d953a729 100644 --- a/drivers/mtd/spi/sf_dataflash.c +++ b/drivers/mtd/spi/sf_dataflash.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/drivers/mtd/spi/spi-nor-core.c b/drivers/mtd/spi/spi-nor-core.c index 26a356baf84..e3c86e080a1 100644 --- a/drivers/mtd/spi/spi-nor-core.c +++ b/drivers/mtd/spi/spi-nor-core.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include diff --git a/drivers/net/xilinx_axi_emac.c b/drivers/net/xilinx_axi_emac.c index 04277b1269f..d48e342ea08 100644 --- a/drivers/net/xilinx_axi_emac.c +++ b/drivers/net/xilinx_axi_emac.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/tpm/tpm_atmel_twi.c b/drivers/tpm/tpm_atmel_twi.c index c059ea4cfed..fd2a45d34b0 100644 --- a/drivers/tpm/tpm_atmel_twi.c +++ b/drivers/tpm/tpm_atmel_twi.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/drivers/tpm/tpm_tis_sandbox.c b/drivers/tpm/tpm_tis_sandbox.c index efbeb00ab63..7350e1c4d52 100644 --- a/drivers/tpm/tpm_tis_sandbox.c +++ b/drivers/tpm/tpm_tis_sandbox.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/fs/fs.c b/fs/fs.c index 6de1a3eb6d5..8324b4a22f2 100644 --- a/fs/fs.c +++ b/fs/fs.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/include/common.h b/include/common.h index 71df59bca0e..25c317f4439 100644 --- a/include/common.h +++ b/include/common.h @@ -23,7 +23,6 @@ #include #include #include /* boot information for Linux kernel */ -#include #include #endif /* __ASSEMBLY__ */ diff --git a/include/display_options.h b/include/display_options.h index 33fcbb85335..85dacbc7590 100644 --- a/include/display_options.h +++ b/include/display_options.h @@ -19,6 +19,7 @@ * @size: Size to print * @suffix String to print after the size */ +#include void print_size(uint64_t size, const char *suffix); /** diff --git a/lib/aes.c b/lib/aes.c index 05ec2357024..4fca85ebee2 100644 --- a/lib/aes.c +++ b/lib/aes.c @@ -23,6 +23,7 @@ #ifndef USE_HOSTCC #include +#include #include #else #include diff --git a/lib/display_options.c b/lib/display_options.c index 360b01bcf5f..7feb446a559 100644 --- a/lib/display_options.c +++ b/lib/display_options.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/lib/fdtdec.c b/lib/fdtdec.c index ffa78f97ca0..96b6b71a606 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -6,6 +6,7 @@ #ifndef USE_HOSTCC #include #include +#include #include #include #include diff --git a/net/nfs.c b/net/nfs.c index 9f65cfb20dc..c6a124885e4 100644 --- a/net/nfs.c +++ b/net/nfs.c @@ -28,6 +28,7 @@ #include #include +#include #ifdef CONFIG_SYS_DIRECT_FLASH_NFS #include #endif diff --git a/net/tftp.c b/net/tftp.c index 451d73529f2..dea9c25ffd8 100644 --- a/net/tftp.c +++ b/net/tftp.c @@ -7,6 +7,7 @@ */ #include #include +#include #include #include #include From 8602d97ca2cf3e06387251afddc281d1d1841f50 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Sun, 31 Jul 2022 10:06:13 +0200 Subject: [PATCH 08/11] Makefile: avoid false positive -Wmaybe-uninitialized When compiling with -Og gcc reports false positive -Wmaybe-uninitialized as reported in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78394. Silence these warnings when building with CONFIG_CC_OPTIMIZE_FOR_DEBUG. Signed-off-by: Heinrich Schuchardt Reviewed-by: Simon Glass --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index df0d64b8308..1a66f69a4b1 100644 --- a/Makefile +++ b/Makefile @@ -676,6 +676,9 @@ endif # $(dot-config) ifdef CONFIG_CC_OPTIMIZE_FOR_DEBUG KBUILD_HOSTCFLAGS := -Wall -Wstrict-prototypes -Og -g -fomit-frame-pointer \ $(HOST_LFS_CFLAGS) $(HOSTCFLAGS) +# Avoid false positives -Wmaybe-uninitialized +# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78394 +KBUILD_HOSTCFLAGS += -Wno-maybe-uninitialized KBUILD_HOSTCXXFLAGS := -Og -g $(HOST_LFS_CFLAGS) $(HOSTCXXFLAGS) endif @@ -696,7 +699,10 @@ KBUILD_CFLAGS += -O2 endif ifdef CONFIG_CC_OPTIMIZE_FOR_DEBUG -KBUILD_CFLAGS += -Og +KBUILD_CFLAGS += -Og -Wno-maybe-uninitialized +# Avoid false positives -Wmaybe-uninitialized +# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78394 +KBUILD_CFLAGS += -Wno-maybe-uninitialized endif LTO_CFLAGS := From 1bacff9ef665a40d3151147b1798fa1f86700a8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milan=20P=2E=20Stani=C4=87?= Date: Wed, 27 Jul 2022 19:09:20 +0200 Subject: [PATCH 09/11] scripts/config: pick config script from kernel scripts pulled from kernel tag v5.18 --- scripts/config | 230 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 230 insertions(+) create mode 100755 scripts/config diff --git a/scripts/config b/scripts/config new file mode 100755 index 00000000000..ff88e2faefd --- /dev/null +++ b/scripts/config @@ -0,0 +1,230 @@ +#!/usr/bin/env bash +# SPDX-License-Identifier: GPL-2.0 +# Manipulate options in a .config file from the command line + +myname=${0##*/} + +# If no prefix forced, use the default CONFIG_ +CONFIG_="${CONFIG_-CONFIG_}" + +# We use an uncommon delimiter for sed substitutions +SED_DELIM=$(echo -en "\001") + +usage() { + cat >&2 <"$tmpfile" + # replace original file with the edited one + mv "$tmpfile" "$infile" +} + +txt_subst() { + local before="$1" + local after="$2" + local infile="$3" + local tmpfile="$infile.swp" + + sed -e "s$SED_DELIM$before$SED_DELIM$after$SED_DELIM" "$infile" >"$tmpfile" + # replace original file with the edited one + mv "$tmpfile" "$infile" +} + +txt_delete() { + local text="$1" + local infile="$2" + local tmpfile="$infile.swp" + + sed -e "/$text/d" "$infile" >"$tmpfile" + # replace original file with the edited one + mv "$tmpfile" "$infile" +} + +set_var() { + local name=$1 new=$2 before=$3 + + name_re="^($name=|# $name is not set)" + before_re="^($before=|# $before is not set)" + if test -n "$before" && grep -Eq "$before_re" "$FN"; then + txt_append "^$before=" "$new" "$FN" + txt_append "^# $before is not set" "$new" "$FN" + elif grep -Eq "$name_re" "$FN"; then + txt_subst "^$name=.*" "$new" "$FN" + txt_subst "^# $name is not set" "$new" "$FN" + else + echo "$new" >>"$FN" + fi +} + +undef_var() { + local name=$1 + + txt_delete "^$name=" "$FN" + txt_delete "^# $name is not set" "$FN" +} + +if [ "$1" = "--file" ]; then + FN="$2" + if [ "$FN" = "" ] ; then + usage + fi + shift 2 +else + FN=.config +fi + +if [ "$1" = "" ] ; then + usage +fi + +MUNGE_CASE=yes +while [ "$1" != "" ] ; do + CMD="$1" + shift + case "$CMD" in + --keep-case|-k) + MUNGE_CASE=no + continue + ;; + --refresh) + ;; + --*-after|-E|-D|-M) + checkarg "$1" + A=$ARG + checkarg "$2" + B=$ARG + shift 2 + ;; + -*) + checkarg "$1" + shift + ;; + esac + case "$CMD" in + --enable|-e) + set_var "${CONFIG_}$ARG" "${CONFIG_}$ARG=y" + ;; + + --disable|-d) + set_var "${CONFIG_}$ARG" "# ${CONFIG_}$ARG is not set" + ;; + + --module|-m) + set_var "${CONFIG_}$ARG" "${CONFIG_}$ARG=m" + ;; + + --set-str) + # sed swallows one level of escaping, so we need double-escaping + set_var "${CONFIG_}$ARG" "${CONFIG_}$ARG=\"${1//\"/\\\\\"}\"" + shift + ;; + + --set-val) + set_var "${CONFIG_}$ARG" "${CONFIG_}$ARG=$1" + shift + ;; + --undefine|-u) + undef_var "${CONFIG_}$ARG" + ;; + + --state|-s) + if grep -q "# ${CONFIG_}$ARG is not set" $FN ; then + echo n + else + V="$(grep "^${CONFIG_}$ARG=" $FN)" + if [ $? != 0 ] ; then + echo undef + else + V="${V/#${CONFIG_}$ARG=/}" + V="${V/#\"/}" + V="${V/%\"/}" + V="${V//\\\"/\"}" + echo "${V}" + fi + fi + ;; + + --enable-after|-E) + set_var "${CONFIG_}$B" "${CONFIG_}$B=y" "${CONFIG_}$A" + ;; + + --disable-after|-D) + set_var "${CONFIG_}$B" "# ${CONFIG_}$B is not set" "${CONFIG_}$A" + ;; + + --module-after|-M) + set_var "${CONFIG_}$B" "${CONFIG_}$B=m" "${CONFIG_}$A" + ;; + + # undocumented because it ignores --file (fixme) + --refresh) + yes "" | make oldconfig + ;; + + *) + echo "bad command: $CMD" >&2 + usage + ;; + esac +done From 3ff4675d732291002d947f8837504376bfa8a43c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pali=20Roh=C3=A1r?= Date: Wed, 27 Jul 2022 17:24:23 +0200 Subject: [PATCH 10/11] lz4: Fix compile warning comparison of distinct pointer types MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In file included from include/linux/bitops.h:22, from include/log.h:15, from include/linux/printk.h:4, from include/common.h:20, from lib/lz4_wrapper.c:6: lib/lz4_wrapper.c: In function ‘ulz4fn’: include/linux/kernel.h:184:17: warning: comparison of distinct pointer types lacks a cast (void) (&_min1 == &_min2); \ ^~ lib/lz4_wrapper.c:104:18: note: in expansion of macro ‘min’ size_t size = min((ptrdiff_t)block_size, end - out); ^~~ Signed-off-by: Pali Rohár --- lib/lz4_wrapper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/lz4_wrapper.c b/lib/lz4_wrapper.c index 0d2a3655a8a..67dea2ff390 100644 --- a/lib/lz4_wrapper.c +++ b/lib/lz4_wrapper.c @@ -80,7 +80,7 @@ int ulz4fn(const void *src, size_t srcn, void *dst, size_t *dstn) } if (block_header & LZ4F_BLOCKUNCOMPRESSED_FLAG) { - size_t size = min((ptrdiff_t)block_size, end - out); + size_t size = min((ptrdiff_t)block_size, (ptrdiff_t)(end - out)); memcpy(out, in, size); out += size; if (size < block_size) { From 468091a4602f78aaa11d41190ae66d8b240e144a Mon Sep 17 00:00:00 2001 From: Joao Marcos Costa Date: Sun, 24 Jul 2022 17:13:34 +0200 Subject: [PATCH 11/11] MAINTAINERS: Update e-mail address Replace former professional address by my personal e-mail. Signed-off-by: Joao Marcos Costa --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 4d1930f76e4..fa8c13fc7df 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1313,7 +1313,7 @@ F: drivers/spmi/ F: include/spmi/ SQUASHFS -M: Joao Marcos Costa +M: Joao Marcos Costa R: Thomas Petazzoni R: Miquel Raynal S: Maintained