Commit 796d8030 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Jarkko Sakkinen

tpm: fix tpm_bios_log_setup stub prototype

A cleanup patch changed the prototype of the regular tpm_bios_log_setup
function, but not that of the stub that is used when the TPM is disabled,
causing a harmless build warning:

drivers/char/tpm/tpm-chip.c: In function 'tpm1_chip_register':
drivers/char/tpm/tpm-chip.c:287:38: error: passing argument 1 of 'tpm_bios_log_setup' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
  chip->bios_dir = tpm_bios_log_setup(dev_name(&chip->dev));
In file included from ../drivers/char/tpm/tpm-chip.c:30:0:
../drivers/char/tpm/tpm_eventlog.h:83:31: note: expected 'char *' but argument is of type 'const char *'
 static inline struct dentry **tpm_bios_log_setup(char *name)

This changes the stub function to match the normal prototype,
avoiding that warning.
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Fixes: aca8db8088c3 ("tpm: Get rid of devname")
Signed-off-by: default avatarJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
parent 15516788
...@@ -80,7 +80,7 @@ int read_log(struct tpm_bios_log *log); ...@@ -80,7 +80,7 @@ int read_log(struct tpm_bios_log *log);
extern struct dentry **tpm_bios_log_setup(const char *); extern struct dentry **tpm_bios_log_setup(const char *);
extern void tpm_bios_log_teardown(struct dentry **); extern void tpm_bios_log_teardown(struct dentry **);
#else #else
static inline struct dentry **tpm_bios_log_setup(char *name) static inline struct dentry **tpm_bios_log_setup(const char *name)
{ {
return NULL; return NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment