Re: [PATCH 1/3] blk-crypto: pass a gendisk to blk_crypto_sysfs_register

Eric Biggers
2022-11-07T19:55:31Z

On Sat, Nov 05, 2022 at 09:08:13AM +0100, Christoph Hellwig wrote:
> Prepare for changes to the block layer sysfs handling by passing the
> readily available gendisk to blk_crypto_sysfs_register.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> block/blk-crypto-internal.h | 4 ++--
> block/blk-crypto-sysfs.c | 3 ++-
> block/blk-sysfs.c | 2 +-
> 3 files changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/block/blk-crypto-internal.h b/block/blk-crypto-internal.h
> index e6818ffaddbf8..32990299dace1 100644
> --- a/block/blk-crypto-internal.h
> +++ b/block/blk-crypto-internal.h
> @@ -21,7 +21,7 @@ extern const struct blk_crypto_mode blk_crypto_modes[];
>
> #ifdef CONFIG_BLK_INLINE_ENCRYPTION
>
> -int blk_crypto_sysfs_register(struct request_queue *q);
> +int blk_crypto_sysfs_register(struct gendisk *disk);
>
> void blk_crypto_sysfs_unregister(struct request_queue *q);

Shouldn't blk_crypto_sysfs_unregister() be updated to match?

- Eric