lkml.org 
[lkml]   [2015]   [Jun]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFC v4 1/4] MPILIB: add mpi_read_buf(), mpi_copy() and mpi_get_size() helpers
On Thu, Jun 11, 2015 at 12:05:38PM -0700, Tadeusz Struk wrote:
>
> +/**
> + * mpi_get_size() - returns max size required to store the number
> + *
> + * @a: A multi precision integer for which we want to allocate a bufer
> + *
> + * Return: size required to store the number
> + */
> +unsigned int mpi_get_size(MPI a)
> +{
> + return a->nlimbs * BYTES_PER_MPI_LIMB;
> +}
> +EXPORT_SYMBOL_GPL(mpi_get_size);

Perhaps inline this function?
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt


\
 
 \ /
  Last update: 2015-06-12 05:21    [W:0.079 / U:0.860 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site