From patchwork Wed May 6 00:51:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hon Ching (Vicky) Lo" X-Patchwork-Id: 6344901 Return-Path: X-Original-To: patchwork-tpmdd-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6081A9F373 for ; Wed, 6 May 2015 00:53:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8B54B20221 for ; Wed, 6 May 2015 00:53:13 +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 95BBF20220 for ; Wed, 6 May 2015 00:53:12 +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 1YpnaK-00055M-1Q; Wed, 06 May 2015 00:53:12 +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 1YpnaJ-000557-65 for tpmdd-devel@lists.sourceforge.net; Wed, 06 May 2015 00:53:11 +0000 X-ACL-Warn: Received: from e23smtp02.au.ibm.com ([202.81.31.144]) by sog-mx-3.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) id 1YpnaH-0006MA-UY for tpmdd-devel@lists.sourceforge.net; Wed, 06 May 2015 00:53:11 +0000 Received: from /spool/local by e23smtp02.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 6 May 2015 10:53:02 +1000 Received: from d23dlp01.au.ibm.com (202.81.31.203) by e23smtp02.au.ibm.com (202.81.31.208) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 6 May 2015 10:53:00 +1000 Received: from d23relay09.au.ibm.com (d23relay09.au.ibm.com [9.185.63.181]) by d23dlp01.au.ibm.com (Postfix) with ESMTP id 7B2DD2CE8050 for ; Wed, 6 May 2015 10:53:00 +1000 (EST) Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.234.97]) by d23relay09.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t460qqVx41418806 for ; Wed, 6 May 2015 10:53:00 +1000 Received: from d23av03.au.ibm.com (localhost [127.0.0.1]) by d23av03.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t460qRY4018243 for ; Wed, 6 May 2015 10:52:28 +1000 Received: from vtpm2014.ibm.com (sig-9-76-129-116.ibm.com [9.76.129.116]) by d23av03.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id t460qJaj017392; Wed, 6 May 2015 10:52:25 +1000 From: "Hon Ching(Vicky) Lo" To: tpmdd-devel@lists.sourceforge.net Date: Tue, 5 May 2015 20:51:25 -0400 Message-Id: <1430873486-25868-3-git-send-email-honclo@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1430873486-25868-1-git-send-email-honclo@linux.vnet.ibm.com> References: <1430873486-25868-1-git-send-email-honclo@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15050600-0005-0000-0000-000001BEA449 X-Spam-Score: -0.0 (/) X-Headers-End: 1YpnaH-0006MA-UY Cc: Joy Latten , Ashley Lai , linux-kernel@vger.kernel.org, "Hon Ching\(Vicky\) Lo" , Peter Huewe Subject: [tpmdd-devel] [PATCH 2/3] TPM: remove unnecessary little endian conversion 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, T_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 prom_instantiate_sml() already converted the base pointer to little endian. This patch removes this unnecessary additional conversion. Signed-off-by: Hon Ching(Vicky) Lo Signed-off-by: Joy Latten --- drivers/char/tpm/tpm_of.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/char/tpm/tpm_of.c b/drivers/char/tpm/tpm_of.c index c002d1b..62a22ce 100644 --- a/drivers/char/tpm/tpm_of.c +++ b/drivers/char/tpm/tpm_of.c @@ -24,7 +24,7 @@ int read_log(struct tpm_bios_log *log) { struct device_node *np; const u32 *sizep; - const __be64 *basep; + const u64 *basep; if (log->bios_event_log != NULL) { pr_err("%s: ERROR - Eventlog already initialized\n", __func__); @@ -63,7 +63,7 @@ int read_log(struct tpm_bios_log *log) log->bios_event_log_end = log->bios_event_log + *sizep; - memcpy(log->bios_event_log, __va(be64_to_cpup(basep)), *sizep); + memcpy(log->bios_event_log, __va(*basep), *sizep); return 0;