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@xxxxxxxxxx> > --- > 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