On Fri, Sep 18, 2026 at 12:14:15PM +0530, Varadarajan Narayanan wrote:
> [...]
>
> > +static const char *fb_block_interface(void)
> > +{
> > +   if (block_interface_override[0])
> > +           return block_interface_override;
> > +
> > +   return config_opt_enabled(CONFIG_FASTBOOT_FLASH_BLOCK,
> > +                             CONFIG_FASTBOOT_FLASH_BLOCK_INTERFACE_NAME, 
> > NULL);
> > +}
> > +
> > +/**
> > + * fb_block_device() - Resolve the block device number to use
> > + *
> > + * Returns the runtime override set via fastboot_block_set_target() if one
> > + * is active, otherwise falls back to the build-time config default.
> > + */
> > +static int fb_block_device(void)
> > +{
> > +   if (block_device_override >= 0)
> > +           return block_device_override;
> > +
> > +   return config_opt_enabled(CONFIG_FASTBOOT_FLASH_BLOCK,
> > +                             CONFIG_FASTBOOT_FLASH_BLOCK_DEVICE_ID, -1);
> > +}
>
> This config_opt_enabled check is not needed. drivers/fastboot/fb_block.c is
> built only when CONFIG_FASTBOOT_FLASH_BLOCK is enabled. See
> https://github.com/u-boot/u-boot/blob/211de43d0f954a00a490220c1aac9db298287c40/drivers/fastboot/Makefile#L6
>
> Just returning CONFIG_FASTBOOT_FLASH_BLOCK_INTERFACE_NAME or
> CONFIG_FASTBOOT_FLASH_BLOCK_DEVICE_ID would suffice.

Ignore this, didn't see your previous response.

Thanks
Varada

Reply via email to