From patchwork Thu Apr 6 13:30:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 96975 Delivered-To: patch@linaro.org Received: by 10.182.246.10 with SMTP id xs10csp733177obc; Thu, 6 Apr 2017 06:32:51 -0700 (PDT) X-Received: by 10.84.132.97 with SMTP id 88mr44196061ple.61.1491485571233; Thu, 06 Apr 2017 06:32:51 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y127si1892000pgy.49.2017.04.06.06.32.50; Thu, 06 Apr 2017 06:32:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934814AbdDFNct (ORCPT + 9 others); Thu, 6 Apr 2017 09:32:49 -0400 Received: from mail-pg0-f50.google.com ([74.125.83.50]:36233 "EHLO mail-pg0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934818AbdDFNcq (ORCPT ); Thu, 6 Apr 2017 09:32:46 -0400 Received: by mail-pg0-f50.google.com with SMTP id g2so35949915pge.3 for ; Thu, 06 Apr 2017 06:32:46 -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:in-reply-to:references; bh=ppaMBM7qYZsHAO2vOvOpTvRShB1FfpzqjSETz4Io1D0=; b=V+b3XVB23RIrJCD+qO7Br8kOqgghtUjSJ0ZBsbiPfjdjMdnqDh5OXz8JwKg67eJMeV QwkouMFQ5jSGEQ9i5Ca2svjqhO/rHPnEQJQt9/x0+0bInJR1vY4Sq0N7KWQ8sI6EISXY +xRSMrDahqCuPqFmGTfqajoaR25Ios3BSI4KA= 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:in-reply-to :references; bh=ppaMBM7qYZsHAO2vOvOpTvRShB1FfpzqjSETz4Io1D0=; b=Kq6oZTq1RP6rPi89dPZygi3EzVJJUBkBjwTi4QW0otdOpcFT5Gg/wmNm9gSOpPIVvo ltmuJm3IcOTUkZ3BP0ZgnOCBoUU5X3przewBnYukZ5jwOBt5BwqTPVIOFosdljjmeKYq Juv95eps+m68PCqz2uxKUezP/No7TTobslBDOW+pBsPRknPOEe1gw5OB29IFkzqvW96L ZLBAuz+KUfbtLEiDcEIFUqDG4WyP5CnQtLwdGcnj0yZC1EcXYQRPU9sj2ybp/BnTegyv 6EmtRYmhmO0A3gSPchhf3ImiKSYF5HKAMbhTOxu9aiPNpK3rOjQDgt5YYHosRQ0UiTvK Oowg== X-Gm-Message-State: AFeK/H1tBw/ecow856+lGERsjXjXCob7W0aEqGb3970ayk4gyMhr08OsPDPCei4cpKdJEPEe X-Received: by 10.99.247.69 with SMTP id f5mr37206773pgk.63.1491485565069; Thu, 06 Apr 2017 06:32:45 -0700 (PDT) Received: from localhost.localdomain (li1627-128.members.linode.com. [172.104.47.128]) by smtp.gmail.com with ESMTPSA id 129sm4074223pgj.59.2017.04.06.06.32.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 06 Apr 2017 06:32:44 -0700 (PDT) From: Leo Yan To: Jonathan Corbet , Rob Herring , Mark Rutland , Wei Xu , Catalin Marinas , Will Deacon , Andy Gross , David Brown , Mathieu Poirier , Suzuki K Poulose , Stephen Boyd , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, Mike Leach , Sudeep Holla Cc: Leo Yan Subject: [PATCH v6 5/8] coresight: use const for device_node structures Date: Thu, 6 Apr 2017 21:30:58 +0800 Message-Id: <1491485461-22800-6-git-send-email-leo.yan@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1491485461-22800-1-git-send-email-leo.yan@linaro.org> References: <1491485461-22800-1-git-send-email-leo.yan@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@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 | 6 +++--- include/linux/coresight.h | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/hwtracing/coresight/of_coresight.c b/drivers/hwtracing/coresight/of_coresight.c index 78d2399..46eec0f 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,7 +101,7 @@ static int of_coresight_alloc_memory(struct device *dev, return 0; } -int of_coresight_get_cpu(struct device_node *node) +int of_coresight_get_cpu(const struct device_node *node) { int cpu; bool found; @@ -128,7 +128,7 @@ int of_coresight_get_cpu(struct device_node *node) EXPORT_SYMBOL_GPL(of_coresight_get_cpu); 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; struct coresight_platform_data *pdata; diff --git a/include/linux/coresight.h b/include/linux/coresight.h index bf96678..4915254 100644 --- a/include/linux/coresight.h +++ b/include/linux/coresight.h @@ -263,13 +263,13 @@ static inline int coresight_timeout(void __iomem *addr, u32 offset, #endif #ifdef CONFIG_OF -extern int of_coresight_get_cpu(struct device_node *node); +extern int of_coresight_get_cpu(const struct device_node *node); 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 int of_coresight_get_cpu(struct device_node *node) { return 0; } +static inline int of_coresight_get_cpu(const struct device_node *node) { return 0; } 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