lkml.org 
[lkml]   [2024]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mtd: ubi: avoid expensive do_div() on 32-bit machines
On Wed, Mar 13, 2024, at 14:43, Zhihao Cheng wrote:
> 在 2024/3/13 21:39, Arnd Bergmann 写道:
>
>>> Thanks for explaination, which means that do_div is used for 64-bit
>>> division to solve the link failure caused by missed libgcc. Since
>>> parameter 'from' is u32, there is no need to invoke do_div on a 32-bit
>>> platform, you just want to stop the wasting behavior on a 32-bit
>>> platform. Do I understand right?
>>
> How do you find it? I mean there are so many types and many do_div
> callers, do you have a static check tool?

I had a local fix with the same effect that I applied when
the code originally broke, but had not gotten around to
sending my fix.

After b8a77b9a5f9c ("mtd: ubi: fix NVMEM over UBI volumes on
32-bit systems") introduced a different workaround, I got the
link error because I had removed the do_div().

Arnd

\
 
 \ /
  Last update: 2024-03-13 14:51    [W:0.033 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site