Merge branch '2023-10-30-assorted-general-updates'

- Two Kconfig content fixes, fix some issues reported by Coverity,
  resync get_maintainer.pl (two small fixees), update i2c_eeprom, and
  fix an off by one in addrmap_set_entry
diff --git a/arch/arm/mach-imx/mxs/Kconfig b/arch/arm/mach-imx/mxs/Kconfig
index ccce6a7..d2e4205 100644
--- a/arch/arm/mach-imx/mxs/Kconfig
+++ b/arch/arm/mach-imx/mxs/Kconfig
@@ -54,7 +54,6 @@
 
 config SPL_MXS_PMU_MINIMAL_VDD5V_CURRENT
 	bool "Force minimal current draw from VDD5V by MX28 PMU"
-	default n
 	help
 	  After setting this option, the current drawn from VDD5V
 	  by the PMU is reduced to zero - the DCDC_BATT is used as
@@ -62,7 +61,6 @@
 
 config SPL_MXS_PMU_DISABLE_BATT_CHARGE
 	bool "Disable Battery Charging in MX28 PMU"
-	default n
 
 config SPL_MXS_PMU_ENABLE_4P2_LINEAR_REGULATOR
 	bool "Enable the 4P2 linear regulator in MX28 PMU"
diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig
index c43c185..a6c69c3 100644
--- a/arch/arm/mach-rockchip/Kconfig
+++ b/arch/arm/mach-rockchip/Kconfig
@@ -450,7 +450,6 @@
 config ROCKCHIP_RK8XX_DISABLE_BOOT_ON_POWERON
 	bool "Disable device boot on power plug-in"
 	depends on PMIC_RK8XX
-	default n
 	---help---
 	  Say Y here to prevent the device from booting up because of a plug-in
 	  event. When set, the device will boot briefly to determine why it was
diff --git a/arch/arm/mach-snapdragon/Kconfig b/arch/arm/mach-snapdragon/Kconfig
index 0e07304..2fc1521 100644
--- a/arch/arm/mach-snapdragon/Kconfig
+++ b/arch/arm/mach-snapdragon/Kconfig
@@ -14,7 +14,6 @@
 
 config SDM845
 	bool "Qualcomm Snapdragon 845 SoC"
-	default n
 	select LINUX_KERNEL_IMAGE_HEADER
 
 config LNX_KRNL_IMG_TEXT_OFFSET_BASE
diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
index 40ca7d7..a10e4c0 100644
--- a/arch/arm/mach-sunxi/Kconfig
+++ b/arch/arm/mach-sunxi/Kconfig
@@ -811,7 +811,6 @@
 config AXP_DISABLE_BOOT_ON_POWERON
 	bool "Disable device boot on power plug-in"
 	depends on AXP209_POWER || AXP221_POWER || AXP809_POWER || AXP818_POWER
-	default n
 	---help---
 	  Say Y here to prevent the device from booting up because of a plug-in
 	  event. When set, the device will boot into the SPL briefly to
diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig
index 464bd07..0e94b84 100644
--- a/arch/arm/mach-tegra/Kconfig
+++ b/arch/arm/mach-tegra/Kconfig
@@ -18,7 +18,6 @@
 config TEGRA_CRYPTO
 	bool "Tegra AES128 crypto module"
 	select AES
-	default n
 
 config TEGRA_GP_PADCTRL
 	bool
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index 587edd5..b288c65 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -200,7 +200,6 @@
 
 config M68K_QEMU
 	bool "Build with workarounds for incomplete QEMU emulation"
-	default n
 	help
 	  QEMU 8.x currently does not implement RAMBAR accesses and
 	  DMA timers. Enable this option for U-Boot CI purposes only
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index e291456..8fc81fb 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -68,7 +68,6 @@
 config SPL_ZERO_MEM_BEFORE_USE
 	bool "Zero memory before use"
 	depends on SPL
-	default n
 	help
 	  Zero stack/GD/malloc area in SPL before using them, this is needed for
 	  Sifive core devices that uses L2 cache to store SPL.
diff --git a/board/asus/grouper/Kconfig b/board/asus/grouper/Kconfig
index 912c6c5..47d9bae 100644
--- a/board/asus/grouper/Kconfig
+++ b/board/asus/grouper/Kconfig
@@ -12,11 +12,9 @@
 config GROUPER_TPS65911
 	bool "Enable support TI TPS65911 PMIC"
 	select CMD_POWEROFF
-	default n
 
 config GROUPER_MAX77663
 	bool "Enable support MAXIM MAX77663 PMIC"
 	select CMD_POWEROFF
-	default n
 
 endif
