Re: [PATCH 3/3] tpm: Get rid of devname

From: Jason Gunthorpe
Date: Fri Feb 12 2016 - 20:13:31 EST


On Sat, Feb 13, 2016 at 09:01:06AM +0800, kbuild test robot wrote:

> url: https://github.com/0day-ci/linux/commits/Jason-Gunthorpe/tpm-Hold-the-kref-during-tpm_chip_find_get/20160213-080824
> config: xtensa-allyesconfig (attached as .config)
> reproduce:
> wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # save the attached .config to linux build tree
> make.cross ARCH=xtensa
>
> All warnings (new ones prefixed by >>):
>
> drivers/char/tpm/tpm-chip.c: In function 'tpm1_chip_register':
> >> drivers/char/tpm/tpm-chip.c:193:19: warning: passing argument 1 of 'tpm_bios_log_setup' discards 'const' qualifier from pointer target type
> 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)

Got it, thanks, didn't notice that kconfig variation.

Jason