linux-next: build warning after merge of the tpmdd tree
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")
Signature · 2 lines
Cheers, Stephen Rothwell
Thanks for reporting that Stephen, I've sent a fix to address this issue.
Colin
Quoted 23 lines · Stephen Rothwell
Hi Jarkko,
After merging the tpmdd tree, today's linux-next build (
x86_64allmodconfig) 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 arraycmd_getticksstatic const to shink object code size")
Colin, Stephen,
Thank you. I'll apply Colin's fix.
/Jarkko
Quoted 29 lines · Colin Ian King
Thanks for reporting that Stephen, I've sent a fix to address this issue.
Colin
Quoted 23 lines · Stephen Rothwell
Hi Jarkko,
After merging the tpmdd tree, today's linux-next build (
x86_64allmodconfig) 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 arraycmd_getticksstatic const to shink object code size")