From: Herbert Xu <herbert@gondor.apana.org.au>
To: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Cc: davem@davemloft.net, linux-crypto@vger.kernel.org,
linux-kernel@vger.kernel.org, gustavo@embeddedor.com
Subject: Re: [PATCH] crypto: atmel-sha: remove unnecessary static in atmel_sha_remove()
Date: Thu, 3 Aug 2017 14:11:31 +0800 [thread overview]
Message-ID: <20170803061131.GA12257@gondor.apana.org.au> (raw)
In-Reply-To: <20170718230444.GA23140@embeddedgus>
Gustavo A. R. Silva <gustavo@embeddedor.com> wrote:
> Remove unnecessary static on local variable sha_dd. Such variable
> is initialized before being used, on every execution path throughout
> the function. The static has no benefit and, removing it reduces the
> object file size.
>
> This issue was detected using Coccinelle and the following semantic patch:
> https://github.com/GustavoARSilva/coccinelle/blob/master/static/static_unused.cocci
>
> In the following log you can see a significant difference in the object
> file size. This log is the output of the size command, before and after
> the code change:
>
> before:
> text data bss dec hex filename
> 30005 10264 128 40397 9dcd drivers/crypto/atmel-sha.o
>
> after:
> text data bss dec hex filename
> 29934 10208 64 40206 9d0e drivers/crypto/atmel-sha.o
>
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.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
prev parent reply other threads:[~2017-08-03 6:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-18 23:04 [PATCH] crypto: atmel-sha: remove unnecessary static in atmel_sha_remove() Gustavo A. R. Silva
2017-08-03 6:11 ` Herbert Xu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170803061131.GA12257@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=davem@davemloft.net \
--cc=gustavo@embeddedor.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox