Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966576AbcCPIUn (ORCPT ); Wed, 16 Mar 2016 04:20:43 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:56269 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966227AbcCPIUh (ORCPT ); Wed, 16 Mar 2016 04:20:37 -0400 From: Arnd Bergmann To: Jarkko Sakkinen Cc: Arnd Bergmann , Peter Huewe , Marcel Selhorst , Jason Gunthorpe , "Hon Ching \(Vicky\) Lo" , tpmdd-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: [PATCH] tpm: fix tpm_bios_log_setup stub prototype Date: Wed, 16 Mar 2016 09:19:48 +0100 Message-Id: <1458116410-3208536-1-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 X-Provags-ID: V03:K0:8XRLsDJ3Kf+u46ahi27Jv31A2Ysf+BzfSZTHGGxEvUbYYOdlHmd HKb+Fn1QNpOkrFixfMT7N1S7CkyCnoZOLMOj7hgeMAT0zqQ6iu9ywce/XXQyad8KEd7kR8Y XRmOPe+82pgPVJ1vLKMqVdW8/oFJeJCy2zJ/hNS/1SnvhCUjWmAkXnhcETsj7JN+SmZU3cU 1EZJi6BTaEFMlROlGhMVQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:dbN3E4U1pG4=:dIcB0bIo2op1ipFuHDZKNL fOsQ7DlhjtcoRLfQmOHmajwIG07IX2GYADGdZpeOAxdiZNdp5uIGLs22Nad9TRieAVVX2W8LV Kb46PurNC8R3PEUa+v4jAueiGU3bD1XcLm0Y7lauW1D+YdHfGchv3xvP6+HNYGK4zpKQmEMdZ J7OxyMtbelwLX+amQZET2cXNVJudkpqtkDX53ej/RITXuDDjTWjc5Re1ZPpgWKNsEjGcOAT0J imUZe/g/JnrnS1cnA7EUjHGYEtHQPoohSCKfW/yd7myKmSNVgnjKjjhgXq5M64y268FPOWqnL bbN/KEKd4vtIVFr41+8Hp0ZBq4xZ2vfC522fpfdPR230UPxTLZMlB80bBi9KgYOMw/2eJ+M4V Chg6iKEeyg2KAjqCyKwqycaTOvkYaaxPfEmB/m3TqPwv7rEvwhdcwdo0Slw4fj1w2vbXywvJB js5HSZlYm5iq4q1KQ6RP/NhzLmRAiMsYC3PwlgsHG5aLTNvQJ1WQ6sPLhMhEkTsWA5EbG4Jd1 qSFs3QBYCqUURnAzZxZTK27oOLEVvpYhPukgpL5zpaUnmaPoDyCLwiIJy8S0C3puBKYP6albN 8UEGdLnVm+Jg915L2J+GICiF9IFlzaeMG3545DD671MKAtAEYblzWjtL3ihacmf++p3o85spV ZMqH3rnIuFXYnDa8vaV3MY/howHlGI0XPxESflVISlWvSm8mvz46fiRMhXMOlccDegp8= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1505 Lines: 35 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 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