diff options
author | Fabio Estevam <festevam@gmail.com> | 2017-08-01 09:45:01 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2017-08-09 08:18:29 -0400 |
commit | a92f7af3854ce6b80a4cd7e3df6148663f15671b (patch) | |
tree | 389426c5a47e24d6d8fd4c4e10125e3fc8e02698 | |
parent | ac360faf955125d362128835e479da0e2646b341 (diff) |
crypto: caam - Remove unused dentry members
Most of the dentry members from structure caam_drv_private
are never used at all, so it is safe to remove them.
Since debugfs_remove_recursive() is called, we don't need the
file entries.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Acked-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r-- | drivers/crypto/caam/ctrl.c | 81 | ||||
-rw-r--r-- | drivers/crypto/caam/intern.h | 8 | ||||
-rw-r--r-- | drivers/crypto/caam/qi.c | 6 |
3 files changed, 32 insertions, 63 deletions
diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c index fdbcba13824c..dacb53fb690e 100644 --- a/drivers/crypto/caam/ctrl.c +++ b/drivers/crypto/caam/ctrl.c | |||
@@ -747,59 +747,38 @@ static int caam_probe(struct platform_device *pdev) | |||
747 | caam_dpaa2 ? "yes" : "no"); | 747 | caam_dpaa2 ? "yes" : "no"); |
748 | 748 | ||
749 | #ifdef CONFIG_DEBUG_FS | 749 | #ifdef CONFIG_DEBUG_FS |
750 | 750 | debugfs_create_file("rq_dequeued", S_IRUSR | S_IRGRP | S_IROTH, | |
751 | ctrlpriv->ctl_rq_dequeued = | 751 | ctrlpriv->ctl, &perfmon->req_dequeued, |
752 | debugfs_create_file("rq_dequeued", | 752 | &caam_fops_u64_ro); |
753 | S_IRUSR | S_IRGRP | S_IROTH, | 753 | debugfs_create_file("ob_rq_encrypted", S_IRUSR | S_IRGRP | S_IROTH, |
754 | ctrlpriv->ctl, &perfmon->req_dequeued, | 754 | ctrlpriv->ctl, &perfmon->ob_enc_req, |
755 | &caam_fops_u64_ro); | 755 | &caam_fops_u64_ro); |
756 | ctrlpriv->ctl_ob_enc_req = | 756 | debugfs_create_file("ib_rq_decrypted", S_IRUSR | S_IRGRP | S_IROTH, |
757 | debugfs_create_file("ob_rq_encrypted", | 757 | ctrlpriv->ctl, &perfmon->ib_dec_req, |
758 | S_IRUSR | S_IRGRP | S_IROTH, | 758 | &caam_fops_u64_ro); |
759 | ctrlpriv->ctl, &perfmon->ob_enc_req, | 759 | debugfs_create_file("ob_bytes_encrypted", S_IRUSR | S_IRGRP | S_IROTH, |
760 | &caam_fops_u64_ro); | 760 | ctrlpriv->ctl, &perfmon->ob_enc_bytes, |
761 | ctrlpriv->ctl_ib_dec_req = | 761 | &caam_fops_u64_ro); |
762 | debugfs_create_file("ib_rq_decrypted", | 762 | debugfs_create_file("ob_bytes_protected", S_IRUSR | S_IRGRP | S_IROTH, |
763 | S_IRUSR | S_IRGRP | S_IROTH, | 763 | ctrlpriv->ctl, &perfmon->ob_prot_bytes, |
764 | ctrlpriv->ctl, &perfmon->ib_dec_req, | 764 | &caam_fops_u64_ro); |
765 | &caam_fops_u64_ro); | 765 | debugfs_create_file("ib_bytes_decrypted", S_IRUSR | S_IRGRP | S_IROTH, |
766 | ctrlpriv->ctl_ob_enc_bytes = | 766 | ctrlpriv->ctl, &perfmon->ib_dec_bytes, |
767 | debugfs_create_file("ob_bytes_encrypted", | 767 | &caam_fops_u64_ro); |
768 | S_IRUSR | S_IRGRP | S_IROTH, | 768 | debugfs_create_file("ib_bytes_validated", S_IRUSR | S_IRGRP | S_IROTH, |
769 | ctrlpriv->ctl, &perfmon->ob_enc_bytes, | 769 | ctrlpriv->ctl, &perfmon->ib_valid_bytes, |
770 | &caam_fops_u64_ro); | 770 | &caam_fops_u64_ro); |
771 | ctrlpriv->ctl_ob_prot_bytes = | ||
772 | debugfs_create_file("ob_bytes_protected", | ||
773 | S_IRUSR | S_IRGRP | S_IROTH, | ||
774 | ctrlpriv->ctl, &perfmon->ob_prot_bytes, | ||
775 | &caam_fops_u64_ro); | ||
776 | ctrlpriv->ctl_ib_dec_bytes = | ||
777 | debugfs_create_file("ib_bytes_decrypted", | ||
778 | S_IRUSR | S_IRGRP | S_IROTH, | ||
779 | ctrlpriv->ctl, &perfmon->ib_dec_bytes, | ||
780 | &caam_fops_u64_ro); | ||
781 | ctrlpriv->ctl_ib_valid_bytes = | ||
782 | debugfs_create_file("ib_bytes_validated", | ||
783 | S_IRUSR | S_IRGRP | S_IROTH, | ||
784 | ctrlpriv->ctl, &perfmon->ib_valid_bytes, | ||
785 | &caam_fops_u64_ro); | ||
786 | 771 | ||
787 | /* Controller level - global status values */ | 772 | /* Controller level - global status values */ |
788 | ctrlpriv->ctl_faultaddr = | 773 | debugfs_create_file("fault_addr", S_IRUSR | S_IRGRP | S_IROTH, |
789 | debugfs_create_file("fault_addr", | 774 | ctrlpriv->ctl, &perfmon->faultaddr, |
790 | S_IRUSR | S_IRGRP | S_IROTH, | 775 | &caam_fops_u32_ro); |
791 | ctrlpriv->ctl, &perfmon->faultaddr, | 776 | debugfs_create_file("fault_detail", S_IRUSR | S_IRGRP | S_IROTH, |
792 | &caam_fops_u32_ro); | 777 | ctrlpriv->ctl, &perfmon->faultdetail, |
793 | ctrlpriv->ctl_faultdetail = | 778 | &caam_fops_u32_ro); |
794 | debugfs_create_file("fault_detail", | 779 | debugfs_create_file("fault_status", S_IRUSR | S_IRGRP | S_IROTH, |
795 | S_IRUSR | S_IRGRP | S_IROTH, | 780 | ctrlpriv->ctl, &perfmon->status, |
796 | ctrlpriv->ctl, &perfmon->faultdetail, | 781 | &caam_fops_u32_ro); |
797 | &caam_fops_u32_ro); | ||
798 | ctrlpriv->ctl_faultstatus = | ||
799 | debugfs_create_file("fault_status", | ||
800 | S_IRUSR | S_IRGRP | S_IROTH, | ||
801 | ctrlpriv->ctl, &perfmon->status, | ||
802 | &caam_fops_u32_ro); | ||
803 | 782 | ||
804 | /* Internal covering keys (useful in non-secure mode only) */ | 783 | /* Internal covering keys (useful in non-secure mode only) */ |
805 | ctrlpriv->ctl_kek_wrap.data = (__force void *)&ctrlpriv->ctrl->kek[0]; | 784 | ctrlpriv->ctl_kek_wrap.data = (__force void *)&ctrlpriv->ctrl->kek[0]; |
diff --git a/drivers/crypto/caam/intern.h b/drivers/crypto/caam/intern.h index 9e3f3e0a7ffa..a52361258d3a 100644 --- a/drivers/crypto/caam/intern.h +++ b/drivers/crypto/caam/intern.h | |||
@@ -102,16 +102,8 @@ struct caam_drv_private { | |||
102 | #ifdef CONFIG_DEBUG_FS | 102 | #ifdef CONFIG_DEBUG_FS |
103 | struct dentry *dfs_root; | 103 | struct dentry *dfs_root; |
104 | struct dentry *ctl; /* controller dir */ | 104 | struct dentry *ctl; /* controller dir */ |
105 | struct dentry *ctl_rq_dequeued, *ctl_ob_enc_req, *ctl_ib_dec_req; | ||
106 | struct dentry *ctl_ob_enc_bytes, *ctl_ob_prot_bytes; | ||
107 | struct dentry *ctl_ib_dec_bytes, *ctl_ib_valid_bytes; | ||
108 | struct dentry *ctl_faultaddr, *ctl_faultdetail, *ctl_faultstatus; | ||
109 | |||
110 | struct debugfs_blob_wrapper ctl_kek_wrap, ctl_tkek_wrap, ctl_tdsk_wrap; | 105 | struct debugfs_blob_wrapper ctl_kek_wrap, ctl_tkek_wrap, ctl_tdsk_wrap; |
111 | struct dentry *ctl_kek, *ctl_tkek, *ctl_tdsk; | 106 | struct dentry *ctl_kek, *ctl_tkek, *ctl_tdsk; |
112 | #ifdef CONFIG_CAAM_QI | ||
113 | struct dentry *qi_congested; | ||
114 | #endif | ||
115 | #endif | 107 | #endif |
116 | }; | 108 | }; |
117 | 109 | ||
diff --git a/drivers/crypto/caam/qi.c b/drivers/crypto/caam/qi.c index 9a4151ac5e37..e4cf00014233 100644 --- a/drivers/crypto/caam/qi.c +++ b/drivers/crypto/caam/qi.c | |||
@@ -791,10 +791,8 @@ int caam_qi_init(struct platform_device *caam_pdev) | |||
791 | /* Done with the CGRs; restore the cpus allowed mask */ | 791 | /* Done with the CGRs; restore the cpus allowed mask */ |
792 | set_cpus_allowed_ptr(current, &old_cpumask); | 792 | set_cpus_allowed_ptr(current, &old_cpumask); |
793 | #ifdef CONFIG_DEBUG_FS | 793 | #ifdef CONFIG_DEBUG_FS |
794 | ctrlpriv->qi_congested = debugfs_create_file("qi_congested", 0444, | 794 | debugfs_create_file("qi_congested", 0444, ctrlpriv->ctl, |
795 | ctrlpriv->ctl, | 795 | ×_congested, &caam_fops_u64_ro); |
796 | ×_congested, | ||
797 | &caam_fops_u64_ro); | ||
798 | #endif | 796 | #endif |
799 | dev_info(qidev, "Linux CAAM Queue I/F driver initialised\n"); | 797 | dev_info(qidev, "Linux CAAM Queue I/F driver initialised\n"); |
800 | return 0; | 798 | return 0; |