From patchwork Thu May 4 00:36:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 98510 Delivered-To: patch@linaro.org Received: by 10.140.89.200 with SMTP id v66csp326088qgd; Wed, 3 May 2017 17:39:23 -0700 (PDT) X-Received: by 10.99.113.10 with SMTP id m10mr42896505pgc.49.1493858363819; Wed, 03 May 2017 17:39:23 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s79si573860pfj.374.2017.05.03.17.39.23; Wed, 03 May 2017 17:39:23 -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 S1752535AbdEDAjO (ORCPT + 25 others); Wed, 3 May 2017 20:39:14 -0400 Received: from mail-pf0-f169.google.com ([209.85.192.169]:33156 "EHLO mail-pf0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752097AbdEDAjH (ORCPT ); Wed, 3 May 2017 20:39:07 -0400 Received: by mail-pf0-f169.google.com with SMTP id q20so2594003pfg.0 for ; Wed, 03 May 2017 17:39:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=JMXMlU6otuqNojeuwWS5Nzic5kZwJ6wS8bgO8b3eQVA=; b=kTbEp14MasHy+FjmUwKgLrQbXK43gLYQUjtBNC1M96n5nERopmsIsleC7qazzeMVGl TnFQeqFHKUPpy+sXfGmvxHyFqIFrUJ4qKbUsIrPrCbdl1r3IJ59g9XIiIekNZkxH5hum uNTmMTnj94/s99kk2sgtaDKefmSLqV2BAoMiA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=JMXMlU6otuqNojeuwWS5Nzic5kZwJ6wS8bgO8b3eQVA=; b=eOnFKEvrd4J1YU0+GTfIC6frO6WaK1XQZc64s0e0K9Aq5Qcx0JZDOh1dIzZBkPhJL0 YxFi5yj9DeMh649xpF5+2dfxSltQcRKyN2eWEjd73dTMi0R+2QjJcqs0k8PA2VAiHmJG RVuYUuQta+TS6X/Z1vUiRmvpSh9fLYtc495j9g3lNYW2MfrboU2v7RHb7z9/8Ae8+ZyQ 0Ly/NP4JfwbUkBSucvHpycihgmQRARSXuANusGArVdZ38sxA/VeWpbyViqMfAJ+ohlUn J5W46MjTo2EZLrp3pMC7WTWYnViRd2LbjeZS+6NMQ64IFa3fU+dP+CUAGb8tyIAh27YW WjnA== X-Gm-Message-State: AN3rC/7lLhgLGv+77HsDOt50yxCEdTlOsZRN0faw56PWPPBhH6tVRCaU PdTo5EYj48PdvwWP X-Received: by 10.84.193.3 with SMTP id e3mr17360830pld.21.1493858346411; Wed, 03 May 2017 17:39:06 -0700 (PDT) Received: from localhost.localdomain (45-125-195-13.ip4.readyserver.sg. [45.125.195.13]) by smtp.gmail.com with ESMTPSA id m3sm487442pgn.30.2017.05.03.17.39.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 03 May 2017 17:39:04 -0700 (PDT) From: Leo Yan To: Mathieu Poirier , Stephen Boyd , Greg Kroah-Hartman , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Leo Yan Subject: [PATCH v2] coresight: use const for device_node structures Date: Thu, 4 May 2017 08:36:30 +0800 Message-Id: <1493858190-16451-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 | 7 ++++--- include/linux/coresight.h | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) -- 2.7.4 diff --git a/drivers/hwtracing/coresight/of_coresight.c b/drivers/hwtracing/coresight/of_coresight.c index 629e031..b101590 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; @@ -101,8 +101,9 @@ static int of_coresight_alloc_memory(struct device *dev, return 0; } -struct coresight_platform_data *of_get_coresight_platform_data( - struct device *dev, struct device_node *node) +struct coresight_platform_data * +of_get_coresight_platform_data(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..b198168 100644 --- a/include/linux/coresight.h +++ b/include/linux/coresight.h @@ -263,11 +263,12 @@ static inline int coresight_timeout(void __iomem *addr, u32 offset, #endif #ifdef CONFIG_OF -extern struct coresight_platform_data *of_get_coresight_platform_data( - struct device *dev, struct device_node *node); +extern struct coresight_platform_data * +of_get_coresight_platform_data(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