crypto: af_alg - make some functions static
[ Upstream commit 466e0759269d31485074126700574230bfff3b1c ] Some exported functions in af_alg.c aren't used outside of that file. Therefore, un-export them and make them 'static'. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Stable-dep-of: f3c802a1f300 ("crypto: algif_aead - Only wake up when ctx->more is zero") Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Sasha Levin
parent
17a1144baa
commit
0ca02d4bee
@@ -429,12 +429,12 @@ int af_alg_make_sg(struct af_alg_sgl *sgl, struct iov_iter *iter, int len)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(af_alg_make_sg);
|
||||
|
||||
void af_alg_link_sg(struct af_alg_sgl *sgl_prev, struct af_alg_sgl *sgl_new)
|
||||
static void af_alg_link_sg(struct af_alg_sgl *sgl_prev,
|
||||
struct af_alg_sgl *sgl_new)
|
||||
{
|
||||
sg_unmark_end(sgl_prev->sg + sgl_prev->npages - 1);
|
||||
sg_chain(sgl_prev->sg, sgl_prev->npages + 1, sgl_new->sg);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(af_alg_link_sg);
|
||||
|
||||
void af_alg_free_sg(struct af_alg_sgl *sgl)
|
||||
{
|
||||
@@ -445,7 +445,7 @@ void af_alg_free_sg(struct af_alg_sgl *sgl)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(af_alg_free_sg);
|
||||
|
||||
int af_alg_cmsg_send(struct msghdr *msg, struct af_alg_control *con)
|
||||
static int af_alg_cmsg_send(struct msghdr *msg, struct af_alg_control *con)
|
||||
{
|
||||
struct cmsghdr *cmsg;
|
||||
|
||||
@@ -484,7 +484,6 @@ int af_alg_cmsg_send(struct msghdr *msg, struct af_alg_control *con)
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(af_alg_cmsg_send);
|
||||
|
||||
/**
|
||||
* af_alg_alloc_tsgl - allocate the TX SGL
|
||||
@@ -492,7 +491,7 @@ EXPORT_SYMBOL_GPL(af_alg_cmsg_send);
|
||||
* @sk socket of connection to user space
|
||||
* @return: 0 upon success, < 0 upon error
|
||||
*/
|
||||
int af_alg_alloc_tsgl(struct sock *sk)
|
||||
static int af_alg_alloc_tsgl(struct sock *sk)
|
||||
{
|
||||
struct alg_sock *ask = alg_sk(sk);
|
||||
struct af_alg_ctx *ctx = ask->private;
|
||||
@@ -521,7 +520,6 @@ int af_alg_alloc_tsgl(struct sock *sk)
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(af_alg_alloc_tsgl);
|
||||
|
||||
/**
|
||||
* aead_count_tsgl - Count number of TX SG entries
|
||||
@@ -658,7 +656,7 @@ EXPORT_SYMBOL_GPL(af_alg_pull_tsgl);
|
||||
*
|
||||
* @areq Request holding the TX and RX SGL
|
||||
*/
|
||||
void af_alg_free_areq_sgls(struct af_alg_async_req *areq)
|
||||
static void af_alg_free_areq_sgls(struct af_alg_async_req *areq)
|
||||
{
|
||||
struct sock *sk = areq->sk;
|
||||
struct alg_sock *ask = alg_sk(sk);
|
||||
@@ -687,7 +685,6 @@ void af_alg_free_areq_sgls(struct af_alg_async_req *areq)
|
||||
sock_kfree_s(sk, tsgl, areq->tsgl_entries * sizeof(*tsgl));
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(af_alg_free_areq_sgls);
|
||||
|
||||
/**
|
||||
* af_alg_wait_for_wmem - wait for availability of writable memory
|
||||
@@ -696,7 +693,7 @@ EXPORT_SYMBOL_GPL(af_alg_free_areq_sgls);
|
||||
* @flags If MSG_DONTWAIT is set, then only report if function would sleep
|
||||
* @return 0 when writable memory is available, < 0 upon error
|
||||
*/
|
||||
int af_alg_wait_for_wmem(struct sock *sk, unsigned int flags)
|
||||
static int af_alg_wait_for_wmem(struct sock *sk, unsigned int flags)
|
||||
{
|
||||
DEFINE_WAIT_FUNC(wait, woken_wake_function);
|
||||
int err = -ERESTARTSYS;
|
||||
@@ -721,7 +718,6 @@ int af_alg_wait_for_wmem(struct sock *sk, unsigned int flags)
|
||||
|
||||
return err;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(af_alg_wait_for_wmem);
|
||||
|
||||
/**
|
||||
* af_alg_wmem_wakeup - wakeup caller when writable memory is available
|
||||
@@ -790,8 +786,7 @@ EXPORT_SYMBOL_GPL(af_alg_wait_for_data);
|
||||
*
|
||||
* @sk socket of connection to user space
|
||||
*/
|
||||
|
||||
void af_alg_data_wakeup(struct sock *sk)
|
||||
static void af_alg_data_wakeup(struct sock *sk)
|
||||
{
|
||||
struct alg_sock *ask = alg_sk(sk);
|
||||
struct af_alg_ctx *ctx = ask->private;
|
||||
@@ -809,7 +804,6 @@ void af_alg_data_wakeup(struct sock *sk)
|
||||
sk_wake_async(sk, SOCK_WAKE_SPACE, POLL_OUT);
|
||||
rcu_read_unlock();
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(af_alg_data_wakeup);
|
||||
|
||||
/**
|
||||
* af_alg_sendmsg - implementation of sendmsg system call handler
|
||||
|
||||
Reference in New Issue
Block a user