Re: [PATCH v5 3/6] block: introduce device_add_of_disk()

From: Christoph Hellwig
Date: Wed Oct 02 2024 - 05:10:39 EST


On Wed, Oct 02, 2024 at 10:46:46AM +0200, Christian Marangi wrote:
> Very happy you like it, yes I wasn't sure what was the correct way to
> introduce the helper. If you notice in the blkdev.h we have also add_disk()
> that is a static inline wrapper for device_add_disk().
>
> Wonder if device_add_disk() should have the same treatement? No idea if
> it would cause problem with symbol with external modules, that is why I
> used the wrapper.

We could make it an inline wrapper, but it's not in a high performance
path so there isn't really much of a point in doing so. I don't
remember why it was done for add_disk.