diff --git a/board/asus/transformer-t30/Kconfig b/board/asus/transformer-t30/Kconfig
index 3c36f4a..accc999 100644
--- a/board/asus/transformer-t30/Kconfig
+++ b/board/asus/transformer-t30/Kconfig
@@ -14,7 +14,6 @@
 	select TEGRA20_SLINK
 	select DM_SPI_FLASH
 	select SPI_FLASH_WINBOND
-	default n
 	help
 	  Tegra 3 based Transformers with Windows RT have core
 	  boot sequence (BCT and EBT) on separate SPI FLASH
diff --git a/board/keymile/Kconfig b/board/keymile/Kconfig
index c6576aa..f7e9b74 100644
--- a/board/keymile/Kconfig
+++ b/board/keymile/Kconfig
@@ -125,7 +125,6 @@
 config PG_WCOM_UBOOT_UPDATE_SUPPORTED
 	bool "Enable U-Boot Field Fail-Safe Update Functionality"
 	select EVENT
-	default n
 	help
 	  Indicates that field fail-safe u-boot update is supported.
 	  This functionality works only for designs that are booting
@@ -133,7 +132,6 @@
 
 config PG_WCOM_UBOOT_BOOTPACKAGE
 	bool "U-Boot Is Part Of Factory Boot-Package Image"
-	default n
 	help
 	  Indicates that u-boot will be a part of the factory programmed
 	  boot-package image.
@@ -149,7 +147,6 @@
 
 config PG_WCOM_UBOOT_UPDATE
 	bool "U-Boot Is Part Of Factory Boot-Package Image"
-	default n
 	help
 	  Indicates that u-boot will be a part of the embedded software and
 	  programmed at field.
diff --git a/board/lg/x3-t30/Kconfig b/board/lg/x3-t30/Kconfig
index 20ea4f5..53d7760 100644
--- a/board/lg/x3-t30/Kconfig
+++ b/board/lg/x3-t30/Kconfig
@@ -11,14 +11,12 @@
 
 config DEVICE_P880
 	bool "Enable support for LG Optimus 4X HD"
-	default n
 	help
 	  LG Optimus 4X HD derives from x3 board but has slight
 	  differences.
 
 config DEVICE_P895
 	bool "Enable support for LG Optimus Vu"
-	default n
 	help
 	  LG Optimus Vu derives from x3 board but has slight
 	  differences.
diff --git a/cmd/Kconfig b/cmd/Kconfig
index 205df2f..60aed2c 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -246,7 +246,6 @@
        bool "enable pre-load on bootm"
        depends on CMD_BOOTM
        depends on IMAGE_PRE_LOAD
-       default n
        help
          Enable support of stage pre-load for the bootm command.
 	 This stage allow to check or modify the image provided
@@ -2360,7 +2359,6 @@
 config CMD_SELECT_FONT
 	bool "select font size"
 	depends on VIDEO
-	default n
 	help
 	  Enabling this will provide 'font' command.
 	  Allows font selection at runtime.
@@ -2880,7 +2878,6 @@
 config MMC_SPEED_MODE_SET
 	bool "set speed mode using mmc command"
 	depends on CMD_MMC
-	default n
 	help
 	  Enable setting speed mode using mmc rescan and mmc dev commands.
 	  The speed mode is provided as the last argument in these commands
diff --git a/common/Kconfig b/common/Kconfig
index 43701fe..0f54819 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -28,26 +28,26 @@
 	depends on CONSOLE_RECORD
 	default 0x400 if CONSOLE_RECORD
 	help
-	  Set the size of the console output buffer. When this fills up, no
-	  more data will be recorded until some is removed. The buffer is
-	  allocated immediately after the malloc() region is ready.
+	  Set the size of the console recording output buffer. When this fills
+	  up, no more data will be recorded until some is removed. The buffer
+	  is allocated immediately after the malloc() region is ready.
 
 config CONSOLE_RECORD_OUT_SIZE_F
 	hex "Output buffer size before relocation"
 	depends on CONSOLE_RECORD
 	default 0x400 if CONSOLE_RECORD
 	help
-	  Set the size of the console output buffer before relocation. When
-	  this fills up, no more data will be recorded until some is removed.
-	  The buffer is allocated immediately after the early malloc() region is
-	  ready.
+	  Set the size of the console recording output buffer before
+	  relocation. When this fills up, no more data will be recorded until
+	  some is removed.  The buffer is allocated immediately after the early
+	  malloc() region is ready.
 
 config CONSOLE_RECORD_IN_SIZE
 	hex "Input buffer size"
 	depends on CONSOLE_RECORD
 	default 0x100 if CONSOLE_RECORD
 	help
