Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1634229

[PATCH] coresight: use const for device_node structures

Path csiph.com!news.mixmin.net!weretis.net!feeder4.news.weretis.net!storethat.news.telefonica.de!telefonica.de!news.panservice.it!bofh.it!news.nic.it!robomod
From Leo Yan <leo.yan@linaro.org>
Newsgroups linux.kernel
Subject [PATCH] coresight: use const for device_node structures
Date Tue, 02 May 2017 10:20:02 +0200
Message-ID <tCBcm-421-31@gated-at.bofh.it> (permalink)
X-Original-To Mathieu Poirier <mathieu.poirier@linaro.org>, Leo Yan <leo.yan@linaro.org>, Suzuki K Poulose <suzuki.poulose@arm.com>, Stephen Boyd <sboyd@codeaurora.org>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org
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)
X-Mailer git-send-email 2.7.4
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 52
Organization linux.* mail to news gateway
X-Original-Date Tue, 2 May 2017 16:15:03 +0800
X-Original-Message-ID <1493712903-16726-1-git-send-email-leo.yan@linaro.org>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1634229

Show key headers only | View raw


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 <sboyd@codeaurora.org>
Signed-off-by: Leo Yan <leo.yan@linaro.org>
---
 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
-- 
2.7.4

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

[PATCH] coresight: use const for device_node structures Leo Yan <leo.yan@linaro.org> - 2017-05-02 10:20 +0200
  Re: [PATCH] coresight: use const for device_node structures Mathieu Poirier <mathieu.poirier@linaro.org> - 2017-05-03 22:30 +0200
    Re: [PATCH] coresight: use const for device_node structures Leo Yan <leo.yan@linaro.org> - 2017-05-04 02:50 +0200

csiph-web