* [PATCH] tpm: fix tpm_bios_log_setup stub prototype
@ 2016-03-16 8:19 Arnd Bergmann
[not found] ` <1458116410-3208536-1-git-send-email-arnd-r2nGTMty4D4@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2016-03-16 8:19 UTC (permalink / raw)
To: Jarkko Sakkinen
Cc: Arnd Bergmann, Peter Huewe, Marcel Selhorst, Jason Gunthorpe,
Hon Ching (Vicky) Lo, tpmdd-devel, linux-kernel
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: Arnd Bergmann <arnd@arndb.de>
Fixes: aca8db8088c3 ("tpm: Get rid of devname")
---
drivers/char/tpm/tpm_eventlog.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/char/tpm/tpm_eventlog.h b/drivers/char/tpm/tpm_eventlog.h
index cc9672f64e8f..8de62b09be51 100644
--- a/drivers/char/tpm/tpm_eventlog.h
+++ b/drivers/char/tpm/tpm_eventlog.h
@@ -80,7 +80,7 @@ int read_log(struct tpm_bios_log *log);
extern struct dentry **tpm_bios_log_setup(const char *);
extern void tpm_bios_log_teardown(struct dentry **);
#else
-static inline struct dentry **tpm_bios_log_setup(char *name)
+static inline struct dentry **tpm_bios_log_setup(const char *name)
{
return NULL;
}
--
2.7.0
^ permalink raw reply related [flat|nested] 4+ messages in thread[parent not found: <1458116410-3208536-1-git-send-email-arnd-r2nGTMty4D4@public.gmane.org>]
* Re: [PATCH] tpm: fix tpm_bios_log_setup stub prototype [not found] ` <1458116410-3208536-1-git-send-email-arnd-r2nGTMty4D4@public.gmane.org> @ 2016-03-16 10:13 ` Jarkko Sakkinen [not found] ` <20160316101341.GA4051-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: Jarkko Sakkinen @ 2016-03-16 10:13 UTC (permalink / raw) To: Arnd Bergmann Cc: Hon Ching (Vicky) Lo, linux-kernel-u79uwXL29TY76Z2rM5mHXA, tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f On Wed, Mar 16, 2016 at 09:19:48AM +0100, Arnd Bergmann wrote: > 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. Good catch. Thank you. > Signed-off-by: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org> > Fixes: aca8db8088c3 ("tpm: Get rid of devname") > --- > drivers/char/tpm/tpm_eventlog.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/char/tpm/tpm_eventlog.h b/drivers/char/tpm/tpm_eventlog.h > index cc9672f64e8f..8de62b09be51 100644 > --- a/drivers/char/tpm/tpm_eventlog.h > +++ b/drivers/char/tpm/tpm_eventlog.h > @@ -80,7 +80,7 @@ int read_log(struct tpm_bios_log *log); > extern struct dentry **tpm_bios_log_setup(const char *); > extern void tpm_bios_log_teardown(struct dentry **); > #else > -static inline struct dentry **tpm_bios_log_setup(char *name) > +static inline struct dentry **tpm_bios_log_setup(const char *name) > { > return NULL; > } > -- > 2.7.0 /Jarkko ------------------------------------------------------------------------------ Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140 ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <20160316101341.GA4051-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH] tpm: fix tpm_bios_log_setup stub prototype [not found] ` <20160316101341.GA4051-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> @ 2016-03-16 17:57 ` Jason Gunthorpe [not found] ` <20160316175726.GB6127-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: Jason Gunthorpe @ 2016-03-16 17:57 UTC (permalink / raw) To: Jarkko Sakkinen, Stefan Berger Cc: Arnd Bergmann, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Hon Ching (Vicky) Lo, tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f On Wed, Mar 16, 2016 at 12:13:41PM +0200, Jarkko Sakkinen wrote: > On Wed, Mar 16, 2016 at 09:19:48AM +0100, Arnd Bergmann wrote: > > 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. > > Good catch. Thank you. The weird thing is I already applied this hunk to the patch, an autobuilder found it, it is right in my personal tree.. Unclear where it got dropped? Are we missing anything else in that series? Stephen? Jason ------------------------------------------------------------------------------ Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140 ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <20160316175726.GB6127-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>]
* Re: [PATCH] tpm: fix tpm_bios_log_setup stub prototype [not found] ` <20160316175726.GB6127-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> @ 2016-03-16 19:18 ` Stefan Berger 0 siblings, 0 replies; 4+ messages in thread From: Stefan Berger @ 2016-03-16 19:18 UTC (permalink / raw) To: Jason Gunthorpe, Jarkko Sakkinen Cc: Arnd Bergmann, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Hon Ching (Vicky) Lo, tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f On 03/16/2016 01:57 PM, Jason Gunthorpe wrote: > On Wed, Mar 16, 2016 at 12:13:41PM +0200, Jarkko Sakkinen wrote: >> On Wed, Mar 16, 2016 at 09:19:48AM +0100, Arnd Bergmann wrote: >>> 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. >> Good catch. Thank you. > The weird thing is I already applied this hunk to the patch, an > autobuilder found it, it is right in my personal tree.. > > Unclear where it got dropped? Are we missing anything else in that > series? Stephen? If I lost it, I certainly did not drop it intentionately. Stefan ------------------------------------------------------------------------------ Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140 ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-03-16 19:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-16 8:19 [PATCH] tpm: fix tpm_bios_log_setup stub prototype Arnd Bergmann
[not found] ` <1458116410-3208536-1-git-send-email-arnd-r2nGTMty4D4@public.gmane.org>
2016-03-16 10:13 ` Jarkko Sakkinen
[not found] ` <20160316101341.GA4051-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-03-16 17:57 ` Jason Gunthorpe
[not found] ` <20160316175726.GB6127-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-03-16 19:18 ` Stefan Berger
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).