From patchwork Sat Mar 25 18:23:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 9644787 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 CA460601D7 for ; Sat, 25 Mar 2017 18:32:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B88652022C for ; Sat, 25 Mar 2017 18:32:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AC0A226220; Sat, 25 Mar 2017 18:32:15 +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 699DB2022C for ; Sat, 25 Mar 2017 18:32:15 +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=jrwpfujApM56M5GyX919ytINCk9kU95ZKxTUdCkTQAQ=; b=UDOUIfvltB8XKldvnfmcEmSXMC Nh2ffGGTej9U/IPZESiM1o7P49DEgY9jND890xlifOCyANbkrS0lDQTwXBs2pxw0b2FdNewavnHI1 zMIXdirRnsX5xAOzobxgWTjCPSl4OOXuGViHuETYcf4kKLZGT4hCp1aDns0e95WoVjhG4dYv7nApS YRbgJ3eK5OimX7MnUHhaDQ4XF1j69RYI6JGU6jEIxkKADk84I2lCMkvJoPrhxceTKE1LCBHtw3FNt FrauKwK1cRBTrfv+DgbGQEGt1yyyHEqiNE8NE3yDpPTxTUGGELGVtmo+0cjPXnQasZECQIGvZ/xky TifADezQ==; 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 1crqU0-00036z-Ps; Sat, 25 Mar 2017 18:32:12 +0000 Received: from mail-wr0-x232.google.com ([2a00:1450:400c:c0c::232]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1crqMt-0005oW-DW for linux-arm-kernel@lists.infradead.org; Sat, 25 Mar 2017 18:24:58 +0000 Received: by mail-wr0-x232.google.com with SMTP id l43so11142828wre.1 for ; Sat, 25 Mar 2017 11:24:30 -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=4ukf6welsMEFldYZ6ctWYvalhyOmeGvP31ppnMdmxi4=; b=Rorhdf7c9MOvx/9KniItsgpUgiup6rpJXnNMHH0RqojnU/mWUjvUPxz2cDsmsNFlVX h2TeEleSuJKdzgklVlGQQZVePmRkEauFZh3ohs9xYRi5YXoLkw1XbJO0fIozIefbJDYL oReUqgkg8xvm+aKdxoyVIsh6kMu/8GCRJvqwM= 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=4ukf6welsMEFldYZ6ctWYvalhyOmeGvP31ppnMdmxi4=; b=JyW34Gnw0Y2E8gnaJ9IF74WxcYWDvQp1regnw1f3VoLNmUHmTlCnFOFGwNHg17aDl7 gCSGeYgKq6Trs1mbRCTjY6Rwmr1LuANLIHC/n2TVBzedl23jYcJgJvuUjKrMoXACFVkm pLmNCMFn6oFlB+D8XWV48IKR2bR3pyvmxX8+Est3BXal3DT/kqcKbNctQny1s3V9t0tz 6tyKhpolM7eKJy67n7rpramEAf60Yf//AyRUI1IZoH9JADw9Xc7vfrqBeW+2QfpHxqoM xmoq7rFwjXzNIVpPfpCCnMRNnMA4U2szppZaatVj/85N8cOoVdbeK9jDCFh2SUbWIcqa xECg== X-Gm-Message-State: AFeK/H08zZIPyWf8lIIMyoPagctmgei+otIcGZypjR6dOlH3ErIdfuKfHDNsHyJHfVzpvnND X-Received: by 10.223.164.216 with SMTP id h24mr12691805wrb.128.1490466269603; Sat, 25 Mar 2017 11:24:29 -0700 (PDT) Received: from localhost.localdomain (li1529-187.members.linode.com. [139.162.244.187]) by smtp.gmail.com with ESMTPSA id e72sm7464075wma.5.2017.03.25.11.24.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 25 Mar 2017 11:24:28 -0700 (PDT) From: Leo Yan To: Jonathan Corbet , Rob Herring , Mark Rutland , Wei Xu , Catalin Marinas , Will Deacon , Andy Gross , David Brown , Michael Turquette , Stephen Boyd , Mathieu Poirier , Guodong Xu , John Stultz , 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, linux-clk@vger.kernel.org, mike.leach@linaro.org, Suzuki.Poulose@arm.com, sudeep.holla@arm.com Subject: [PATCH v5 5/9] coresight: use const for device_node structures Date: Sun, 26 Mar 2017 02:23:13 +0800 Message-Id: <1490466197-29163-6-git-send-email-leo.yan@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1490466197-29163-1-git-send-email-leo.yan@linaro.org> References: <1490466197-29163-1-git-send-email-leo.yan@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170325_112452_390614_66DA5D15 X-CRM114-Status: GOOD ( 13.10 ) 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. Signed-off-by: Leo Yan Reviewed-by: Stephen Boyd --- 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