On Thu, Jul 20, 2023 at 5:30 AM Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote: > > On Mon, Jul 17, 2023 at 04:16:27PM -0300, Mauricio Faria de Oliveira wrote: > > The 'probe' callback in __register_blkdev() is only used > > under the CONFIG_BLOCK_LEGACY_AUTOLOAD deprecation guard. > > > > The loop_probe() function is only used for that callback, > > so guard it too, accordingly. > > > > See commit fbdee71bb5d8 ("block: deprecate autoloading based on dev_t"). > > > > Signed-off-by: Mauricio Faria de Oliveira <mfo@xxxxxxxxxxxxx> > > --- > > drivers/block/loop.c | 7 ++++++- > > 1 file changed, 6 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/block/loop.c b/drivers/block/loop.c > > index 37511d2b2caf..7268ff71c92c 100644 > > --- a/drivers/block/loop.c > > +++ b/drivers/block/loop.c > > @@ -2093,6 +2093,7 @@ static void loop_remove(struct loop_device *lo) > > put_disk(lo->lo_disk); > > } > > > > +#ifdef CONFIG_BLOCK_LEGACY_AUTOLOAD > > static void loop_probe(dev_t dev) > > { > > int idx = MINOR(dev) >> part_shift; > > @@ -2101,6 +2102,7 @@ static void loop_probe(dev_t dev) > > return; > > loop_add(idx); > > } > > +#endif > > Turn this into.. > > #else > #define loop_probe NULL > #endif /* !CONFIG_BLOCK_LEGACY_AUTOLOAD */ > > and you can skip the pretty ugly second hunk. > Thanks for reviewing and the suggestion; just sent v2. -- Mauricio Faria de Oliveira