diff options
Diffstat (limited to 'lib/mpi/mpicoder.c')
-rw-r--r-- | lib/mpi/mpicoder.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/mpi/mpicoder.c b/lib/mpi/mpicoder.c index d995a4c0f1b6..048f0aa505ce 100644 --- a/lib/mpi/mpicoder.c +++ b/lib/mpi/mpicoder.c | |||
@@ -418,15 +418,15 @@ EXPORT_SYMBOL_GPL(mpi_write_to_sgl); | |||
418 | * a new MPI and reads the content of the sgl to the MPI. | 418 | * a new MPI and reads the content of the sgl to the MPI. |
419 | * | 419 | * |
420 | * @sgl: scatterlist to read from | 420 | * @sgl: scatterlist to read from |
421 | * @len: number of bytes to read | 421 | * @nbytes: number of bytes to read |
422 | * | 422 | * |
423 | * Return: Pointer to a new MPI or NULL on error | 423 | * Return: Pointer to a new MPI or NULL on error |
424 | */ | 424 | */ |
425 | MPI mpi_read_raw_from_sgl(struct scatterlist *sgl, unsigned int len) | 425 | MPI mpi_read_raw_from_sgl(struct scatterlist *sgl, unsigned int nbytes) |
426 | { | 426 | { |
427 | struct scatterlist *sg; | 427 | struct scatterlist *sg; |
428 | int x, i, j, z, lzeros, ents; | 428 | int x, i, j, z, lzeros, ents; |
429 | unsigned int nbits, nlimbs, nbytes; | 429 | unsigned int nbits, nlimbs; |
430 | mpi_limb_t a; | 430 | mpi_limb_t a; |
431 | MPI val = NULL; | 431 | MPI val = NULL; |
432 | 432 | ||
@@ -455,7 +455,7 @@ MPI mpi_read_raw_from_sgl(struct scatterlist *sgl, unsigned int len) | |||
455 | if (!ents) | 455 | if (!ents) |
456 | nbytes = 0; | 456 | nbytes = 0; |
457 | else | 457 | else |
458 | nbytes = len - lzeros; | 458 | nbytes -= lzeros; |
459 | 459 | ||
460 | nbits = nbytes * 8; | 460 | nbits = nbytes * 8; |
461 | if (nbits > MAX_EXTERN_MPI_BITS) { | 461 | if (nbits > MAX_EXTERN_MPI_BITS) { |