aboutsummaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2019-01-10 15:18:00 -0500
committerHerbert Xu <herbert@gondor.apana.org.au>2019-01-18 05:43:43 -0500
commit466e0759269d31485074126700574230bfff3b1c (patch)
treea33cf92b09e39cf6432232cba721251d435c3405 /crypto
parent554557ce0001fc0371fb88db53d7dfe2a398c6de (diff)
crypto: af_alg - make some functions static
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>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/af_alg.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/crypto/af_alg.c b/crypto/af_alg.c
index 17eb09d222ff..ccae4a7ada8a 100644
--- a/crypto/af_alg.c
+++ b/crypto/af_alg.c
@@ -425,12 +425,12 @@ int af_alg_make_sg(struct af_alg_sgl *sgl, struct iov_iter *iter, int len)
425} 425}
426EXPORT_SYMBOL_GPL(af_alg_make_sg); 426EXPORT_SYMBOL_GPL(af_alg_make_sg);
427 427
428void af_alg_link_sg(struct af_alg_sgl *sgl_prev, struct af_alg_sgl *sgl_new) 428static void af_alg_link_sg(struct af_alg_sgl *sgl_prev,
429 struct af_alg_sgl *sgl_new)
429{ 430{
430 sg_unmark_end(sgl_prev->sg + sgl_prev->npages - 1); 431 sg_unmark_end(sgl_prev->sg + sgl_prev->npages - 1);
431 sg_chain(sgl_prev->sg, sgl_prev->npages + 1, sgl_new->sg); 432 sg_chain(sgl_prev->sg, sgl_prev->npages + 1, sgl_new->sg);
432} 433}
433EXPORT_SYMBOL_GPL(af_alg_link_sg);
434 434
435void af_alg_free_sg(struct af_alg_sgl *sgl) 435void af_alg_free_sg(struct af_alg_sgl *sgl)
436{ 436{
@@ -441,7 +441,7 @@ void af_alg_free_sg(struct af_alg_sgl *sgl)
441} 441}
442EXPORT_SYMBOL_GPL(af_alg_free_sg); 442EXPORT_SYMBOL_GPL(af_alg_free_sg);
443 443
444int af_alg_cmsg_send(struct msghdr *msg, struct af_alg_control *con) 444static int af_alg_cmsg_send(struct msghdr *msg, struct af_alg_control *con)
445{ 445{
446 struct cmsghdr *cmsg; 446 struct cmsghdr *cmsg;
447 447
@@ -480,7 +480,6 @@ int af_alg_cmsg_send(struct msghdr *msg, struct af_alg_control *con)
480 480
481 return 0; 481 return 0;
482} 482}
483EXPORT_SYMBOL_GPL(af_alg_cmsg_send);
484 483
485/** 484/**
486 * af_alg_alloc_tsgl - allocate the TX SGL 485 * af_alg_alloc_tsgl - allocate the TX SGL
@@ -488,7 +487,7 @@ EXPORT_SYMBOL_GPL(af_alg_cmsg_send);
488 * @sk socket of connection to user space 487 * @sk socket of connection to user space
489 * @return: 0 upon success, < 0 upon error 488 * @return: 0 upon success, < 0 upon error
490 */ 489 */
491int af_alg_alloc_tsgl(struct sock *sk) 490static int af_alg_alloc_tsgl(struct sock *sk)
492{ 491{
493 struct alg_sock *ask = alg_sk(sk); 492 struct alg_sock *ask = alg_sk(sk);
494 struct af_alg_ctx *ctx = ask->private; 493 struct af_alg_ctx *ctx = ask->private;
@@ -517,7 +516,6 @@ int af_alg_alloc_tsgl(struct sock *sk)
517 516
518 return 0; 517 return 0;
519} 518}
520EXPORT_SYMBOL_GPL(af_alg_alloc_tsgl);
521 519
522/** 520/**
523 * aead_count_tsgl - Count number of TX SG entries 521 * aead_count_tsgl - Count number of TX SG entries
@@ -654,7 +652,7 @@ EXPORT_SYMBOL_GPL(af_alg_pull_tsgl);
654 * 652 *
655 * @areq Request holding the TX and RX SGL 653 * @areq Request holding the TX and RX SGL
656 */ 654 */
657void af_alg_free_areq_sgls(struct af_alg_async_req *areq) 655static void af_alg_free_areq_sgls(struct af_alg_async_req *areq)
658{ 656{
659 struct sock *sk = areq->sk; 657 struct sock *sk = areq->sk;
660 struct alg_sock *ask = alg_sk(sk); 658 struct alg_sock *ask = alg_sk(sk);
@@ -683,7 +681,6 @@ void af_alg_free_areq_sgls(struct af_alg_async_req *areq)
683 sock_kfree_s(sk, tsgl, areq->tsgl_entries * sizeof(*tsgl)); 681 sock_kfree_s(sk, tsgl, areq->tsgl_entries * sizeof(*tsgl));
684 } 682 }
685} 683}
686EXPORT_SYMBOL_GPL(af_alg_free_areq_sgls);
687 684
688/** 685/**
689 * af_alg_wait_for_wmem - wait for availability of writable memory 686 * af_alg_wait_for_wmem - wait for availability of writable memory
@@ -692,7 +689,7 @@ EXPORT_SYMBOL_GPL(af_alg_free_areq_sgls);
692 * @flags If MSG_DONTWAIT is set, then only report if function would sleep 689 * @flags If MSG_DONTWAIT is set, then only report if function would sleep
693 * @return 0 when writable memory is available, < 0 upon error 690 * @return 0 when writable memory is available, < 0 upon error
694 */ 691 */
695int af_alg_wait_for_wmem(struct sock *sk, unsigned int flags) 692static int af_alg_wait_for_wmem(struct sock *sk, unsigned int flags)
696{ 693{
697 DEFINE_WAIT_FUNC(wait, woken_wake_function); 694 DEFINE_WAIT_FUNC(wait, woken_wake_function);
698 int err = -ERESTARTSYS; 695 int err = -ERESTARTSYS;
@@ -717,7 +714,6 @@ int af_alg_wait_for_wmem(struct sock *sk, unsigned int flags)
717 714
718 return err; 715 return err;
719} 716}
720EXPORT_SYMBOL_GPL(af_alg_wait_for_wmem);
721 717
722/** 718/**
723 * af_alg_wmem_wakeup - wakeup caller when writable memory is available 719 * af_alg_wmem_wakeup - wakeup caller when writable memory is available
@@ -786,8 +782,7 @@ EXPORT_SYMBOL_GPL(af_alg_wait_for_data);
786 * 782 *
787 * @sk socket of connection to user space 783 * @sk socket of connection to user space
788 */ 784 */
789 785static void af_alg_data_wakeup(struct sock *sk)
790void af_alg_data_wakeup(struct sock *sk)
791{ 786{
792 struct alg_sock *ask = alg_sk(sk); 787 struct alg_sock *ask = alg_sk(sk);
793 struct af_alg_ctx *ctx = ask->private; 788 struct af_alg_ctx *ctx = ask->private;
@@ -805,7 +800,6 @@ void af_alg_data_wakeup(struct sock *sk)
805 sk_wake_async(sk, SOCK_WAKE_SPACE, POLL_OUT); 800 sk_wake_async(sk, SOCK_WAKE_SPACE, POLL_OUT);
806 rcu_read_unlock(); 801 rcu_read_unlock();
807} 802}
808EXPORT_SYMBOL_GPL(af_alg_data_wakeup);
809 803
810/** 804/**
811 * af_alg_sendmsg - implementation of sendmsg system call handler 805 * af_alg_sendmsg - implementation of sendmsg system call handler