Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1727877 > unrolled thread

linux-next: build warning after merge of the tpmdd tree

Started byStephen Rothwell <sfr@canb.auug.org.au>
First post2017-09-07 04:40 +0200
Last post2017-09-07 18:30 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  linux-next: build warning after merge of the tpmdd tree Stephen Rothwell <sfr@canb.auug.org.au> - 2017-09-07 04:40 +0200
    Re: linux-next: build warning after merge of the tpmdd tree Colin Ian King <colin.king@canonical.com> - 2017-09-07 10:50 +0200
      Re: linux-next: build warning after merge of the tpmdd tree Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2017-09-07 18:30 +0200

#1727877 — linux-next: build warning after merge of the tpmdd tree

FromStephen Rothwell <sfr@canb.auug.org.au>
Date2017-09-07 04:40 +0200
Subjectlinux-next: build warning after merge of the tpmdd tree
Message-ID<umUTw-233-7@gated-at.bofh.it>
Hi Jarkko,

After merging the tpmdd tree, today's linux-next build (x86_64
allmodconfig) produced this warning:

drivers/char/tpm/tpm_tis_core.c: In function 'probe_itpm':
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:255:12: note: expected 'u8 * {aka unsigned char *}' but argument is of type 'const u8 * {aka const unsigned char *}'
 static int tpm_tis_send_data(struct tpm_chip *chip, u8 *buf, size_t 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);
                               ^
drivers/char/tpm/tpm_tis_core.c:255:12: note: expected 'u8 * {aka unsigned char *}' but argument is of type 'const u8 * {aka const unsigned char *}'
 static int tpm_tis_send_data(struct tpm_chip *chip, u8 *buf, size_t len)
            ^

Introduced by commit

  5e35bd8e06b9 ("tpm_tis: make array cmd_getticks static const to shink object code size")

-- 
Cheers,
Stephen Rothwell

[toc] | [next] | [standalone]


#1728042

FromColin Ian King <colin.king@canonical.com>
Date2017-09-07 10:50 +0200
Message-ID<un0FA-5YE-11@gated-at.bofh.it>
In reply to#1727877
Thanks for reporting that Stephen, I've sent a fix to address this issue.

Colin

On 07/09/17 03:31, Stephen Rothwell wrote:
> Hi Jarkko,
> 
> After merging the tpmdd tree, today's linux-next build (x86_64
> allmodconfig) produced this warning:
> 
> drivers/char/tpm/tpm_tis_core.c: In function 'probe_itpm':
> 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:255:12: note: expected 'u8 * {aka unsigned char *}' but argument is of type 'const u8 * {aka const unsigned char *}'
>  static int tpm_tis_send_data(struct tpm_chip *chip, u8 *buf, size_t 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);
>                                ^
> drivers/char/tpm/tpm_tis_core.c:255:12: note: expected 'u8 * {aka unsigned char *}' but argument is of type 'const u8 * {aka const unsigned char *}'
>  static int tpm_tis_send_data(struct tpm_chip *chip, u8 *buf, size_t len)
>             ^
> 
> Introduced by commit
> 
>   5e35bd8e06b9 ("tpm_tis: make array cmd_getticks static const to shink object code size")
> 

[toc] | [prev] | [next] | [standalone]


#1728295

FromJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Date2017-09-07 18:30 +0200
Message-ID<un7QK-2tV-9@gated-at.bofh.it>
In reply to#1728042
Colin, Stephen,

Thank you. I'll apply Colin's fix.

/Jarkko

On Thu, Sep 07, 2017 at 09:43:37AM +0100, Colin Ian King wrote:
> Thanks for reporting that Stephen, I've sent a fix to address this issue.
> 
> Colin
> 
> On 07/09/17 03:31, Stephen Rothwell wrote:
> > Hi Jarkko,
> > 
> > After merging the tpmdd tree, today's linux-next build (x86_64
> > allmodconfig) produced this warning:
> > 
> > drivers/char/tpm/tpm_tis_core.c: In function 'probe_itpm':
> > 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:255:12: note: expected 'u8 * {aka unsigned char *}' but argument is of type 'const u8 * {aka const unsigned char *}'
> >  static int tpm_tis_send_data(struct tpm_chip *chip, u8 *buf, size_t 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);
> >                                ^
> > drivers/char/tpm/tpm_tis_core.c:255:12: note: expected 'u8 * {aka unsigned char *}' but argument is of type 'const u8 * {aka const unsigned char *}'
> >  static int tpm_tis_send_data(struct tpm_chip *chip, u8 *buf, size_t len)
> >             ^
> > 
> > Introduced by commit
> > 
> >   5e35bd8e06b9 ("tpm_tis: make array cmd_getticks static const to shink object code size")
> > 
> 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web