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: 98418 Delivered-To: patch@linaro.org Received: by 10.140.109.52 with SMTP id k49csp1760117qgf; Tue, 2 May 2017 01:16:07 -0700 (PDT) X-Received: by 10.98.158.16 with SMTP id s16mr31552931pfd.159.1493712967034; Tue, 02 May 2017 01:16:07 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k6si17342481pgc.159.2017.05.02.01.16.06; Tue, 02 May 2017 01:16:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752106AbdEBIQE (ORCPT + 25 others); Tue, 2 May 2017 04:16:04 -0400 Received: from mail-pf0-f174.google.com ([209.85.192.174]:34930 "EHLO mail-pf0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751416AbdEBIP7 (ORCPT ); Tue, 2 May 2017 04:15:59 -0400 Received: by mail-pf0-f174.google.com with SMTP id v14so85698262pfd.2 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=W5ZGS4Im/6Ib07wcq+Zt5O41JFUu82dB5mXtu1tH1enrA2R9i+YIbjhiL7QfGJ/Pg9 6FQDHgeDcploBhj7Lw5Q8ERVPr9bLLdm0wvGxp+Uu4NX/njCWrvr5I0UdNaHuii4tbXE g806Ov2aagoTknKi1gu4UU+I711Ede9AOBtHe2Iujaj7XDgBizexKt10tbtHYel3PMEc EUFLW0lg2T7HfkM6mdh35vIjYvkvv839yFkaVmMU97EpCngJLTrj3foKLpuaId4ZC2In A3v9K96sFmmuF38k3v3FXWwcch6zv3dfE83/MsIWdO3YM6H3wRl2/k8RyLiqts20u1kN Hgsw== X-Gm-Message-State: AN3rC/7hHMArPqjIqypb5Dxp6G5xC7LOEhLVG1QtmxQvDHRh4FRZ1guF Quv+FWbkD/P/wbvSuMQIMA== 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.7.4 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