Merge branch '2021-09-14-assorted-fixes'

- Assorted bugfixes
diff --git a/common/image-sig.c b/common/image-sig.c
index fb00355..fa9407b 100644
--- a/common/image-sig.c
+++ b/common/image-sig.c
@@ -51,19 +51,6 @@
 
 };
 
-struct padding_algo padding_algos[] = {
-	{
-		.name = "pkcs-1.5",
-		.verify = padding_pkcs_15_verify,
-	},
-#ifdef CONFIG_FIT_RSASSA_PSS
-	{
-		.name = "pss",
-		.verify = padding_pss_verify,
-	}
-#endif /* CONFIG_FIT_RSASSA_PSS */
-};
-
 struct checksum_algo *image_get_checksum_algo(const char *full_name)
 {
 	int i;
@@ -129,14 +116,16 @@
 
 struct padding_algo *image_get_padding_algo(const char *name)
 {
-	int i;
+	struct padding_algo *padding, *end;
 
 	if (!name)
 		return NULL;
 
-	for (i = 0; i < ARRAY_SIZE(padding_algos); i++) {
-		if (!strcmp(padding_algos[i].name, name))
-			return &padding_algos[i];
+	padding = ll_entry_start(struct padding_algo, paddings);
+	end = ll_entry_end(struct padding_algo, paddings);
+	for (; padding < end; padding++) {
+		if (!strcmp(padding->name, name))
+			return padding;
 	}
 
 	return NULL;
diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig
index 77fb851..30eaa37 100644
--- a/drivers/pinctrl/Kconfig
+++ b/drivers/pinctrl/Kconfig
@@ -69,7 +69,7 @@
 	  direct children of the pin controller device (may be grandchildren for
 	  example). It is define is each individual pin controller device.
 	  Say Y here if you want to keep this behavior with the pinconfig
-	  u-class: all sub are recursivelly bounded.
+	  u-class: all sub are recursively bounded.
 	  If the option is disabled, this behavior is deactivated and only
 	  the direct children of pin controller will be assumed as pin
 	  configuration; you can save memory footprint when this feature is
diff --git a/include/image.h b/include/image.h
index 98b33d0..73a763a 100644
--- a/include/image.h
+++ b/include/image.h
@@ -1312,6 +1312,10 @@
 		      const uint8_t *hash, int hash_len);
 };
 
+/* Declare a new U-Boot padding algorithm handler */
+#define U_BOOT_PADDING_ALGO(__name)						\
+ll_entry_declare(struct padding_algo, __name, paddings)
+
 /**
  * image_get_checksum_algo() - Look up a checksum algorithm
  *
diff --git a/lib/Kconfig b/lib/Kconfig
index 48565a4..130fa06 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -474,7 +474,7 @@
 config LZO
 	bool "Enable LZO decompression support"
 	help
-	  This enables support for LZO compression algorithm.r
+	  This enables support for the LZO compression algorithm.
 
 config GZIP
 	bool "Enable gzip decompression support"
@@ -533,7 +533,7 @@
 	bool "Enable gzip decompression support for SPL build"
 	select SPL_ZLIB
 	help
-	  This enables support for GZIP compression altorithm for SPL boot.
+	  This enables support for the GZIP compression algorithm for SPL boot.
 
 config SPL_ZLIB
 	bool
diff --git a/lib/rsa/rsa-sign.c b/lib/rsa/rsa-sign.c
index 085dc89..0e0a890 100644
--- a/lib/rsa/rsa-sign.c
+++ b/lib/rsa/rsa-sign.c
@@ -269,7 +269,7 @@
 			snprintf(key_id, sizeof(key_id),
 				 "%s%s",
 				 keydir, name);
-		else if (keydir)
+		else if (name)
 			snprintf(key_id, sizeof(key_id),
 				 "%s",
 				 name);
diff --git a/lib/rsa/rsa-verify.c b/lib/rsa/rsa-verify.c
index 3840764..ad6d33d 100644
--- a/lib/rsa/rsa-verify.c
+++ b/lib/rsa/rsa-verify.c
@@ -95,6 +95,13 @@
 	return 0;
 }
 
+#ifndef USE_HOSTCC
+U_BOOT_PADDING_ALGO(pkcs_15) = {
+	.name = "pkcs-1.5",
+	.verify = padding_pkcs_15_verify,
+};
+#endif
+
 #ifdef CONFIG_FIT_RSASSA_PSS
 static void u32_i2osp(uint32_t val, uint8_t *buf)
 {
@@ -296,6 +303,14 @@
 
 	return ret;
 }
+
+#ifndef USE_HOSTCC
+U_BOOT_PADDING_ALGO(pss) = {
+	.name = "pss",
+	.verify = padding_pss_verify,
+};
+#endif
+
 #endif
 
 #if CONFIG_IS_ENABLED(FIT_SIGNATURE) || CONFIG_IS_ENABLED(RSA_VERIFY_WITH_PKEY)