mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/2] firmware: turris-mox-rwtm: fix building without CONFIG_KEYS
@ 2025-04-04 13:55 Arnd Bergmann
  2025-04-04 13:55 ` [PATCH 2/2] platform: turris: use ffs() instead of __bf_shf() Arnd Bergmann
  2025-04-06 20:13 ` [PATCH 1/2] firmware: turris-mox-rwtm: fix building without CONFIG_KEYS Marek Behún
  0 siblings, 2 replies; 4+ messages in thread
From: Arnd Bergmann @ 2025-04-04 13:55 UTC (permalink / raw)
  To: Marek Behún; +Cc: Arnd Bergmann, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

"struct key" is defined conditionally, so the code referencing it
must be made conditional as well:

In file included from drivers/firmware/turris-mox-rwtm.c:29:
include/linux/turris-signing-key.h: In function 'turris_signing_key_get_dev':
include/linux/turris-signing-key.h:26:19: error: invalid use of undefined type 'const struct key'
   26 |         return key->payload.data[1];
      |                   ^~

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 include/linux/turris-signing-key.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/linux/turris-signing-key.h b/include/linux/turris-signing-key.h
index 032ca8cbf636..8a435b73c3a9 100644
--- a/include/linux/turris-signing-key.h
+++ b/include/linux/turris-signing-key.h
@@ -11,6 +11,7 @@
 
 struct device;
 
+#ifdef CONFIG_KEYS
 struct turris_signing_key_subtype {
 	u16 key_size;
 	u8 data_size;
@@ -29,5 +30,6 @@ static inline struct device *turris_signing_key_get_dev(const struct key *key)
 int
 devm_turris_signing_key_create(struct device *dev, const struct turris_signing_key_subtype *subtype,
 			       const char *desc);
+#endif
 
 #endif /* __TURRIS_SIGNING_KEY_H */
-- 
2.39.5


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-04-06 20:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-04 13:55 [PATCH 1/2] firmware: turris-mox-rwtm: fix building without CONFIG_KEYS Arnd Bergmann
2025-04-04 13:55 ` [PATCH 2/2] platform: turris: use ffs() instead of __bf_shf() Arnd Bergmann
2025-04-06 20:12   ` Marek Behún
2025-04-06 20:13 ` [PATCH 1/2] firmware: turris-mox-rwtm: fix building without CONFIG_KEYS Marek Behún

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®