[PATCH 16/30] ide: Avoid preprocessor for CONFIG_LBA48

Simon Glass sjg at chromium.org
Wed Apr 19 03:46:40 CEST 2023


Hi Mattijs,

On Tue, 28 Mar 2023 at 08:18, Mattijs Korpershoek
<mkorpershoek at baylibre.com> wrote:
>
> On mar., mars 28, 2023 at 08:07, Simon Glass <sjg at chromium.org> wrote:
>
> > Use IS_ENABLED() instead for all conditions. Add the 'lba48' flag into
> > struct blk_desc always, since it uses very little space. Use a bool so
> > the meaning is clearer.
> >
> > Signed-off-by: Simon Glass <sjg at chromium.org>
> > ---
> >
> >  drivers/block/ide.c | 57 ++++++++++++++++-----------------------------
> >  include/blk.h       |  4 +---
> >  2 files changed, 21 insertions(+), 40 deletions(-)
> >
[..]

> > diff --git a/include/blk.h b/include/blk.h
> > index 871922dcde07..2c9c7985a885 100644
> > --- a/include/blk.h
> > +++ b/include/blk.h
> > @@ -62,10 +62,8 @@ struct blk_desc {
> >       unsigned char   hwpart;         /* HW partition, e.g. for eMMC */
> >       unsigned char   type;           /* device type */
> >       unsigned char   removable;      /* removable device */
> > -#ifdef CONFIG_LBA48
> >       /* device can use 48bit addr (ATA/ATAPI v7) */
> > -     unsigned char   lba48;
> > -#endif
> > +     bool    lba48;
>
> nitpick Is there a reason for having dropped this comment?
> /* device can use 48bit addr (ATA/ATAPI v7) */
>
> In any case:
>
> Reviewed-by: Mattijs Korpershoek <mkorpershoek at baylibre.com>

Thanks for the review. On closer inspection it does not actually drop
the comment.

Regards,
Simon


More information about the U-Boot mailing list