tpmdd-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [PATCH] tpm_tis: unconstify array cmd_getticks
@ 2017-09-07  8:42 Colin King
  2017-09-07 14:02 ` NACK: " Colin Ian King
  0 siblings, 1 reply; 3+ messages in thread
From: Colin King @ 2017-09-07  8:42 UTC (permalink / raw)
  To: Peter Huewe, Marcel Selhorst, Jarkko Sakkinen, Jason Gunthorpe,
	tpmdd-devel
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

Remove const from cmd_getticks, fixes build warnings:

drivers/char/tpm/tpm_tis_core.c:469:31: warning: passing argument 2 of
'tpm_tis_send_data' discards 'const' qualifier from pointer target
type [-Wdiscarded-qualifiers]
  rc = tpm_tis_send_data(chip, cmd_getticks, len);
                               ^
drivers/char/tpm/tpm_tis_core.c:477:31: warning: passing argument 2 of
'tpm_tis_send_data' discards 'const' qualifier from pointer target
type [-Wdiscarded-qualifiers]
  rc = tpm_tis_send_data(chip, cmd_getticks, len);
                               ^
Fixes: 5e35bd8e06b9 ("tpm_tis: make array cmd_getticks static const to shink object code size")
Signed-off-by: Colin Ian King <colin.king@canonical.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 1e957e923d21..91cf38be314f 100644
--- a/drivers/char/tpm/tpm_tis_core.c
+++ b/drivers/char/tpm/tpm_tis_core.c
@@ -445,7 +445,7 @@ static int probe_itpm(struct tpm_chip *chip)
 {
 	struct tpm_tis_data *priv = dev_get_drvdata(&chip->dev);
 	int rc = 0;
-	static const u8 cmd_getticks[] = {
+	static u8 cmd_getticks[] = {
 		0x00, 0xc1, 0x00, 0x00, 0x00, 0x0a,
 		0x00, 0x00, 0x00, 0xf1
 	};
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* NACK: [PATCH] tpm_tis: unconstify array cmd_getticks
  2017-09-07  8:42 [PATCH] tpm_tis: unconstify array cmd_getticks Colin King
@ 2017-09-07 14:02 ` Colin Ian King
  2017-09-07 16:21   ` Jarkko Sakkinen
  0 siblings, 1 reply; 3+ messages in thread
From: Colin Ian King @ 2017-09-07 14:02 UTC (permalink / raw)
  To: Peter Huewe, Marcel Selhorst, Jarkko Sakkinen, Jason Gunthorpe,
	tpmdd-devel
  Cc: kernel-janitors, linux-kernel

On 07/09/17 09:42, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Remove const from cmd_getticks, fixes build warnings:
> 
> drivers/char/tpm/tpm_tis_core.c:469:31: warning: passing argument 2 of
> 'tpm_tis_send_data' discards 'const' qualifier from pointer target
> type [-Wdiscarded-qualifiers]
>   rc = tpm_tis_send_data(chip, cmd_getticks, len);
>                                ^
> drivers/char/tpm/tpm_tis_core.c:477:31: warning: passing argument 2 of
> 'tpm_tis_send_data' discards 'const' qualifier from pointer target
> type [-Wdiscarded-qualifiers]
>   rc = tpm_tis_send_data(chip, cmd_getticks, len);
>                                ^
> Fixes: 5e35bd8e06b9 ("tpm_tis: make array cmd_getticks static const to shink object code size")
> Signed-off-by: Colin Ian King <colin.king@canonical.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 1e957e923d21..91cf38be314f 100644
> --- a/drivers/char/tpm/tpm_tis_core.c
> +++ b/drivers/char/tpm/tpm_tis_core.c
> @@ -445,7 +445,7 @@ static int probe_itpm(struct tpm_chip *chip)
>  {
>  	struct tpm_tis_data *priv = dev_get_drvdata(&chip->dev);
>  	int rc = 0;
> -	static const u8 cmd_getticks[] = {
> +	static u8 cmd_getticks[] = {
>  		0x00, 0xc1, 0x00, 0x00, 0x00, 0x0a,
>  		0x00, 0x00, 0x00, 0xf1
>  	};
> 
Ignore this, seems like Arnd Bergmann has fixed this properly.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: NACK: [PATCH] tpm_tis: unconstify array cmd_getticks
  2017-09-07 14:02 ` NACK: " Colin Ian King
@ 2017-09-07 16:21   ` Jarkko Sakkinen
  0 siblings, 0 replies; 3+ messages in thread
From: Jarkko Sakkinen @ 2017-09-07 16:21 UTC (permalink / raw)
  To: Colin Ian King
  Cc: Peter Huewe, Marcel Selhorst, Jason Gunthorpe, tpmdd-devel,
	kernel-janitors, linux-kernel

On Thu, Sep 07, 2017 at 03:02:32PM +0100, Colin Ian King wrote:
> On 07/09/17 09:42, Colin King wrote:
> > From: Colin Ian King <colin.king@canonical.com>
> > 
> > Remove const from cmd_getticks, fixes build warnings:
> > 
> > drivers/char/tpm/tpm_tis_core.c:469:31: warning: passing argument 2 of
> > 'tpm_tis_send_data' discards 'const' qualifier from pointer target
> > type [-Wdiscarded-qualifiers]
> >   rc = tpm_tis_send_data(chip, cmd_getticks, len);
> >                                ^
> > drivers/char/tpm/tpm_tis_core.c:477:31: warning: passing argument 2 of
> > 'tpm_tis_send_data' discards 'const' qualifier from pointer target
> > type [-Wdiscarded-qualifiers]
> >   rc = tpm_tis_send_data(chip, cmd_getticks, len);
> >                                ^
> > Fixes: 5e35bd8e06b9 ("tpm_tis: make array cmd_getticks static const to shink object code size")
> > Signed-off-by: Colin Ian King <colin.king@canonical.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 1e957e923d21..91cf38be314f 100644
> > --- a/drivers/char/tpm/tpm_tis_core.c
> > +++ b/drivers/char/tpm/tpm_tis_core.c
> > @@ -445,7 +445,7 @@ static int probe_itpm(struct tpm_chip *chip)
> >  {
> >  	struct tpm_tis_data *priv = dev_get_drvdata(&chip->dev);
> >  	int rc = 0;
> > -	static const u8 cmd_getticks[] = {
> > +	static u8 cmd_getticks[] = {
> >  		0x00, 0xc1, 0x00, 0x00, 0x00, 0x0a,
> >  		0x00, 0x00, 0x00, 0xf1
> >  	};
> > 
> Ignore this, seems like Arnd Bergmann has fixed this properly.

Got you! Thanks.

/Jarkko

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-09-07 16:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-07  8:42 [PATCH] tpm_tis: unconstify array cmd_getticks Colin King
2017-09-07 14:02 ` NACK: " Colin Ian King
2017-09-07 16:21   ` Jarkko Sakkinen

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).