From patchwork Sun Mar 20 19:34:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Ricard X-Patchwork-Id: 599888 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 ozlabs.org (Postfix) with ESMTPS id 3qSq17386sz9s5Q for ; Mon, 21 Mar 2016 06:35:07 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=sfs-ml-3.v29.ch3.sourceforge.com) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1ahj7u-0003Gg-RC; Sun, 20 Mar 2016 19:35:02 +0000 Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1ahj7u-0003GU-0h for tpmdd-devel@lists.sourceforge.net; Sun, 20 Mar 2016 19:35:02 +0000 Received-SPF: pass (sog-mx-2.v43.ch3.sourceforge.com: domain of gmail.com designates 74.125.82.42 as permitted sender) client-ip=74.125.82.42; envelope-from=christophe.ricard@gmail.com; helo=mail-wm0-f42.google.com; Received: from mail-wm0-f42.google.com ([74.125.82.42]) by sog-mx-2.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1ahj7t-0007Km-8y for tpmdd-devel@lists.sourceforge.net; Sun, 20 Mar 2016 19:35:01 +0000 Received: by mail-wm0-f42.google.com with SMTP id r129so27215644wmr.1 for ; Sun, 20 Mar 2016 12:35:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=QaJP5zvQBQRZsqJYiYJrlUhX6v0Ss31/9C5ah1o5Ivo=; b=FJNzzykfn9et3nrJNWjwuVeXQDHlrGioav04ovB0p6wPNoGMSkbVnyH8pyJpdqpYCP FgfQqzqk/1xWL3dZv+oH6A3okxmEC1latUMTXekDfDRMj4MbUAr65dcJvzA/h4Q5j4/d kKjoi5s040Y+mQZngs8vHkJzcq2K3H0MK0AsgheiSf9FJwBv4g4dr+1fMz8/0r+yGwN2 syqF1knLmRzyv/tW4em9S9RIzAV/8nV/YW+BlhPXWkKBxCGp4ddxpj1p6MWCJS+quCAh GE2hnxOGuHo966XlmzE2za80lvbxOBGS9pMacqBnfjXZc2VqOlqYjRLE1wwDGxoffA/F LXqQ== X-Gm-Message-State: AD7BkJIul0FPOfi0ogR/TH0N8k7U0LSVEyp8ty0cHeCh0OBuyNNrZ5WOhHNhVsObsgscow== X-Received: by 10.194.192.36 with SMTP id hd4mr25068795wjc.85.1458502495324; Sun, 20 Mar 2016 12:34:55 -0700 (PDT) Received: from localhost.localdomain (AMarseille-654-1-498-218.w86-210.abo.wanadoo.fr. [86.210.138.218]) by smtp.gmail.com with ESMTPSA id w203sm7560646wmg.14.2016.03.20.12.34.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 20 Mar 2016 12:34:54 -0700 (PDT) From: Christophe Ricard X-Google-Original-From: Christophe Ricard To: jarkko.sakkinen@linux.intel.com Date: Sun, 20 Mar 2016 20:34:35 +0100 Message-Id: <1458502483-16887-5-git-send-email-christophe-h.ricard@st.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1458502483-16887-1-git-send-email-christophe-h.ricard@st.com> References: <1458502483-16887-1-git-send-email-christophe-h.ricard@st.com> X-Spam-Score: -1.6 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (christophe.ricard[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Headers-End: 1ahj7t-0007Km-8y Cc: jean-luc.blanc@st.com, ashley@ashleylai.com, tpmdd-devel@lists.sourceforge.net, christophe-h.ricard@st.com, benoit.houyere@st.com Subject: [tpmdd-devel] [PATCH 04/12] tpm/st33zp24: Remove unneeded tpm_reg in get_burstcount 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 We can get rid of tpm_reg variable in get_burstcount. Signed-off-by: Christophe Ricard --- drivers/char/tpm/st33zp24/st33zp24.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/char/tpm/st33zp24/st33zp24.c b/drivers/char/tpm/st33zp24/st33zp24.c index 944d279..9e91ca7 100644 --- a/drivers/char/tpm/st33zp24/st33zp24.c +++ b/drivers/char/tpm/st33zp24/st33zp24.c @@ -208,21 +208,21 @@ static int get_burstcount(struct tpm_chip *chip) { unsigned long stop; int burstcnt, status; - u8 tpm_reg, temp; + u8 temp; struct st33zp24_dev *tpm_dev; tpm_dev = (struct st33zp24_dev *)TPM_VPRIV(chip); stop = jiffies + chip->vendor.timeout_d; do { - tpm_reg = TPM_STS + 1; - status = tpm_dev->ops->recv(tpm_dev->phy_id, tpm_reg, &temp, 1); + status = tpm_dev->ops->recv(tpm_dev->phy_id, TPM_STS + 1, + &temp, 1); if (status < 0) return -EBUSY; - tpm_reg = TPM_STS + 2; burstcnt = temp; - status = tpm_dev->ops->recv(tpm_dev->phy_id, tpm_reg, &temp, 1); + status = tpm_dev->ops->recv(tpm_dev->phy_id, TPM_STS + 2, + &temp, 1); if (status < 0) return -EBUSY;