From: Marc Kleine-Budde <mkl@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH] crypto: digest: provide static inline no-ops if digest is disabled
Date: Mon, 15 Jun 2015 15:46:40 +0200 [thread overview]
Message-ID: <1434376000-21757-1-git-send-email-mkl@pengutronix.de> (raw)
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
include/digest.h | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/include/digest.h b/include/digest.h
index 7c6711b32a56..3a9d305963ef 100644
--- a/include/digest.h
+++ b/include/digest.h
@@ -59,6 +59,7 @@ struct digest {
/*
* digest functions
*/
+#ifdef CONFIG_DIGEST
int digest_algo_register(struct digest_algo *d);
void digest_algo_unregister(struct digest_algo *d);
void digest_algo_prints(const char *prefix);
@@ -76,6 +77,16 @@ int digest_file(struct digest *d, const char *filename,
int digest_file_by_name(const char *algo, const char *filename,
unsigned char *hash,
const unsigned char *sig);
+#else
+static inline struct digest *digest_alloc(const char *name)
+{
+ return NULL;
+}
+
+static inline void digest_free(struct digest *d)
+{
+}
+#endif
static inline int digest_init(struct digest *d)
{
--
2.1.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2015-06-15 13:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-15 13:46 Marc Kleine-Budde [this message]
2015-06-17 5:58 ` Sascha Hauer
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=1434376000-21757-1-git-send-email-mkl@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=barebox@lists.infradead.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