[EXT] RE: [PATCH] media: amphion: fix some error related with undefined reference to __divdi3

Ming Qian ming.qian at nxp.com
Thu Mar 10 00:36:51 PST 2022


> -----Original Message-----
> From: David Laight [mailto:David.Laight at ACULAB.COM]
> Sent: Wednesday, March 9, 2022 9:27 PM
> To: Ming Qian <ming.qian at nxp.com>; mchehab at kernel.org;
> shawnguo at kernel.org; robh+dt at kernel.org; s.hauer at pengutronix.de
> Cc: hverkuil-cisco at xs4all.nl; kernel at pengutronix.de; festevam at gmail.com;
> dl-linux-imx <linux-imx at nxp.com>; Aisheng Dong <aisheng.dong at nxp.com>;
> linux-media at vger.kernel.org; linux-kernel at vger.kernel.org;
> devicetree at vger.kernel.org; linux-arm-kernel at lists.infradead.org
> Subject: [EXT] RE: [PATCH] media: amphion: fix some error related with
> undefined reference to __divdi3
> 
> Caution: EXT Email
> 
> From: Ming Qian
> > Sent: 09 March 2022 05:02
> ...
> > 3. use 'val >> 1' instead of ' val / 2'
> 
> The compiler should do that anyway.
> 
> Especially for unsigned values.
> And it has the wrong (different) rounding for negative values.
> 
>         David
> 

Hi David,
    Yes, you are right, if the value is negative, the behavior is wrong.
    But here, the value type is u32, so I think it's OK.

Ming

> -
> Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1
> 1PT, UK Registration No: 1397386 (Wales)



More information about the linux-arm-kernel mailing list