summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2016-09-12 15:27:54 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2016-09-13 08:27:26 -0400
commit36e09e1f874baf581604a76ce81aae0538eb0a23 (patch)
tree4a97f41ba9255097188b1c26edd6782c10fb1b68
parente9afc746299d39f415fdb13b1213137deb4fc497 (diff)
crypto: squash lines for simple wrapper functions
Remove unneeded variables and assignments. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r--crypto/crct10dif_generic.c5
-rw-r--r--crypto/mcryptd.c7
-rw-r--r--drivers/crypto/hifn_795x.c12
3 files changed, 4 insertions, 20 deletions
diff --git a/crypto/crct10dif_generic.c b/crypto/crct10dif_generic.c
index c1229614c7e3..8e94e29dc6fc 100644
--- a/crypto/crct10dif_generic.c
+++ b/crypto/crct10dif_generic.c
@@ -107,10 +107,7 @@ static struct shash_alg alg = {
107 107
108static int __init crct10dif_mod_init(void) 108static int __init crct10dif_mod_init(void)
109{ 109{
110 int ret; 110 return crypto_register_shash(&alg);
111
112 ret = crypto_register_shash(&alg);
113 return ret;
114} 111}
115 112
116static void __exit crct10dif_mod_fini(void) 113static void __exit crct10dif_mod_fini(void)
diff --git a/crypto/mcryptd.c b/crypto/mcryptd.c
index 86fb59b109a9..94ee44acd465 100644
--- a/crypto/mcryptd.c
+++ b/crypto/mcryptd.c
@@ -612,12 +612,7 @@ EXPORT_SYMBOL_GPL(mcryptd_alloc_ahash);
612 612
613int ahash_mcryptd_digest(struct ahash_request *desc) 613int ahash_mcryptd_digest(struct ahash_request *desc)
614{ 614{
615 int err; 615 return crypto_ahash_init(desc) ?: ahash_mcryptd_finup(desc);
616
617 err = crypto_ahash_init(desc) ?:
618 ahash_mcryptd_finup(desc);
619
620 return err;
621} 616}
622 617
623int ahash_mcryptd_update(struct ahash_request *desc) 618int ahash_mcryptd_update(struct ahash_request *desc)
diff --git a/drivers/crypto/hifn_795x.c b/drivers/crypto/hifn_795x.c
index eee2c7e6c299..e09d4055b19e 100644
--- a/drivers/crypto/hifn_795x.c
+++ b/drivers/crypto/hifn_795x.c
@@ -636,20 +636,12 @@ struct hifn_request_context {
636 636
637static inline u32 hifn_read_0(struct hifn_device *dev, u32 reg) 637static inline u32 hifn_read_0(struct hifn_device *dev, u32 reg)
638{ 638{
639 u32 ret; 639 return readl(dev->bar[0] + reg);
640
641 ret = readl(dev->bar[0] + reg);
642
643 return ret;
644} 640}
645 641
646static inline u32 hifn_read_1(struct hifn_device *dev, u32 reg) 642static inline u32 hifn_read_1(struct hifn_device *dev, u32 reg)
647{ 643{
648 u32 ret; 644 return readl(dev->bar[1] + reg);
649
650 ret = readl(dev->bar[1] + reg);
651
652 return ret;
653} 645}
654 646
655static inline void hifn_write_0(struct hifn_device *dev, u32 reg, u32 val) 647static inline void hifn_write_0(struct hifn_device *dev, u32 reg, u32 val)