-	  Set the size of the console input buffer. When this contains data,
+	  Set the size of the console recording input buffer. When this contains data,
 	  tstc() and getc() will use this in preference to real device input.
 	  The buffer is allocated immediately after the malloc() region is
 	  ready.
diff --git a/drivers/crypto/fsl/Kconfig b/drivers/crypto/fsl/Kconfig
index 91a51cc..eaad196 100644
--- a/drivers/crypto/fsl/Kconfig
+++ b/drivers/crypto/fsl/Kconfig
@@ -77,7 +77,6 @@
 config FSL_DCP_RNG
 	bool "Enable Random Number Generator support"
 	depends on DM_RNG
-	default n
 	help
 	  Enable support for the hardware based random number generator
 	  module of the DCP. It uses the True Random Number Generator (TRNG)
diff --git a/drivers/firmware/arm-ffa/arm-ffa-uclass.c b/drivers/firmware/arm-ffa/arm-ffa-uclass.c
index 8c17b19..f1e91d1 100644
--- a/drivers/firmware/arm-ffa/arm-ffa-uclass.c
+++ b/drivers/firmware/arm-ffa/arm-ffa-uclass.c
@@ -144,8 +144,6 @@
 		return -EINVAL;
 
 	abi_idx = FFA_ID_TO_ERRMAP_ID(ffa_id);
-	if (abi_idx < 0 || abi_idx >= FFA_ERRMAP_COUNT)
-		return -EINVAL;
 
 	if (!err_msg_map[abi_idx].err_str[err_idx])
 		return -EINVAL;
diff --git a/drivers/memory/Kconfig b/drivers/memory/Kconfig
index 22cb9d6..d10edd2 100644
--- a/drivers/memory/Kconfig
+++ b/drivers/memory/Kconfig
@@ -61,7 +61,6 @@
 if TI_GPMC
 config TI_GPMC_DEBUG
 	bool "Debug Texas Instruments GPMC timings"
-	default n
 	help
 	  Enable this to print GPMC timings before and after the GPMC registers
 	  are programmed. This should not be left enabled on production systems.
diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
index fccd9b8..97057de 100644
--- a/drivers/misc/Kconfig
+++ b/drivers/misc/Kconfig
@@ -375,7 +375,6 @@
 config NPCM_OTP
 	bool "Nnvoton NPCM BMC On-Chip OTP Memory Support"
 	depends on (ARM && ARCH_NPCM)
-	default n
 	help
 	  Support NPCM BMC OTP memory (fuse).
 	  To compile this driver as a module, choose M here: the module
diff --git a/drivers/misc/i2c_eeprom.c b/drivers/misc/i2c_eeprom.c
index e1d0b8f..9111bd7 100644
--- a/drivers/misc/i2c_eeprom.c
+++ b/drivers/misc/i2c_eeprom.c
@@ -60,6 +60,17 @@
 	return dm_i2c_read(dev, offset, buf, size);
 }
 
