projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'media/v4.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
[firefly-linux-kernel-4.4.55.git]
/
lib
/
mpi
/
mpi-pow.c
diff --git
a/lib/mpi/mpi-pow.c
b/lib/mpi/mpi-pow.c
index 67f3e79af9140e0160a4264b506b41344304e916..5464c8744ea95647beeef44efc3722161f5b224b 100644
(file)
--- a/
lib/mpi/mpi-pow.c
+++ b/
lib/mpi/mpi-pow.c
@@
-77,7
+77,7
@@
int mpi_powm(MPI res, MPI base, MPI exp, MPI mod)
mp = mp_marker = mpi_alloc_limb_space(msize);
if (!mp)
goto enomem;
mp = mp_marker = mpi_alloc_limb_space(msize);
if (!mp)
goto enomem;
-
count_leading_zeros(mod_shift_cnt,
mod->d[msize - 1]);
+
mod_shift_cnt = count_leading_zeros(
mod->d[msize - 1]);
if (mod_shift_cnt)
mpihelp_lshift(mp, mod->d, msize, mod_shift_cnt);
else
if (mod_shift_cnt)
mpihelp_lshift(mp, mod->d, msize, mod_shift_cnt);
else
@@
-169,7
+169,7
@@
int mpi_powm(MPI res, MPI base, MPI exp, MPI mod)
i = esize - 1;
e = ep[i];
i = esize - 1;
e = ep[i];
- c
ount_leading_zeros(c,
e);
+ c
= count_leading_zeros(
e);
e = (e << c) << 1; /* shift the exp bits to the left, lose msb */
c = BITS_PER_MPI_LIMB - 1 - c;
e = (e << c) << 1; /* shift the exp bits to the left, lose msb */
c = BITS_PER_MPI_LIMB - 1 - c;