Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1481885 > unrolled thread
| Started by | Masahiro Yamada <yamada.masahiro@socionext.com> |
|---|---|
| First post | 2016-09-12 21:30 +0200 |
| Last post | 2016-09-13 14:50 +0200 |
| Articles | 5 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] crypto: squash lines for simple wrapper functions Masahiro Yamada <yamada.masahiro@socionext.com> - 2016-09-12 21:30 +0200
Re: [PATCH] crypto: squash lines for simple wrapper functions Joe Perches <joe@perches.com> - 2016-09-12 21:50 +0200
Re: [PATCH] crypto: squash lines for simple wrapper functions Masahiro Yamada <yamada.masahiro@socionext.com> - 2016-09-14 04:20 +0200
Re: [PATCH] crypto: squash lines for simple wrapper functions Joe Perches <joe@perches.com> - 2016-09-14 04:30 +0200
Re: [PATCH] crypto: squash lines for simple wrapper functions Herbert Xu <herbert@gondor.apana.org.au> - 2016-09-13 14:50 +0200
| From | Masahiro Yamada <yamada.masahiro@socionext.com> |
|---|---|
| Date | 2016-09-12 21:30 +0200 |
| Subject | [PATCH] crypto: squash lines for simple wrapper functions |
| Message-ID | <sgF5v-7Bx-7@gated-at.bofh.it> |
Remove unneeded variables and assignments.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
crypto/crct10dif_generic.c | 5 +----
crypto/mcryptd.c | 7 +------
drivers/crypto/hifn_795x.c | 12 ++----------
3 files changed, 4 insertions(+), 20 deletions(-)
diff --git a/crypto/crct10dif_generic.c b/crypto/crct10dif_generic.c
index c1229614..8e94e29 100644
--- a/crypto/crct10dif_generic.c
+++ b/crypto/crct10dif_generic.c
@@ -107,10 +107,7 @@ static struct shash_alg alg = {
static int __init crct10dif_mod_init(void)
{
- int ret;
-
- ret = crypto_register_shash(&alg);
- return ret;
+ return crypto_register_shash(&alg);
}
static void __exit crct10dif_mod_fini(void)
diff --git a/crypto/mcryptd.c b/crypto/mcryptd.c
index 86fb59b..94ee44a 100644
--- a/crypto/mcryptd.c
+++ b/crypto/mcryptd.c
@@ -612,12 +612,7 @@ EXPORT_SYMBOL_GPL(mcryptd_alloc_ahash);
int ahash_mcryptd_digest(struct ahash_request *desc)
{
- int err;
-
- err = crypto_ahash_init(desc) ?:
- ahash_mcryptd_finup(desc);
-
- return err;
+ return crypto_ahash_init(desc) ?: ahash_mcryptd_finup(desc);
}
int ahash_mcryptd_update(struct ahash_request *desc)
diff --git a/drivers/crypto/hifn_795x.c b/drivers/crypto/hifn_795x.c
index eee2c7e..e09d405 100644
--- a/drivers/crypto/hifn_795x.c
+++ b/drivers/crypto/hifn_795x.c
@@ -636,20 +636,12 @@ struct hifn_request_context {
static inline u32 hifn_read_0(struct hifn_device *dev, u32 reg)
{
- u32 ret;
-
- ret = readl(dev->bar[0] + reg);
-
- return ret;
+ return readl(dev->bar[0] + reg);
}
static inline u32 hifn_read_1(struct hifn_device *dev, u32 reg)
{
- u32 ret;
-
- ret = readl(dev->bar[1] + reg);
-
- return ret;
+ return readl(dev->bar[1] + reg);
}
static inline void hifn_write_0(struct hifn_device *dev, u32 reg, u32 val)
--
1.9.1
[toc] | [next] | [standalone]
| From | Joe Perches <joe@perches.com> |
|---|---|
| Date | 2016-09-12 21:50 +0200 |
| Message-ID | <sgFoS-7LG-21@gated-at.bofh.it> |
| In reply to | #1481885 |
On Tue, 2016-09-13 at 04:27 +0900, Masahiro Yamada wrote: > Remove unneeded variables and assignments. Was this found by visual inspection or some tool? If it's via a tool, it's good to mention that in the changelog.
[toc] | [prev] | [next] | [standalone]
| From | Masahiro Yamada <yamada.masahiro@socionext.com> |
|---|---|
| Date | 2016-09-14 04:20 +0200 |
| Message-ID | <sh7XP-2c8-3@gated-at.bofh.it> |
| In reply to | #1481929 |
Hi Joe, 2016-09-13 4:44 GMT+09:00 Joe Perches <joe@perches.com>: > On Tue, 2016-09-13 at 04:27 +0900, Masahiro Yamada wrote: >> Remove unneeded variables and assignments. > > Was this found by visual inspection or some tool? > > If it's via a tool, it's good to mention that in the changelog. I used Coccinelle, but I did not mention it in case somebody may say "then, please provide your semantic patch". As a Coccinelle beginner, I do not want to expose my stupid semantic patch. -- Best Regards Masahiro Yamada
[toc] | [prev] | [next] | [standalone]
| From | Joe Perches <joe@perches.com> |
|---|---|
| Date | 2016-09-14 04:30 +0200 |
| Message-ID | <sh87w-2fH-7@gated-at.bofh.it> |
| In reply to | #1482876 |
On Wed, 2016-09-14 at 11:10 +0900, Masahiro Yamada wrote: > 2016-09-13 4:44 GMT+09:00 Joe Perches <joe@perches.com>: > > On Tue, 2016-09-13 at 04:27 +0900, Masahiro Yamada wrote: > > > Remove unneeded variables and assignments. > > Was this found by visual inspection or some tool? > > If it's via a tool, it's good to mention that in the changelog. > I used Coccinelle, but I did not mention it > in case somebody may say "then, please provide your semantic patch". > As a Coccinelle beginner, I do not want to expose my stupid semantic patch. If you get it "exposed", you'd likely learn something from others that would give a few suggestions/tips on how to improve it.
[toc] | [prev] | [next] | [standalone]
| From | Herbert Xu <herbert@gondor.apana.org.au> |
|---|---|
| Date | 2016-09-13 14:50 +0200 |
| Message-ID | <sgVjY-1TH-27@gated-at.bofh.it> |
| In reply to | #1481885 |
On Tue, Sep 13, 2016 at 04:27:54AM +0900, Masahiro Yamada wrote: > Remove unneeded variables and assignments. > > Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Patch applied. Thanks. -- 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
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web