From patchwork Wed Sep 7 22:19:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Winkler, Tomas" X-Patchwork-Id: 9320133 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7F8B9607D3 for ; Wed, 7 Sep 2016 22:21:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5843F2942F for ; Wed, 7 Sep 2016 22:21:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4CE5929443; Wed, 7 Sep 2016 22:21:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 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.wl.linuxfoundation.org (Postfix) with ESMTPS id D23662942F for ; Wed, 7 Sep 2016 22:21:58 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=sfs-ml-2.v29.ch3.sourceforge.com) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1bhlED-0003VY-GS; Wed, 07 Sep 2016 22:21:57 +0000 Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1bhlEB-0003VS-SM for tpmdd-devel@lists.sourceforge.net; Wed, 07 Sep 2016 22:21:55 +0000 Received-SPF: fail (sog-mx-4.v43.ch3.sourceforge.com: domain of intel.com does not designate 134.134.136.31 as permitted sender) client-ip=134.134.136.31; envelope-from=tomas.winkler@intel.com; helo=mga06.intel.com; Received: from mga06.intel.com ([134.134.136.31]) by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) id 1bhlEA-0005jL-4B for tpmdd-devel@lists.sourceforge.net; Wed, 07 Sep 2016 22:21:55 +0000 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga104.jf.intel.com with ESMTP; 07 Sep 2016 15:21:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.30,297,1470726000"; d="scan'208"; a="1036768116" Received: from twinkler-lnx.jer.intel.com ([10.12.87.167]) by fmsmga001.fm.intel.com with ESMTP; 07 Sep 2016 15:21:45 -0700 From: Tomas Winkler To: tpmdd-devel@lists.sourceforge.net, =Jason Gunthorpe Date: Thu, 8 Sep 2016 01:19:46 +0300 Message-Id: <1473286786-7698-1-git-send-email-tomas.winkler@intel.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Headers-End: 1bhlEA-0005jL-4B Subject: [tpmdd-devel] [PATCH] tpm/tpm_tis: remove unsingd itpm varaible 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: , Errors-To: tpmdd-devel-bounces@lists.sourceforge.net X-Virus-Scanned: ClamAV using ClamSMTP Fixes the warning: drivers/char/tpm/tpm_tis_core.c:443:7: warning: variable ‘itpm’ set but not used [-Wunused-but-set-variable] bool itpm; ^~~~ Signed-off-by: Tomas Winkler --- drivers/char/tpm/tpm_tis_core.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c index 236015103164..cf6fd13cd1d1 100644 --- a/drivers/char/tpm/tpm_tis_core.c +++ b/drivers/char/tpm/tpm_tis_core.c @@ -440,7 +440,6 @@ static int probe_itpm(struct tpm_chip *chip) 0x00, 0x00, 0x00, 0xf1 }; size_t len = sizeof(cmd_getticks); - bool itpm; u16 vendor; rc = tpm_tis_read16(priv, TPM_DID_VID(0), &vendor); @@ -451,8 +450,6 @@ static int probe_itpm(struct tpm_chip *chip) if (vendor != TPM_VID_INTEL) return 0; - itpm = false; - rc = tpm_tis_send_data(chip, cmd_getticks, len); if (rc == 0) goto out; @@ -460,8 +457,6 @@ static int probe_itpm(struct tpm_chip *chip) tpm_tis_ready(chip); release_locality(chip, priv->locality, 0); - itpm = true; - rc = tpm_tis_send_data(chip, cmd_getticks, len); if (rc == 0) { dev_info(&chip->dev, "Detected an iTPM.\n");