From patchwork Fri Nov 2 16:44:25 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 196594 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 0E1C12C00D7 for ; Sat, 3 Nov 2012 03:44:39 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B42CA4A11D; Fri, 2 Nov 2012 17:44:37 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CpbGrPrhlCKd; Fri, 2 Nov 2012 17:44:37 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1A47B4A101; Fri, 2 Nov 2012 17:44:36 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id ED4904A101 for ; Fri, 2 Nov 2012 17:44:34 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id o5rFIE3rWfGE for ; Fri, 2 Nov 2012 17:44:34 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-gg0-f202.google.com (mail-gg0-f202.google.com [209.85.161.202]) by theia.denx.de (Postfix) with ESMTPS id 081CB4A0FF for ; Fri, 2 Nov 2012 17:44:32 +0100 (CET) Received: by mail-gg0-f202.google.com with SMTP id i4so437158ggm.3 for ; Fri, 02 Nov 2012 09:44:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:x-gm-message-state; bh=O9MtWzGSJmmr0TJtEH55v/R4BQO2veLJS4IevXUIuuA=; b=IheaFVBC7FpU35TBkmnChDJntrXzy3RHT+tRYQVSkxn2tPLv5kgrD6KhnGlvM8EiIT kfHGNk59b6MYvymJMwUgEnFOx2mAQJlEWBe8sdls7S7rjnP7Lm82CZ/mEGB16wmij20p 6tkvd0uBF9F93vD9eseAUCBrGa9fsCgKX7/iYg8bKphNgcseVsh9jTrlYclNe9wOl3n+ t5WjIbAc+F5kVjOmXmNbGOVHJ3Ks/u6WZ0iES+Q5w9BxW/QB4PQxj+RUiTohMR5q54Er 41eCd8wxhHGngG+H2kGy8001a/nm2chRJRZaw+bjYHDY0eIWq3liEmXW6xJoN1ICF4+7 2O/g== Received: by 10.236.82.9 with SMTP id n9mr1542182yhe.24.1351874671657; Fri, 02 Nov 2012 09:44:31 -0700 (PDT) Received: from wpzn3.hot.corp.google.com (216-239-44-65.google.com [216.239.44.65]) by gmr-mx.google.com with ESMTPS id i7si640918yhj.6.2012.11.02.09.44.31 (version=TLSv1/SSLv3 cipher=AES128-SHA); Fri, 02 Nov 2012 09:44:31 -0700 (PDT) Received: from kaka.mtv.corp.google.com (kaka.mtv.corp.google.com [172.22.73.79]) by wpzn3.hot.corp.google.com (Postfix) with ESMTP id 7B2F0100047; Fri, 2 Nov 2012 09:44:31 -0700 (PDT) Received: by kaka.mtv.corp.google.com (Postfix, from userid 121222) id 2248A160CAE; Fri, 2 Nov 2012 09:44:31 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Fri, 2 Nov 2012 09:44:25 -0700 Message-Id: <1351874667-23959-1-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 1.7.7.3 X-Gm-Message-State: ALoCoQkApZnxjhPtAcQJ+MmshuYPdS1jBXkKinUd/j7eC8C4sQldLn3rBy3exyI5JveEOKG7glqN2u2DHzcbeqxIDKzG4oGx+Km1lbp0KcZVi5LWNIqSnrAyRIn3q9RKdlsvC5e0X6g+HwmFoK++aYKMfteivUoZlqOx2YbjIlkzm0mkWISblUGMUYqmxkkO8veA/boMg79Z Cc: Tom Rini , Vadim Bendebury , Taylor Hutt Subject: [U-Boot] [PATCH 1/3] tpm: Add casts for proper compilation X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de From: Taylor Hutt When building for the Sandbox version, the casts in this change are necessary to avoid compilation issues. Signed-off-by: Taylor Hutt Signed-off-by: Simon Glass --- drivers/tpm/generic_lpc_tpm.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/tpm/generic_lpc_tpm.c b/drivers/tpm/generic_lpc_tpm.c index 6c494eb..04ad418 100644 --- a/drivers/tpm/generic_lpc_tpm.c +++ b/drivers/tpm/generic_lpc_tpm.c @@ -135,7 +135,7 @@ static u8 tpm_read_byte(const u8 *ptr) { u8 ret = readb(ptr); debug(PREFIX "Read reg 0x%4.4x returns 0x%2.2x\n", - (u32)ptr - (u32)lpc_tpm_dev, ret); + (u32)(uintptr_t)ptr - (u32)(uintptr_t)lpc_tpm_dev, ret); return ret; } @@ -143,21 +143,21 @@ static u32 tpm_read_word(const u32 *ptr) { u32 ret = readl(ptr); debug(PREFIX "Read reg 0x%4.4x returns 0x%8.8x\n", - (u32)ptr - (u32)lpc_tpm_dev, ret); + (u32)(uintptr_t)ptr - (u32)(uintptr_t)lpc_tpm_dev, ret); return ret; } static void tpm_write_byte(u8 value, u8 *ptr) { debug(PREFIX "Write reg 0x%4.4x with 0x%2.2x\n", - (u32)ptr - (u32)lpc_tpm_dev, value); + (u32)(uintptr_t)ptr - (u32)(uintptr_t)lpc_tpm_dev, value); writeb(value, ptr); } static void tpm_write_word(u32 value, u32 *ptr) { debug(PREFIX "Write reg 0x%4.4x with 0x%8.8x\n", - (u32)ptr - (u32)lpc_tpm_dev, value); + (u32)(uintptr_t)ptr - (u32)(uintptr_t)lpc_tpm_dev, value); writel(value, ptr); } @@ -491,5 +491,5 @@ int tis_sendrecv(const u8 *sendbuf, size_t send_size, return TPM_DRIVER_ERR; } - return tis_readresponse(recvbuf, recv_len); + return tis_readresponse(recvbuf, (u32 *)recv_len); }