lkml.org 
[lkml]   [2021]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH v2 1/8] block: introduce blk_ksm_is_empty()
On Thu, Mar 25, 2021 at 09:26:02PM +0000, Satya Tangirala wrote:
> This function checks if a given keyslot manager supports any encryption
> mode/data unit size combination (and returns true if there is no such
> supported combination). Helps clean up code a little.
>
> Signed-off-by: Satya Tangirala <satyat@google.com>
> ---
> block/keyslot-manager.c | 13 +++++++++++++
> drivers/md/dm-table.c | 11 +----------
> include/linux/keyslot-manager.h | 2 ++
> 3 files changed, 16 insertions(+), 10 deletions(-)
>
> diff --git a/block/keyslot-manager.c b/block/keyslot-manager.c
> index 2c4a55bea6ca..2a2b1a9785d2 100644
> --- a/block/keyslot-manager.c
> +++ b/block/keyslot-manager.c
> @@ -437,6 +437,19 @@ void blk_ksm_destroy(struct blk_keyslot_manager *ksm)
> }
> EXPORT_SYMBOL_GPL(blk_ksm_destroy);
>
> +bool blk_ksm_is_empty(struct blk_keyslot_manager *ksm)
> +{

I agree with Christoph that this could use a kerneldoc comment.

> diff --git a/include/linux/keyslot-manager.h b/include/linux/keyslot-manager.h
> index a27605e2f826..5bf0cea20c81 100644
> --- a/include/linux/keyslot-manager.h
> +++ b/include/linux/keyslot-manager.h
> @@ -117,4 +117,6 @@ bool blk_ksm_is_superset(struct blk_keyslot_manager *ksm_superset,
> void blk_ksm_update_capabilities(struct blk_keyslot_manager *target_ksm,
> struct blk_keyslot_manager *reference_ksm);
>
> +bool blk_ksm_is_empty(struct blk_keyslot_manager *ksm);
> +

It's easier to read if declarations are kept in the same order as the
definitions.

- Eric
\
 
 \ /
  Last update: 2021-04-15 21:22    [W:0.212 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site