+static int i2c_eeprom_len(int offset, int len, int pagesize)
+{
+	int page_offset = offset & (pagesize - 1);
+	int maxlen = pagesize - page_offset;
+
+	if (len > maxlen)
+		len = maxlen;
+
+	return len;
+}
+
 static int i2c_eeprom_std_write(struct udevice *dev, int offset,
 				const uint8_t *buf, int size)
 {
@@ -67,7 +78,7 @@
 	int ret;
 
 	while (size > 0) {
-		int write_size = min_t(int, size, priv->pagesize);
+		int write_size = i2c_eeprom_len(offset, size, priv->pagesize);
 
 		ret = dm_i2c_write(dev, offset, buf, write_size);
 		if (ret)
diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig
index 72547f0..a13e6f5 100644
--- a/drivers/mtd/nand/raw/Kconfig
+++ b/drivers/mtd/nand/raw/Kconfig
@@ -614,7 +614,6 @@
 config ROCKCHIP_NAND_SKIP_BBTSCAN
 	bool "Skip the automatic BBT scan with Rockchip NAND controllers"
 	depends on ROCKCHIP_NAND
-	default n
 	help
 	  Skip the automatic BBT scan with the NAND_SKIP_BBTSCAN
 	  option when data content is not in MTD format or
diff --git a/drivers/mtd/spi/Kconfig b/drivers/mtd/spi/Kconfig
index a9617c6..76c424d 100644
--- a/drivers/mtd/spi/Kconfig
+++ b/drivers/mtd/spi/Kconfig
@@ -107,7 +107,6 @@
 
 config SPI_NOR_BOOT_SOFT_RESET_EXT_INVERT
 	bool "Command extension type is INVERT for Software Reset on boot"
-	default n
 	help
 	 Because of SFDP information can not be get before boot.
 	 So define command extension type is INVERT when Software Reset on boot only.
diff --git a/drivers/sm/Kconfig b/drivers/sm/Kconfig
index f098727..926af28 100644
--- a/drivers/sm/Kconfig
+++ b/drivers/sm/Kconfig
@@ -4,6 +4,5 @@
 config MESON_SM
 	bool "Amlogic Secure Monitor driver"
 	select SM
-	default n
 	help
 	  Say y here to enable the Amlogic secure monitor driver.
diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
index 66cf727..69b184b 100644
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
@@ -460,7 +460,6 @@
 config SPI_ASPEED_SMC
 	bool "ASPEED SPI flash controller driver"
 	depends on DM_SPI && SPI_MEM
-	default n
 	help
 	  Enable ASPEED SPI flash controller driver for AST2500
 	  and AST2600 SoCs.
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index 1a883ba..b501ea5 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -231,7 +231,6 @@
 config USB_EHCI_NPCM
 	bool "Support for Nuvoton NPCM on-chip EHCI USB controller"
 	depends on ARCH_NPCM
-	default n
 	---help---
 	  Enables support for the on-chip EHCI controller on
 	  Nuvoton NPCM chips.
@@ -368,7 +367,6 @@
 config USB_OHCI_NPCM
 	bool "Support for Nuvoton NPCM on-chip OHCI USB controller"
 	depends on ARCH_NPCM
-	default n
 	---help---
 	  Enables support for the on-chip OHCI controller on
 	  Nuvoton NPCM chips.
diff --git a/fs/ubifs/Kconfig b/fs/ubifs/Kconfig
index 949b288..690e77e 100644
--- a/fs/ubifs/Kconfig
+++ b/fs/ubifs/Kconfig
@@ -8,7 +8,6 @@
 config UBIFS_SILENCE_DEBUG_DUMP
 	bool "UBIFS silence debug dumps"
 	default y if UBIFS_SILENCE_MSG
-	default n
 	help
 	  Make the debug dumps from UBIFS stop printing.
 	  This decreases size of U-Boot binary.
diff --git a/lib/addr_map.c b/lib/addr_map.c
index 9b3e0a5..86e932e 100644
--- a/lib/addr_map.c
+++ b/lib/addr_map.c
@@ -59,7 +59,7 @@
 void addrmap_set_entry(unsigned long vaddr, phys_addr_t paddr,
 			phys_size_t size, int idx)
 {
-	if (idx > CONFIG_SYS_NUM_ADDR_MAP)
+	if (idx >= CONFIG_SYS_NUM_ADDR_MAP)
 		return;
 
 	address_map[idx].vaddr = vaddr;
diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
index 81116e2..6c58578 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -981,6 +981,7 @@
 	}
 
 	foreach my $email (@file_emails) {
+	    $email = mailmap_email($email);
 	    my ($name, $address) = parse_email($email);
 
 	    my $tmp_email = format_email($name, $address, $email_usename);
@@ -1718,7 +1719,7 @@
     %VCS_cmds = %VCS_cmds_hg;
     return 2 if eval $VCS_cmds{"available"};
     %VCS_cmds = ();
-    if (!$printed_novcs) {
+    if (!$printed_novcs && $email_git) {
 	warn("$P: No supported VCS found.  Add --nogit to options?\n");
 	warn("Using a git repository produces better results.\n");
 	warn("Try Linus Torvalds' latest git repository using:\n");
diff --git a/tools/sfspl.c b/tools/sfspl.c
index ec18a0a..c76420c 100644
--- a/tools/sfspl.c
+++ b/tools/sfspl.c
@@ -99,7 +99,7 @@
 {
 	struct spl_hdr *hdr = (void *)ptr;
 	unsigned char *buf = ptr;
-	int fd;
+	int fd, ret = EXIT_SUCCESS;
 	unsigned int hdr_size = le32_to_cpu(hdr->hdr_size);
 	unsigned int file_size = le32_to_cpu(hdr->file_size);
 
@@ -110,16 +110,16 @@
 
 	fd = open(params->outfile, O_WRONLY | O_CREAT | O_TRUNC, 0644);
 	if (fd == -1) {
-		perror("Can write file");
+		perror("Cannot open file");
 		return EXIT_FAILURE;
 	}
 	if (write(fd, &buf[hdr_size], file_size) != file_size) {
 		perror("Cannot write file");
-		return EXIT_FAILURE;
+		ret = EXIT_FAILURE;
 	}
 	close(fd);
 
-	return EXIT_SUCCESS;
+	return ret;
 }
 
 static int sfspl_check_image_type(uint8_t type)