Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1163727

Re: [PATCH RFC v4 1/4] MPILIB: add mpi_read_buf(), mpi_copy() and mpi_get_size() helpers

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Herbert Xu <herbert@gondor.apana.org.au>
Newsgroups linux.kernel
Subject Re: [PATCH RFC v4 1/4] MPILIB: add mpi_read_buf(), mpi_copy() and mpi_get_size() helpers
Date Fri, 12 Jun 2015 04:50:01 +0200
Message-ID <pAncB-tp-1@gated-at.bofh.it> (permalink)
References <pAg1r-6ty-9@gated-at.bofh.it> <pAg1s-6ty-25@gated-at.bofh.it>
X-Original-To Tadeusz Struk <tadeusz.struk@intel.com>
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
User-Agent Mutt/1.5.21 (2010-09-15)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 25
Organization linux.* mail to news gateway
X-Original-Cc linux-kernel@vger.kernel.org, keescook@chromium.org, jwboyer@redhat.com, richard@nod.at, steved@redhat.com, qat-linux@intel.com, dhowells@redhat.com, linux-crypto@vger.kernel.org, james.l.morris@oracle.com, jkosina@suse.cz, zohar@linux.vnet.ibm.com, davem@davemloft.net, vgoyal@redhat.com
X-Original-Date Fri, 12 Jun 2015 10:44:19 +0800
X-Original-Message-ID <20150612024419.GB30982@gondor.apana.org.au>
X-Original-References <20150611190533.31826.13956.stgit@tstruk-mobl1> <20150611190538.31826.97258.stgit@tstruk-mobl1>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref aioe.org linux.kernel:1163727

Show key headers only | View raw


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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH RFC v4 1/4] MPILIB: add mpi_read_buf(), mpi_copy() and  mpi_get_size() helpers Herbert Xu <herbert@gondor.apana.org.au> - 2015-06-12 04:50 +0200

csiph-web