All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gary R Hook <ghook@amd.com>
To: Julia Lawall <Julia.Lawall@lip6.fr>, linux-crypto@vger.kernel.org
Cc: Tom Lendacky <thomas.lendacky@amd.com>,
	kernel-janitors@vger.kernel.org, Gary Hook <gary.hook@amd.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	"David S. Miller" <davem@davemloft.net>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] crypto: constify ccp_actions structure
Date: Mon, 02 May 2016 13:58:34 +0000	[thread overview]
Message-ID: <57275D0A.3030208@amd.com> (raw)
In-Reply-To: <1462103575-21705-1-git-send-email-Julia.Lawall@lip6.fr>

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;
>


WARNING: multiple messages have this Message-ID (diff)
From: Gary R Hook <ghook@amd.com>
To: Julia Lawall <Julia.Lawall@lip6.fr>, <linux-crypto@vger.kernel.org>
Cc: Tom Lendacky <thomas.lendacky@amd.com>,
	<kernel-janitors@vger.kernel.org>, Gary Hook <gary.hook@amd.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	"David S. Miller" <davem@davemloft.net>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] crypto: constify ccp_actions structure
Date: Mon, 2 May 2016 08:58:34 -0500	[thread overview]
Message-ID: <57275D0A.3030208@amd.com> (raw)
In-Reply-To: <1462103575-21705-1-git-send-email-Julia.Lawall@lip6.fr>

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;
>


  reply	other threads:[~2016-05-02 13:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-01 11:52 [PATCH] crypto: constify ccp_actions structure Julia Lawall
2016-05-01 11:52 ` Julia Lawall
2016-05-02 13:58 ` Gary R Hook [this message]
2016-05-02 13:58   ` Gary R Hook
2016-05-03  8:17 ` Herbert Xu
2016-05-03  8:17   ` Herbert Xu

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=57275D0A.3030208@amd.com \
    --to=ghook@amd.com \
    --cc=Julia.Lawall@lip6.fr \
    --cc=davem@davemloft.net \
    --cc=gary.hook@amd.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thomas.lendacky@amd.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.