Re: [PATCH 04/22] ARM: i.MX: bbu: Move inner-image type check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 22, 2018 at 05:06:55PM -0700, Andrey Smirnov wrote:
> On Tue, Aug 21, 2018 at 11:52 PM Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> wrote:
> > > @@ -137,7 +165,8 @@ static int imx_bbu_internal_v1_update(struct bbu_handler *handler, struct bbu_da
> > >               container_of(handler, struct imx_internal_bbu_handler, handler);
> > >       int ret;
> > >
> > > -     ret = imx_bbu_check_prereq(data->devicefile, data);
> > > +     ret = imx_bbu_check_prereq(imx_handler, data->devicefile, data,
> > > +                                filetype_unknown);
> >
> > Why filetype_unknown here? in the v2 version we have
> > filetype_imx_image_v2. I would expect filetype_imx_image_v1 here.
> >
> 
> Purely because original code didn't do any type checking of "inner"
> image, so I specified filetype_unknown and and added special handling
> for it to preserve the status quo. It sounds like you think that it
> would be better to change the original behavior such that there _is_
> an "inner" image type check for v1 one header. That would be my
> preference as well, since that'll allow me to get rid of special
> filetype_unknown case, so that's what I'll do in v2.

Not sure why the v1 code is different here, it probably just grew like
that and I never noticed.

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux