From patchwork Tue May 2 08:15:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 9707569 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 52C626021C for ; Tue, 2 May 2017 08:16:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4131C27F95 for ; Tue, 2 May 2017 08:16:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3556F28334; Tue, 2 May 2017 08:16:25 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CF63C27F95 for ; Tue, 2 May 2017 08:16:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date:Subject:To: From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=SWh+26z4FEo53vRnV23aRROzBAFziWirIwLASq22bAM=; b=my3JM8We1XEYD3 QsGazkn+WCKFNlKS4F0P+kHNrx/i2NWyfxhRs9Pee4ZOpxTxrLGTjY1v26i+womiAfDAJSLSeYkU+ IRZgB2chPtVcrtcw56606hWBXFyTKFfw+GyrXX0+QH7jeBbbUilKb29b6bfrggCzCHWpOXrBhcw0o 4HmBWLfRXpVbhMqfZMCbF7E5Dh4q9vOu2c18Q+WAiq4/EVb81lgDd46J4mN9/WIFzZkFod3/B0P5J bK3dEYy2ewa2noBon7hPnAZWFqUH/7CicCcCHggiWXc888U3W1IOs40tS8lC0J2APLLKVa9WLJZ+C 8poD+ZBdgg7qWRF/2W2g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1d5Syt-0007tV-Mc; Tue, 02 May 2017 08:16:23 +0000 Received: from mail-pg0-x234.google.com ([2607:f8b0:400e:c05::234]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1d5Syp-0007mr-Mb for linux-arm-kernel@lists.infradead.org; Tue, 02 May 2017 08:16:22 +0000 Received: by mail-pg0-x234.google.com with SMTP id y4so52057538pge.0 for ; Tue, 02 May 2017 01:15:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id; bh=5PC1arBfSo4Sy9nHlvwTCZ+eOJ9Ec5j8XO6lf3+uGTc=; b=ACcmVDaFjCzikiyqHAY9TDiQbqqkW+RTFiz2VoT93M4ZgQRc8sENn6p/gdRFb4EIpU TWY0w836WPKyAaKTfpTCZuOjYQNTQ4PyXUvyY0xGFoX9VpxXb8jwyEEj1DTzP7SZp7mB nFRvgMQdFVKIzo+bRi0BsYtriFWe85pvhPIeA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=5PC1arBfSo4Sy9nHlvwTCZ+eOJ9Ec5j8XO6lf3+uGTc=; b=tA4Ef/QiZ/IOyBe8UUq0N31s/e76VwsXUNVU8OzIvv3Y+xCGZBl1/XVWhqbfAwWVrO EOBqPc1yAK71INxoQSIVv5R/eDW+wq0L6fxBc8ZAN/bt2FL8L/1fSJcIacUU3ae77s0P Jk7hSaEVLXBu97QmWB0LYYDYIEh5CVwDJQxM+y5X/nm2E6Tu5Je+xVVAsVXMW81RpXGy GXj2AhPCm/dueOXWCc5cklbaILyxM0FBpNXC24QIZu9NDLhqt5yavCIZRow/F2ZJUUL3 Rjc3aHU0PortkWYs94xu9Vp4AaMbDZkRYCty80qRBdkUF+WE//Azv5B8gY2cNaWEjFMK knEw== X-Gm-Message-State: AN3rC/7o53fAPSWwKG0e1gZ6cc0c/7DPjdxSsb4HQH+n4nF0O2RkXoQw 3Ets+zXfCRwW3g9Y X-Received: by 10.98.194.199 with SMTP id w68mr30850763pfk.192.1493712958920; Tue, 02 May 2017 01:15:58 -0700 (PDT) Received: from localhost.localdomain (45-125-195-13.ip4.readyserver.sg. [45.125.195.13]) by smtp.gmail.com with ESMTPSA id s68sm6029212pgc.5.2017.05.02.01.15.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 02 May 2017 01:15:57 -0700 (PDT) From: Leo Yan To: Mathieu Poirier , Leo Yan , Suzuki K Poulose , Stephen Boyd , Greg Kroah-Hartman , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] coresight: use const for device_node structures Date: Tue, 2 May 2017 16:15:03 +0800 Message-Id: <1493712903-16726-1-git-send-email-leo.yan@linaro.org> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170502_011619_909973_FDE7B683 X-CRM114-Status: GOOD ( 12.11 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Almost low level functions from open firmware have used const to qualify device_node structures, so add const for device_node parameters in of_coresight related functions. Reviewed-by: Stephen Boyd Signed-off-by: Leo Yan --- drivers/hwtracing/coresight/of_coresight.c | 4 ++-- include/linux/coresight.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/hwtracing/coresight/of_coresight.c b/drivers/hwtracing/coresight/of_coresight.c index 629e031..859ad49 100644 --- a/drivers/hwtracing/coresight/of_coresight.c +++ b/drivers/hwtracing/coresight/of_coresight.c @@ -52,7 +52,7 @@ of_coresight_get_endpoint_device(struct device_node *endpoint) endpoint, of_dev_node_match); } -static void of_coresight_get_ports(struct device_node *node, +static void of_coresight_get_ports(const struct device_node *node, int *nr_inport, int *nr_outport) { struct device_node *ep = NULL; @@ -102,7 +102,7 @@ static int of_coresight_alloc_memory(struct device *dev, } struct coresight_platform_data *of_get_coresight_platform_data( - struct device *dev, struct device_node *node) + struct device *dev, const struct device_node *node) { int i = 0, ret = 0, cpu; struct coresight_platform_data *pdata; diff --git a/include/linux/coresight.h b/include/linux/coresight.h index 2a5982c..769f2c8 100644 --- a/include/linux/coresight.h +++ b/include/linux/coresight.h @@ -264,10 +264,10 @@ static inline int coresight_timeout(void __iomem *addr, u32 offset, #ifdef CONFIG_OF extern struct coresight_platform_data *of_get_coresight_platform_data( - struct device *dev, struct device_node *node); + struct device *dev, const struct device_node *node); #else static inline struct coresight_platform_data *of_get_coresight_platform_data( - struct device *dev, struct device_node *node) { return NULL; } + struct device *dev, const struct device_node *node) { return NULL; } #endif #ifdef CONFIG_PID_NS