From: Jarkko Sakkinen <jarkko@kernel.org>
To: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Cc: Peter Huewe <peterhuewe@gmx.de>, Jason Gunthorpe <jgg@ziepe.ca>,
linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tpm/ppi: Constify static struct attribute_group
Date: Fri, 5 Feb 2021 04:04:18 +0200 [thread overview]
Message-ID: <YBynopNwhIhGBXv/@kernel.org> (raw)
In-Reply-To: <20210204215427.49047-1-rikard.falkeborn@gmail.com>
On Thu, Feb 04, 2021 at 10:54:27PM +0100, Rikard Falkeborn wrote:
> The only usage of ppi_attr_grp is to put its address in an array of
> pointers to const struct attribute_group. Make it const to allow the
> compiler to put it in read-only memory.
>
> Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Thanks.
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
/Jarkko
> ---
> drivers/char/tpm/tpm_ppi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/char/tpm/tpm_ppi.c b/drivers/char/tpm/tpm_ppi.c
> index b2dab941cb7f..40018a73b3cb 100644
> --- a/drivers/char/tpm/tpm_ppi.c
> +++ b/drivers/char/tpm/tpm_ppi.c
> @@ -358,7 +358,7 @@ static struct attribute *ppi_attrs[] = {
> &dev_attr_tcg_operations.attr,
> &dev_attr_vs_operations.attr, NULL,
> };
> -static struct attribute_group ppi_attr_grp = {
> +static const struct attribute_group ppi_attr_grp = {
> .name = "ppi",
> .attrs = ppi_attrs
> };
> --
> 2.30.0
>
>
next prev parent reply other threads:[~2021-02-05 2:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-04 21:54 [PATCH] tpm/ppi: Constify static struct attribute_group Rikard Falkeborn
2021-02-05 2:04 ` Jarkko Sakkinen [this message]
2021-02-26 21:56 ` Rikard Falkeborn
2021-03-01 9:44 ` Jarkko Sakkinen
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=YBynopNwhIhGBXv/@kernel.org \
--to=jarkko@kernel.org \
--cc=jgg@ziepe.ca \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterhuewe@gmx.de \
--cc=rikard.falkeborn@gmail.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.