On Mon, Nov 07, 2022 at 03:42:29PM +0100, Christoph Hellwig wrote: > __blk_crypto_cfg_supported is only used internally by the blk-crypto > code now, so move it out of the public header. "public header" is ambiguous here. blk-crypto.h is the "public header" for upper layers, but blk-crypto-profile.h is the "public header" for drivers. Maybe write "blk-crypto-profile.h, which is included by drivers". > diff --git a/block/blk-crypto-internal.h b/block/blk-crypto-internal.h > index e6818ffaddbf8..c587b3e1886c9 100644 > --- a/block/blk-crypto-internal.h > +++ b/block/blk-crypto-internal.h > @@ -19,6 +19,9 @@ struct blk_crypto_mode { > > extern const struct blk_crypto_mode blk_crypto_modes[]; > > +bool __blk_crypto_cfg_supported(struct blk_crypto_profile *profile, > + const struct blk_crypto_config *cfg); > + > #ifdef CONFIG_BLK_INLINE_ENCRYPTION It should go in the '#ifdef CONFIG_BLK_INLINE_ENCRYPTION' section. > diff --git a/include/linux/blk-crypto-profile.h b/include/linux/blk-crypto-profile.h > index bbab65bd54288..e990ec9b32aa4 100644 > --- a/include/linux/blk-crypto-profile.h > +++ b/include/linux/blk-crypto-profile.h > @@ -144,9 +144,6 @@ blk_status_t blk_crypto_get_keyslot(struct blk_crypto_profile *profile, > > void blk_crypto_put_keyslot(struct blk_crypto_keyslot *slot); > > -bool __blk_crypto_cfg_supported(struct blk_crypto_profile *profile, > - const struct blk_crypto_config *cfg); > - > int __blk_crypto_evict_key(struct blk_crypto_profile *profile, > const struct blk_crypto_key *key); Otherwise I guess this patch is fine. The exact same argument would also apply to blk_crypto_get_keyslot(), blk_crypto_put_keyslot(), and __blk_crypto_evict_key(), though. It might be worth handling them all in one patch. - Eric