From patchwork Wed Jun 19 03:52:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 252470 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 BB4742C034B for ; Wed, 19 Jun 2013 13:54:20 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 684ED4A01B; Wed, 19 Jun 2013 05:54:17 +0200 (CEST) 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 jXGyHJ-ALdAM; Wed, 19 Jun 2013 05:54:17 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E651D4A023; Wed, 19 Jun 2013 05:53:26 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 636414A01B for ; Wed, 19 Jun 2013 05:53:24 +0200 (CEST) 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 jzfbO5DQV0OM for ; Wed, 19 Jun 2013 05:53:19 +0200 (CEST) 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-yh0-f73.google.com (mail-yh0-f73.google.com [209.85.213.73]) by theia.denx.de (Postfix) with ESMTPS id 3C4FD4A023 for ; Wed, 19 Jun 2013 05:53:05 +0200 (CEST) Received: by mail-yh0-f73.google.com with SMTP id l109so550694yhq.2 for ; Tue, 18 Jun 2013 20:53:03 -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:in-reply-to:references :x-gm-message-state; bh=Qnu9JRK8JCAZ11Jn4s/wv/i0QNh/qSE+YNyp6Bpg4ps=; b=FxGiT34Cf4DhvEsPiVTRH1CoZ8Gye7RUGgOQzH6NqKg8uEVQYkFYMNb1+AuD0yBd9w e9bDqBFktTQ/ioL2r+ZkCJ+5jxN7wyp47iGBKnUOz2dBFxyzSXhY1B/IgLDCfhDkO7uI E7NW93J4SBuVeVODvkiMVr0D53JQHQdV51XIapU4GODPXKOsVZV3kdLY2/o1e78oxAlW /DcCXhwb1JIwsxHyFrprbBoED0jKUkcdGIL2iJr+m2d/nQvTxiEHloPkBQqYQNpj1MDV KLOMy4AVFa2Le8w4ZOINItmHtcUIQcTkRa/l1MoQcXx4DWdqBWrDDSXjBrmtoWShe7s+ yBGg== X-Received: by 10.236.38.106 with SMTP id z70mr540047yha.29.1371613982918; Tue, 18 Jun 2013 20:53:02 -0700 (PDT) Received: from corp2gmr1-2.hot.corp.google.com (corp2gmr1-2.hot.corp.google.com [172.24.189.93]) by gmr-mx.google.com with ESMTPS id x42si1347848yha.7.2013.06.18.20.53.02 for (version=TLSv1.1 cipher=AES128-SHA bits=128/128); Tue, 18 Jun 2013 20:53:02 -0700 (PDT) Received: from kaka.mtv.corp.google.com (kaka.mtv.corp.google.com [172.22.83.1]) by corp2gmr1-2.hot.corp.google.com (Postfix) with ESMTP id BC8D65A41B0; Tue, 18 Jun 2013 20:53:02 -0700 (PDT) Received: by kaka.mtv.corp.google.com (Postfix, from userid 121222) id 7375516099F; Tue, 18 Jun 2013 20:53:02 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Tue, 18 Jun 2013 20:52:25 -0700 Message-Id: <1371613960-28678-2-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 1.8.3 In-Reply-To: <1371613960-28678-1-git-send-email-sjg@chromium.org> References: <1371613960-28678-1-git-send-email-sjg@chromium.org> X-Gm-Message-State: ALoCoQk5uD0yQ7CWS1rBUHLxXLcPjhdy0QnJFJsmsv7uRQj8V4Fis/tFqQh3iutv4PKJ/dyVE5dNdWBuEfLU9Wn1xRxrH/GxP8d+0sfZbIB5/AQ1AoyvPbgZ/Ki4vkvP3SF8M8bZzq1eYFhdw/DS6fZK9iJF0wu0QzYR1Qz/Z1EYEBYrCqBXIR5Xb1A14GSmfiYElMTTh9y4 Cc: Tom Rini , u-boot-review@google.com Subject: [U-Boot] [PATCH v3 01/16] sandbox: Make map_to_sysmem() use a constant pointer 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 Very often a constant pointer is passed to this function, so we should declare this, since map_to_sysmem() does not change the pointer. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None arch/sandbox/include/asm/io.h | 2 +- include/common.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/sandbox/include/asm/io.h b/arch/sandbox/include/asm/io.h index 0c022f1..321bc0d 100644 --- a/arch/sandbox/include/asm/io.h +++ b/arch/sandbox/include/asm/io.h @@ -54,6 +54,6 @@ static inline void unmap_sysmem(const void *vaddr) } /* Map from a pointer to our RAM buffer */ -phys_addr_t map_to_sysmem(void *ptr); +phys_addr_t map_to_sysmem(const void *ptr); #endif diff --git a/include/common.h b/include/common.h index 126891d..ad3a64b 100644 --- a/include/common.h +++ b/include/common.h @@ -926,7 +926,7 @@ static inline void unmap_sysmem(const void *vaddr) { } -static inline phys_addr_t map_to_sysmem(void *ptr) +static inline phys_addr_t map_to_sysmem(const void *ptr) { return (phys_addr_t)(uintptr_t)ptr; }