aboutsummaryrefslogtreecommitdiffstats
path: root/lib/mpi/mpi-pow.c
diff options
context:
space:
mode:
authorDavid Woodhouse <David.Woodhouse@intel.com>2012-11-21 05:38:13 -0500
committerDavid Woodhouse <David.Woodhouse@intel.com>2012-11-21 05:38:13 -0500
commit851462444d421c223965b12b836bef63da61b57f (patch)
tree495baa14e638817941496c36e1443aed7dae0ea0 /lib/mpi/mpi-pow.c
parent5a6ea4af0907f995dc06df21a9c9ef764c7cd3bc (diff)
parent6924d99fcdf1a688538a3cdebd1f135c22eec191 (diff)
Merge branch 'for-3.7' of git://git.infradead.org/users/dedekind/l2-mtd
Conflicts: drivers/mtd/nand/nand_base.c
Diffstat (limited to 'lib/mpi/mpi-pow.c')
-rw-r--r--lib/mpi/mpi-pow.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/mpi/mpi-pow.c b/lib/mpi/mpi-pow.c
index 67f3e79af91..5464c8744ea 100644
--- 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)
77 mp = mp_marker = mpi_alloc_limb_space(msize); 77 mp = mp_marker = mpi_alloc_limb_space(msize);
78 if (!mp) 78 if (!mp)
79 goto enomem; 79 goto enomem;
80 count_leading_zeros(mod_shift_cnt, mod->d[msize - 1]); 80 mod_shift_cnt = count_leading_zeros(mod->d[msize - 1]);
81 if (mod_shift_cnt) 81 if (mod_shift_cnt)
82 mpihelp_lshift(mp, mod->d, msize, mod_shift_cnt); 82 mpihelp_lshift(mp, mod->d, msize, mod_shift_cnt);
83 else 83 else
@@ -169,7 +169,7 @@ int mpi_powm(MPI res, MPI base, MPI exp, MPI mod)
169 169
170 i = esize - 1; 170 i = esize - 1;
171 e = ep[i]; 171 e = ep[i];
172 count_leading_zeros(c, e); 172 c = count_leading_zeros(e);
173 e = (e << c) << 1; /* shift the exp bits to the left, lose msb */ 173 e = (e << c) << 1; /* shift the exp bits to the left, lose msb */
174 c = BITS_PER_MPI_LIMB - 1 - c; 174 c = BITS_PER_MPI_LIMB - 1 - c;
175 175