From patchwork Wed Mar 16 08:19:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 8596321 Return-Path: X-Original-To: patchwork-tpmdd-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 00F40C0553 for ; Wed, 16 Mar 2016 08:34:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2EE5C201EF for ; Wed, 16 Mar 2016 08:34:08 +0000 (UTC) Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4481E201ED for ; Wed, 16 Mar 2016 08:34:06 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=sfs-ml-4.v29.ch3.sourceforge.com) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1ag6u4-0003Ii-FK; Wed, 16 Mar 2016 08:34:04 +0000 Received: from sog-mx-3.v43.ch3.sourceforge.com ([172.29.43.193] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1ag6u3-0003Ib-Cs for tpmdd-devel@lists.sourceforge.net; Wed, 16 Mar 2016 08:34:03 +0000 X-ACL-Warn: Received: from mout.kundenserver.de ([212.227.126.133]) by sog-mx-3.v43.ch3.sourceforge.com with esmtp (Exim 4.76) id 1ag6u2-0003GD-37 for tpmdd-devel@lists.sourceforge.net; Wed, 16 Mar 2016 08:34:03 +0000 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue005) with ESMTPA (Nemesis) id 0MBWuQ-1aYz8b0wkQ-00AVSN; Wed, 16 Mar 2016 09:20:15 +0100 From: Arnd Bergmann To: Jarkko Sakkinen 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:vd9wOiOiVis=:xG0tbhQvJgzXoZG4K2ynjS siKOjM04kGweZx2RrqyBuCNsv412TZ56PwQENL30ht9BcSqpeTR8pSsDX8htPJ2/ZpyStUZPd ZC2wv5jsXT5+AFAFazgs8z6w/3ghIx9Lpe/FpjezVPtnYKTqpKCltQKBe02kBZpcQXYf+sv9s RSIejRmG2JgH1pXOY+CKbZKCKO2T/FQdGODmMRgO7mWzFEuNhTeoQ8vBniNnvk5D9XoRlBXin YEchOhom6FBme1ZawW8IBlUsxd0OT9/srqUTeDfFH/iMFJgfUowkP5vR/5/nDkvApHPfVhTZz gtbCXK3YRziemE7o5bnP+Z5QaJJ+mN/g9tiWAtf09I52wR2m0Au4jSJ5B4yrl9uq/kxVtU+D0 WvGdBx8yE8GaUZZZpuS8Y4+vgK02tTVp2wFyjPcq8ym19v8Aj6NC4uUP9kdApIM85Csn2y52D 3RXb2uMMi436Y6x51W6vVer/wsW4eibZDNoxqIt4h9vPaIoq3QUhZ41G4XvRC61Dk6Hgwfi2o bJuANI2pFWP2/65RpPhvcRxcO7K9Xaqf8F9Pio6Ea8rqr+3WeW8X6ca3bAkoRd4osarhRjyvt IGdi+3LZWrG5theuq5xWOHNTX+zfXWZSkCf7QvVWlEbo1Yqp3fZe5+h2OjkZFGUYuUbV1x68T DQECQnGSMNutwGfNZRK73rPnTJf0xu2BOesydiwizaRdGUCgYj0KN1/4Pwtnu2AqCCK4= X-Spam-Score: 0.0 (/) X-Headers-End: 1ag6u2-0003GD-37 Cc: "Hon Ching \(Vicky\) Lo" , Arnd Bergmann , linux-kernel@vger.kernel.org, tpmdd-devel@lists.sourceforge.net Subject: [tpmdd-devel] [PATCH] tpm: fix tpm_bios_log_setup stub prototype X-BeenThere: tpmdd-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Tpm Device Driver maintainance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: tpmdd-devel-bounces@lists.sourceforge.net X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, HK_RANDOM_ENVFROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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; }