From: Jarkko Sakkinen <jarkko@kernel.org>
To: Colin Ian King <colin.i.king@googlemail.com>,
Peter Huewe <peterhuewe@gmx.de>, Jason Gunthorpe <jgg@ziepe.ca>,
linux-integrity@vger.kernel.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tpm: make const pointer desc a static const array
Date: Mon, 29 Nov 2021 22:09:33 +0200 [thread overview]
Message-ID: <455f66b569d81606e05775c4ac04a4b16e4c1782.camel@kernel.org> (raw)
In-Reply-To: <20211127172604.126322-1-colin.i.king@gmail.com>
On Sat, 2021-11-27 at 17:26 +0000, Colin Ian King wrote:
> Make const pointer desc a static const array, removes a dereference
> and shrinks object code a few bytes.
>
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---
> drivers/char/tpm/tpm_tis_core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c
> index b2659a4c4016..649b4229e76e 100644
> --- a/drivers/char/tpm/tpm_tis_core.c
> +++ b/drivers/char/tpm/tpm_tis_core.c
> @@ -716,7 +716,7 @@ static irqreturn_t tis_int_handler(int dummy, void *dev_id)
>
> static int tpm_tis_gen_interrupt(struct tpm_chip *chip)
> {
> - const char *desc = "attempting to generate an interrupt";
> + static const char desc[] = "attempting to generate an interrupt";
> u32 cap2;
> cap_t cap;
> int ret;
I'd rather go for:
#define TPM_TIS_GEN_INTERRUPT_DESC "attempting to generate an interrupt"
/Jarkko
prev parent reply other threads:[~2021-11-29 23:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-27 17:26 [PATCH] tpm: make const pointer desc a static const array Colin Ian King
2021-11-29 20:09 ` Jarkko Sakkinen [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=455f66b569d81606e05775c4ac04a4b16e4c1782.camel@kernel.org \
--to=jarkko@kernel.org \
--cc=colin.i.king@googlemail.com \
--cc=jgg@ziepe.ca \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterhuewe@gmx.de \
/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;
as well as URLs for NNTP newsgroup(s).