* [PATCH] crypto: constify ccp_actions structure
@ 2016-05-01 11:52 Julia Lawall
2016-05-02 13:58 ` Gary R Hook
2016-05-03 8:17 ` Herbert Xu
0 siblings, 2 replies; 3+ messages in thread
From: Julia Lawall @ 2016-05-01 11:52 UTC (permalink / raw)
To: Tom Lendacky
Cc: kernel-janitors, Gary Hook, Herbert Xu, David S. Miller,
linux-crypto, linux-kernel
The ccp_actions structure is never modified, so declare it as const.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
---
drivers/crypto/ccp/ccp-dev-v3.c | 2 +-
drivers/crypto/ccp/ccp-dev.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/ccp/ccp-dev-v3.c b/drivers/crypto/ccp/ccp-dev-v3.c
index 597fc50..d7a7103 100644
--- a/drivers/crypto/ccp/ccp-dev-v3.c
+++ b/drivers/crypto/ccp/ccp-dev-v3.c
@@ -526,7 +526,7 @@ static irqreturn_t ccp_irq_handler(int irq, void *data)
return IRQ_HANDLED;
}
-static struct ccp_actions ccp3_actions = {
+static const struct ccp_actions ccp3_actions = {
.perform_aes = ccp_perform_aes,
.perform_xts_aes = ccp_perform_xts_aes,
.perform_sha = ccp_perform_sha,
diff --git a/drivers/crypto/ccp/ccp-dev.h b/drivers/crypto/ccp/ccp-dev.h
index 5d986c9..bd41ffce 100644
--- a/drivers/crypto/ccp/ccp-dev.h
+++ b/drivers/crypto/ccp/ccp-dev.h
@@ -162,7 +162,7 @@ struct ccp_actions {
/* Structure to hold CCP version-specific values */
struct ccp_vdata {
unsigned int version;
- struct ccp_actions *perform;
+ const struct ccp_actions *perform;
};
extern struct ccp_vdata ccpv3;
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] crypto: constify ccp_actions structure
2016-05-01 11:52 [PATCH] crypto: constify ccp_actions structure Julia Lawall
@ 2016-05-02 13:58 ` Gary R Hook
2016-05-03 8:17 ` Herbert Xu
1 sibling, 0 replies; 3+ messages in thread
From: Gary R Hook @ 2016-05-02 13:58 UTC (permalink / raw)
To: Julia Lawall, linux-crypto
Cc: Tom Lendacky, kernel-janitors, Gary Hook, Herbert Xu,
David S. Miller, linux-kernel
On 05/01/2016 06:52 AM, Julia Lawall wrote:
> The ccp_actions structure is never modified, so declare it as const.
>
> Done with the help of Coccinelle.
>
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Gary Hook <gary.hook@amd.com>
> ---
> drivers/crypto/ccp/ccp-dev-v3.c | 2 +-
> drivers/crypto/ccp/ccp-dev.h | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/crypto/ccp/ccp-dev-v3.c b/drivers/crypto/ccp/ccp-dev-v3.c
> index 597fc50..d7a7103 100644
> --- a/drivers/crypto/ccp/ccp-dev-v3.c
> +++ b/drivers/crypto/ccp/ccp-dev-v3.c
> @@ -526,7 +526,7 @@ static irqreturn_t ccp_irq_handler(int irq, void *data)
> return IRQ_HANDLED;
> }
>
> -static struct ccp_actions ccp3_actions = {
> +static const struct ccp_actions ccp3_actions = {
> .perform_aes = ccp_perform_aes,
> .perform_xts_aes = ccp_perform_xts_aes,
> .perform_sha = ccp_perform_sha,
> diff --git a/drivers/crypto/ccp/ccp-dev.h b/drivers/crypto/ccp/ccp-dev.h
> index 5d986c9..bd41ffce 100644
> --- a/drivers/crypto/ccp/ccp-dev.h
> +++ b/drivers/crypto/ccp/ccp-dev.h
> @@ -162,7 +162,7 @@ struct ccp_actions {
> /* Structure to hold CCP version-specific values */
> struct ccp_vdata {
> unsigned int version;
> - struct ccp_actions *perform;
> + const struct ccp_actions *perform;
> };
>
> extern struct ccp_vdata ccpv3;
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] crypto: constify ccp_actions structure
2016-05-01 11:52 [PATCH] crypto: constify ccp_actions structure Julia Lawall
2016-05-02 13:58 ` Gary R Hook
@ 2016-05-03 8:17 ` Herbert Xu
1 sibling, 0 replies; 3+ messages in thread
From: Herbert Xu @ 2016-05-03 8:17 UTC (permalink / raw)
To: Julia Lawall
Cc: Tom Lendacky, kernel-janitors, Gary Hook, David S. Miller,
linux-crypto, linux-kernel
On Sun, May 01, 2016 at 01:52:55PM +0200, Julia Lawall wrote:
> The ccp_actions structure is never modified, so declare it as const.
>
> Done with the help of Coccinelle.
>
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Applied.
--
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-05-03 8:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-01 11:52 [PATCH] crypto: constify ccp_actions structure Julia Lawall
2016-05-02 13:58 ` Gary R Hook
2016-05-03 8:17 ` Herbert Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).