[PATCH] test: cmd: part: fix integer handling in setup_gpt_partitions()

Dario Binacchi dario.binacchi at amarulasolutions.com
Sat Jun 27 19:24:24 CEST 2026


On Fri, Jun 26, 2026 at 11:58 PM Tom Rini <trini at konsulko.com> wrote:
>
> On Fri, Jun 26, 2026 at 08:40:36PM +0200, Quentin Schulz wrote:
> > Hi Dario,
> >
> > On 6/26/26 8:33 PM, Dario Binacchi wrote:
> > > Coverity reports an INTEGER_OVERFLOW issue because ut_asserteq() compares
> > > an unsigned int (mmc_dev_num) with ret, which can hold a negative error
> > > code.
> > >
> >
> > The trick here is that ut_asserteq() takes two arguments and casts both as
> > unsigned int, hence why it complains.
> >
> > If Coverity is happy, I'm happy :)
> >
> > This looks fine to me, so:
> >
> > Reviewed-by: Quentin Schulz <quentin.schulz at cherry.de>
>
> Yes, were you able to push this through coverity on your own?

No, I haven't.

I couldn't find any documentation on how Coverity is run for U-Boot.
Is there a recommended way to verify Coverity fixes?

Thanks and regards,
Dario
>
> --
> Tom



-- 
Dario Binacchi
Senior Embedded Software Engineer
M. +39 328 0625246
dario.binacchi at amarulasolutions.com
―――――――――――――――
Amarula Solutions SRL
 Via Felice Cavallotti 25D, 41012 Carpi, MO, IT
info at amarulasolutions.com
www.amarulasolutions.com


More information about the U-Boot mailing list