On Sun, 2013-12-22 at 17:17 +0800, Chen Gang wrote:
> On 12/22/2013 10:56 AM, Nicholas A. Bellinger wrote:
> > Hi Chen,
> >
> > On Sat, 2013-12-21 at 10:08 +0800, Chen Gang wrote:
> >> In kernel, need use div64_u64_rem() instead of operator '%' for u64, or
> >> can not pass compiling (with allmodconfig under metag):
> >>
> >> MODPOST 2909 modules
> >> ERROR: "__umoddi3" [drivers/target/target_core_mod.ko] undefined!
> >>
> >> Also need u64 type cast for u32 variable multiply u32 variable, or will
> >> cause type overflow issue.
> >>
> >>
> >> Signed-off-by: Chen Gang <
gang.ch...@gmail.com>
> >> ---
> >> drivers/target/target_core_alua.c | 3 ++-
> >> 1 file changed, 2 insertions(+), 1 deletion(-)
> >>
> >
> > FYI, this unsigned long long division in core_alua_state_lba_dependent()
> > was fixed for 32-bit in linux-next >= 12192013 code.
> >
>
> OK, thanks.
>
> The related fix patch changed "start_lba = lba % ..." to "start_lba =
> lba / ...", and also assumed "segment_size * segment_mult" is still
> within u32 (can not cause type over flow).
>
> I guess the original author already knew about them, and intended to do
> like that (if not, please let me know, thanks).
>