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.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 505F6C433E0 for ; Fri, 19 Feb 2021 13:59:47 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 D86A264EB7 for ; Fri, 19 Feb 2021 13:59:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D86A264EB7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cerno.tech Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A88F96EB30; Fri, 19 Feb 2021 13:59:45 +0000 (UTC) Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by gabe.freedesktop.org (Postfix) with ESMTPS id 497E36EB33 for ; Fri, 19 Feb 2021 13:59:45 +0000 (UTC) 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-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development 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 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel