* [PATCH] blk-crypto: Add a missing include directive
@ 2022-11-23 17:29 Bart Van Assche
2022-11-23 17:39 ` Jens Axboe
2022-11-23 18:28 ` Eric Biggers
0 siblings, 2 replies; 3+ messages in thread
From: Bart Van Assche @ 2022-11-23 17:29 UTC (permalink / raw)
To: Jens Axboe; +Cc: linux-block, Christoph Hellwig, Bart Van Assche, Eric Biggers
Allow the compiler to verify consistency of function declarations and
function definitions. This patch fixes the following sparse errors:
block/blk-crypto-profile.c:241:14: error: no previous prototype for ‘blk_crypto_get_keyslot’ [-Werror=missing-prototypes]
241 | blk_status_t blk_crypto_get_keyslot(struct blk_crypto_profile *profile,
| ^~~~~~~~~~~~~~~~~~~~~~
block/blk-crypto-profile.c:318:6: error: no previous prototype for ‘blk_crypto_put_keyslot’ [-Werror=missing-prototypes]
318 | void blk_crypto_put_keyslot(struct blk_crypto_keyslot *slot)
| ^~~~~~~~~~~~~~~~~~~~~~
block/blk-crypto-profile.c:344:6: error: no previous prototype for ‘__blk_crypto_cfg_supported’ [-Werror=missing-prototypes]
344 | bool __blk_crypto_cfg_supported(struct blk_crypto_profile *profile,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
block/blk-crypto-profile.c:373:5: error: no previous prototype for ‘__blk_crypto_evict_key’ [-Werror=missing-prototypes]
373 | int __blk_crypto_evict_key(struct blk_crypto_profile *profile,
| ^~~~~~~~~~~~~~~~~~~~~~
Cc: Eric Biggers <ebiggers@google.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
block/blk-crypto-profile.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/block/blk-crypto-profile.c b/block/blk-crypto-profile.c
index 96c511967386..0307fb0d95d3 100644
--- a/block/blk-crypto-profile.c
+++ b/block/blk-crypto-profile.c
@@ -32,6 +32,7 @@
#include <linux/wait.h>
#include <linux/blkdev.h>
#include <linux/blk-integrity.h>
+#include "blk-crypto-internal.h"
struct blk_crypto_keyslot {
atomic_t slot_refs;
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] blk-crypto: Add a missing include directive
2022-11-23 17:29 [PATCH] blk-crypto: Add a missing include directive Bart Van Assche
@ 2022-11-23 17:39 ` Jens Axboe
2022-11-23 18:28 ` Eric Biggers
1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2022-11-23 17:39 UTC (permalink / raw)
To: Bart Van Assche; +Cc: linux-block, Eric Biggers, Christoph Hellwig
On Wed, 23 Nov 2022 09:29:23 -0800, Bart Van Assche wrote:
> Allow the compiler to verify consistency of function declarations and
> function definitions. This patch fixes the following sparse errors:
>
> block/blk-crypto-profile.c:241:14: error: no previous prototype for ‘blk_crypto_get_keyslot’ [-Werror=missing-prototypes]
> 241 | blk_status_t blk_crypto_get_keyslot(struct blk_crypto_profile *profile,
> | ^~~~~~~~~~~~~~~~~~~~~~
> block/blk-crypto-profile.c:318:6: error: no previous prototype for ‘blk_crypto_put_keyslot’ [-Werror=missing-prototypes]
> 318 | void blk_crypto_put_keyslot(struct blk_crypto_keyslot *slot)
> | ^~~~~~~~~~~~~~~~~~~~~~
> block/blk-crypto-profile.c:344:6: error: no previous prototype for ‘__blk_crypto_cfg_supported’ [-Werror=missing-prototypes]
> 344 | bool __blk_crypto_cfg_supported(struct blk_crypto_profile *profile,
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~
> block/blk-crypto-profile.c:373:5: error: no previous prototype for ‘__blk_crypto_evict_key’ [-Werror=missing-prototypes]
> 373 | int __blk_crypto_evict_key(struct blk_crypto_profile *profile,
> | ^~~~~~~~~~~~~~~~~~~~~~
>
> [...]
Applied, thanks!
[1/1] blk-crypto: Add a missing include directive
commit: 85168d416e5d3184b77dbec8fee75c9439894afa
Best regards,
--
Jens Axboe
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] blk-crypto: Add a missing include directive
2022-11-23 17:29 [PATCH] blk-crypto: Add a missing include directive Bart Van Assche
2022-11-23 17:39 ` Jens Axboe
@ 2022-11-23 18:28 ` Eric Biggers
1 sibling, 0 replies; 3+ messages in thread
From: Eric Biggers @ 2022-11-23 18:28 UTC (permalink / raw)
To: Bart Van Assche; +Cc: Jens Axboe, linux-block, Christoph Hellwig
On Wed, Nov 23, 2022 at 09:29:23AM -0800, Bart Van Assche wrote:
> Allow the compiler to verify consistency of function declarations and
> function definitions. This patch fixes the following sparse errors:
>
> block/blk-crypto-profile.c:241:14: error: no previous prototype for ‘blk_crypto_get_keyslot’ [-Werror=missing-prototypes]
> 241 | blk_status_t blk_crypto_get_keyslot(struct blk_crypto_profile *profile,
> | ^~~~~~~~~~~~~~~~~~~~~~
> block/blk-crypto-profile.c:318:6: error: no previous prototype for ‘blk_crypto_put_keyslot’ [-Werror=missing-prototypes]
> 318 | void blk_crypto_put_keyslot(struct blk_crypto_keyslot *slot)
> | ^~~~~~~~~~~~~~~~~~~~~~
> block/blk-crypto-profile.c:344:6: error: no previous prototype for ‘__blk_crypto_cfg_supported’ [-Werror=missing-prototypes]
> 344 | bool __blk_crypto_cfg_supported(struct blk_crypto_profile *profile,
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~
> block/blk-crypto-profile.c:373:5: error: no previous prototype for ‘__blk_crypto_evict_key’ [-Werror=missing-prototypes]
> 373 | int __blk_crypto_evict_key(struct blk_crypto_profile *profile,
> | ^~~~~~~~~~~~~~~~~~~~~~
>
> Cc: Eric Biggers <ebiggers@google.com>
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> ---
> block/blk-crypto-profile.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/block/blk-crypto-profile.c b/block/blk-crypto-profile.c
> index 96c511967386..0307fb0d95d3 100644
> --- a/block/blk-crypto-profile.c
> +++ b/block/blk-crypto-profile.c
> @@ -32,6 +32,7 @@
> #include <linux/wait.h>
> #include <linux/blkdev.h>
> #include <linux/blk-integrity.h>
> +#include "blk-crypto-internal.h"
>
Thanks. This was already caught during testing and review of the patch that
introduced this problem, but I guess it is too late to fold this in.
- Eric
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-11-23 18:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-23 17:29 [PATCH] blk-crypto: Add a missing include directive Bart Van Assche
2022-11-23 17:39 ` Jens Axboe
2022-11-23 18:28 ` Eric Biggers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).