mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@kernel.org>
To: "Marek Behún" <kabel@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>, linux-kernel@vger.kernel.org
Subject: [PATCH 1/2] firmware: turris-mox-rwtm: fix building without CONFIG_KEYS
Date: Fri,  4 Apr 2025 15:55:25 +0200	[thread overview]
Message-ID: <20250404135531.2421755-1-arnd@kernel.org> (raw)

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


             reply	other threads:[~2025-04-04 13:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-04 13:55 Arnd Bergmann [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250404135531.2421755-1-arnd@kernel.org \
    --to=arnd@kernel.org \
    --cc=arnd@arndb.de \
    --cc=kabel@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®