From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 32856C433E0 for ; Fri, 19 Feb 2021 14:02:03 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D319564E5F for ; Fri, 19 Feb 2021 14:02:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D319564E5F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cerno.tech Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version: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=983G3WaJm6yv/8/5a8muXsX213pZyoa9CKdN3PKZGTY=; b=o54/LxlEdv8om4put35S3vyTW D0XWXnGTviZUXeSVRc5E23ZAoVSr4f8r/uoLg6vL2AHdF8pFABgkeaJrf3BEAw8dtdzkyYwDBnQoQ 4S4GFvjSna3hGy/Urshh5bRyefR0QSpuzer7FJJ5z9TWG01Wnc4D9R5aDttgFyY2XixOVZt919XNG wa9fzc7LX7PqY8a5PlexOJ3BQ27HHMWRdI6Fssmz5qMb3l2HX77GBNvoE0HET5ybYJGwf4lHFczKo 499W/xSw7viEJ1CVrKPghCL5xfufVMWQ9bwLW2Dg73a7ZB56iqXIP13JyP0ISOKg3FhtRthpCJd/W Rmae68SxQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lD6KJ-0008C5-Pb; Fri, 19 Feb 2021 14:00:11 +0000 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lD6Jv-000826-Bb for linux-arm-kernel@lists.infradead.org; Fri, 19 Feb 2021 13:59:50 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 966813A7; Fri, 19 Feb 2021 08:59:43 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Fri, 19 Feb 2021 08:59:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm2; bh=4QPfigMqCU4fz 9Zie/xe+5hJ99N0FBZ2RwrwyJ69Q3I=; b=QkkGNjR/dxHDBbYuxrwSLx008kPcD md/3y7TU33zFxAA6OmFhAEM5KB2irL0HILI3zeXo6YKfl1J/0AUKyJ17OL2bFpPQ yz+7DZEyTtvSa7bpQ9/9rf2mtqDs92595t1I7C1zAo9nVSwbwV3sAj8NfVT82jB7 bHAguliOwRpb+rEmog9cGkTPTuKHQi+7zrPRS9/LtGz8A5nWM23vli28OjmTFLjV nEHz2jVfwZPACPNWjt2TBUwOFU6gOOp7lj2mss/UN07c2ORAVn7yYtnv1wL8/vR1 /s09nnrUCtftWUFimKen3h8JIIf2iR6U2+qNk030H91qt0u1qFDg1a9Cg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=4QPfigMqCU4fz9Zie/xe+5hJ99N0FBZ2RwrwyJ69Q3I=; b=YoVk8D+H chYVhelkU8Xulk9d8rf96d6ijl4nvQOTBjZTjo2I89+uhg28U6IG2ZyiUXDISE8C spihUtJqVFZ4RbgtWzOapXUa1HMBv5uq2JJNsdzSKanc88kEzu02puLuZU8++IU1 K77se2s0fJjJLfPeW5Zzrw4VNgAEY3aLZLj6wvj5NFQpsofBjOv+f2S5lvExrFr7 RCgjI7DQfYyd5MTqUqD6MYWuHoVxZCxPYXxeRsqjuEoLfeUwU/yKnR9HGWMZCAAJ 9G379MMJqWHN5qwPfZUxAc6i41NaMC7lI5l+FRrUsqSxgJ3Gy1iyvafQP6RbSp0u Cin2jcaaLh+HGw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrjeeigdehlecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepofgrgihimhgv ucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrghtth gvrhhnpedvkeelveefffekjefhffeuleetleefudeifeehuddugffghffhffehveevheeh vdenucfkphepledtrdekledrieekrdejieenucevlhhushhtvghrufhiiigvpedtnecurf grrhgrmhepmhgrihhlfhhrohhmpehmrgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: from localhost (lfbn-tou-1-1502-76.w90-89.abo.wanadoo.fr [90.89.68.76]) by mail.messagingengine.com (Postfix) with ESMTPA id D48DF24005E; Fri, 19 Feb 2021 08:59:39 -0500 (EST) From: Maxime Ripard To: Laurent Pinchart , Chen-Yu Tsai , Maxime Ripard , Jernej Skrabec , Rob Herring , Frank Rowand , Daniel Vetter , David Airlie Subject: [PATCH v4 1/7] of: Make of_graph_get_port_by_id take a const device_node Date: Fri, 19 Feb 2021 14:59:28 +0100 Message-Id: <20210219135934.618684-2-maxime@cerno.tech> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210219135934.618684-1-maxime@cerno.tech> References: <20210219135934.618684-1-maxime@cerno.tech> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210219_085947_727131_348A3909 X-CRM114-Status: GOOD ( 11.24 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org of_graph_get_port_by_id doesn't modify the device_node pointer it takes as argument, so we can make it const. Signed-off-by: Maxime Ripard --- drivers/of/property.c | 2 +- include/linux/of_graph.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/of/property.c b/drivers/of/property.c index 5f9eed79a8aa..ff48271c5944 100644 --- a/drivers/of/property.c +++ b/drivers/of/property.c @@ -584,7 +584,7 @@ EXPORT_SYMBOL(of_graph_parse_endpoint); * Return: A 'port' node pointer with refcount incremented. The caller * has to use of_node_put() on it when done. */ -struct device_node *of_graph_get_port_by_id(struct device_node *parent, u32 id) +struct device_node *of_graph_get_port_by_id(const struct device_node *parent, u32 id) { struct device_node *node, *port; diff --git a/include/linux/of_graph.h b/include/linux/of_graph.h index 4d7756087b6b..87f3f4d0d0df 100644 --- a/include/linux/of_graph.h +++ b/include/linux/of_graph.h @@ -42,7 +42,7 @@ bool of_graph_is_present(const struct device_node *node); int of_graph_parse_endpoint(const struct device_node *node, struct of_endpoint *endpoint); int of_graph_get_endpoint_count(const struct device_node *np); -struct device_node *of_graph_get_port_by_id(struct device_node *node, u32 id); +struct device_node *of_graph_get_port_by_id(const struct device_node *node, u32 id); struct device_node *of_graph_get_next_endpoint(const struct device_node *parent, struct device_node *previous); struct device_node *of_graph_get_endpoint_by_regs( @@ -74,7 +74,7 @@ static inline int of_graph_get_endpoint_count(const struct device_node *np) } static inline struct device_node *of_graph_get_port_by_id( - struct device_node *node, u32 id) + const struct device_node *node, u32 id) { return NULL; } -- 2.29.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel