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: 9667387 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 AD8F1602B8 for ; Thu, 6 Apr 2017 13:36:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6E9AD27FA3 for ; Thu, 6 Apr 2017 13:36:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6198D28249; Thu, 6 Apr 2017 13:36:28 +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=unavailable 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 659A927FA3 for ; Thu, 6 Apr 2017 13:36:27 +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:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=perPNxai99TIWGqOn9mNJciNUiTUl6jFoEnRIDDQZNU=; b=EBz5w5RJfkW+2XSV8DzWsev5Uo Dt/J7S/adUmj3N7kM+6YqVDH9yQjG38tWDQbvOVkZ/jYqya/ztlBCU8bHmIPHUgJr73kkdl2qdM/m dlCjAUH3nnuCPmxjqsl/94BNuiQS8kdkYv9V//r6apEgLY+m7JF13PhZfa1z/7qhuGIVLTeDIivHV D/uclZSa6fhHZH17awuHJrqtvKok4+x+0jIlmFqvYcm1lNhIq1VvtDzWVo3UizcohDsWtAdYHR3oy 02CkA2zM52/x6D/iq9GgK4G9eiVe5/K3mVJlKBM1zeqEjgxEWsGqjp/EKqHJmf3WvHwWaomqA58zt GvsNsO5Q==; 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 1cw7aK-00062q-5R; Thu, 06 Apr 2017 13:36:24 +0000 Received: from mail-pg0-x230.google.com ([2607:f8b0:400e:c05::230]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cw7X6-00036n-6E for linux-arm-kernel@lists.infradead.org; Thu, 06 Apr 2017 13:33:16 +0000 Received: by mail-pg0-x230.google.com with SMTP id x125so36630544pgb.0 for ; Thu, 06 Apr 2017 06:32:45 -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=OZoGEgYtpJQj8/t06miDpRX9hItxH8ojnzhNkL8zJaSP2hwcRKCMa7zvC57Q86VW68 fT+xThh6XCjyr+1ruH7+YMMACk75MXA20yNdoEnJ8+tl1HICnA31Bxh/oHrEVwCGJ9Ox QFAFWpNgDSbrRSZgAtKfF8C0ehNvGOUTC8AGTTHXNnW9W5dZJU5RqwAEw8RziSLfEihx wQsrQH675yW07oVhrZ2h8nLe6KzfvubywrH3RuLWw9UZQ1X+8RXC6+qu7QbTSY55u/jI PQL6PJTiwa/rQDl4qZSqQhsfJmb+x+wp4MXSbXDmLo9by2wRqMIZsN97lO6XzAon5sft IGHA== X-Gm-Message-State: AFeK/H1029mu0AlYnlFsJ2vYsqIk1sFUxhCRbCk1YC/edIMLDQBGWfTvpVWUfyQiq6kAZ9Ia 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170406_063304_559120_9E20152A X-CRM114-Status: GOOD ( 13.25 ) 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: , Cc: Leo Yan 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 | 6 +++--- include/linux/coresight.h | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) 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