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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id B2207C433F5 for ; Fri, 17 Dec 2021 13:51:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 15B3211232A; Fri, 17 Dec 2021 13:51:29 +0000 (UTC) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by gabe.freedesktop.org (Postfix) with ESMTPS id 82A3111232A for ; Fri, 17 Dec 2021 13:51:25 +0000 (UTC) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id D9A615C015A; Fri, 17 Dec 2021 08:51:24 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Fri, 17 Dec 2021 08:51:24 -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=fm1; bh=Ub19/beu6g/nu OZYDQVInDRY/8vv3wWB4gmsItdHjYw=; b=QDlaSgJcUdL39sH/3PjryYzfkOsoM 5k6aFJ0vDufUzrNedYz6/4nusnWdZFOD/KXvrG5Y8ttBKO0IaAGBLlRAkY6JHEwt Ftk/rH4rbYKGEGbfuIhAMrY969clbxKk6jyXDEt7w7p+gcjGBzKC8paMqqJwPCYm N6KJe71ra4FBJxSHMGHJwcqebypMc6JVbmnPcYc/6JQPv1dvr+0HTYWuNQtPQSEO vP2JU7ViVHn8S0zfm8zNWyHokYHo+e6giLqMYO2XFW5HmoY5GZ9/JZ7CS8G+HwPb IUEc8bDCFHO/+E1cBEhNVe1RpILl2s4xZsyJIwzzMh+meVv/Xtp+2n8Ww== 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= fm1; bh=Ub19/beu6g/nuOZYDQVInDRY/8vv3wWB4gmsItdHjYw=; b=OQLFc/MW YYU+cf0K5ur6ZzMu2h6vhKs6cQPYTZHLoHC69azCu4JLNFJlEryzUjvVSPvANpZM TnXgZj0w6WGQ6O/uTj4dEKk3hI8niidoWHl1BgNwnnlKjCNI6issWyPxL9LpnAtx VW43qN7hZv4prcksMaqSdk97auTGxyEWQOFvK7rUai5h5s1avQtWM3xfX94jbGAr vULQ7+c+e5ck/RBnxhufN8+i64hdyoZQs/TFjZPQ6B5Pam+DJpDTW5K8CqcapXPu xCjC/8l49+bsfLd1f7NpUG7I5DYjfh8EI6GYhB52qlKVtkznjQTdBV6UXI721f+Z hKqgkPwujA+7sg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrleeigdehkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepofgrgihimhgv ucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrghtth gvrhhnpedvkeelveefffekjefhffeuleetleefudeifeehuddugffghffhffehveevheeh vdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrg igihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 17 Dec 2021 08:51:24 -0500 (EST) From: Maxime Ripard To: Daniel Vetter , David Airlie , Rob Herring , Frank Rowand , Laurent Pinchart , Chen-Yu Tsai , Maxime Ripard , =?UTF-8?q?Jernej=20=C5=A0krabec?= Subject: [PATCH v6 1/7] of: Make of_graph_get_port_by_id take a const device_node Date: Fri, 17 Dec 2021 14:51:13 +0100 Message-Id: <20211217135119.316781-2-maxime@cerno.tech> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211217135119.316781-1-maxime@cerno.tech> References: <20211217135119.316781-1-maxime@cerno.tech> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 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 8e90071de6ed..8ad0ce5c87f3 100644 --- a/drivers/of/property.c +++ b/drivers/of/property.c @@ -603,7 +603,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.33.1 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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 77D8BC433EF for ; Fri, 17 Dec 2021 13:53:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Yva4AbLw0ZU4EvkEuiBKDtz/V9u11/sY6JcUEnvfDyY=; b=f6bWy9y/fvE1h6 eZGztUoBv0tFrSaWpEpe6HVR38Hnm+wB8s9+kfBVNxVaECLjYycCJxEytADDpDg7jGIHbUxxcYJEo mqWR7p3mlsByenQufoUnlP3AM+BsL/shvFVndxt44aMDnJ8ixMpcb2J5NCbwGrnXKvXWMGJCyoiWu tbSC2yb7zrWA1x1KoOA4/myWkFLpLztHPtYJ4xyyw0fyOIBt/5gZaCQLVGNR1knkLdLon+rAMQRaS 2LCN3dkXs29q+ifMjjz/AEARFsKZRU0SVD5CuSVoloaf8BrkY2OduldBgdDCoDvDEG3s5YCiqJUGL vKRz1niJUXqGe8PTF9Vg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1myDe3-00ATCd-KG; Fri, 17 Dec 2021 13:51:37 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1myDdw-00AT94-De for linux-arm-kernel@lists.infradead.org; Fri, 17 Dec 2021 13:51:30 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id D9A615C015A; Fri, 17 Dec 2021 08:51:24 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Fri, 17 Dec 2021 08:51:24 -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=fm1; bh=Ub19/beu6g/nu OZYDQVInDRY/8vv3wWB4gmsItdHjYw=; b=QDlaSgJcUdL39sH/3PjryYzfkOsoM 5k6aFJ0vDufUzrNedYz6/4nusnWdZFOD/KXvrG5Y8ttBKO0IaAGBLlRAkY6JHEwt Ftk/rH4rbYKGEGbfuIhAMrY969clbxKk6jyXDEt7w7p+gcjGBzKC8paMqqJwPCYm N6KJe71ra4FBJxSHMGHJwcqebypMc6JVbmnPcYc/6JQPv1dvr+0HTYWuNQtPQSEO vP2JU7ViVHn8S0zfm8zNWyHokYHo+e6giLqMYO2XFW5HmoY5GZ9/JZ7CS8G+HwPb IUEc8bDCFHO/+E1cBEhNVe1RpILl2s4xZsyJIwzzMh+meVv/Xtp+2n8Ww== 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= fm1; bh=Ub19/beu6g/nuOZYDQVInDRY/8vv3wWB4gmsItdHjYw=; b=OQLFc/MW YYU+cf0K5ur6ZzMu2h6vhKs6cQPYTZHLoHC69azCu4JLNFJlEryzUjvVSPvANpZM TnXgZj0w6WGQ6O/uTj4dEKk3hI8niidoWHl1BgNwnnlKjCNI6issWyPxL9LpnAtx VW43qN7hZv4prcksMaqSdk97auTGxyEWQOFvK7rUai5h5s1avQtWM3xfX94jbGAr vULQ7+c+e5ck/RBnxhufN8+i64hdyoZQs/TFjZPQ6B5Pam+DJpDTW5K8CqcapXPu xCjC/8l49+bsfLd1f7NpUG7I5DYjfh8EI6GYhB52qlKVtkznjQTdBV6UXI721f+Z hKqgkPwujA+7sg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrleeigdehkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepofgrgihimhgv ucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrghtth gvrhhnpedvkeelveefffekjefhffeuleetleefudeifeehuddugffghffhffehveevheeh vdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrg igihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 17 Dec 2021 08:51:24 -0500 (EST) From: Maxime Ripard To: Daniel Vetter , David Airlie , Rob Herring , Frank Rowand , Laurent Pinchart , Chen-Yu Tsai , Maxime Ripard , =?UTF-8?q?Jernej=20=C5=A0krabec?= Cc: linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org Subject: [PATCH v6 1/7] of: Make of_graph_get_port_by_id take a const device_node Date: Fri, 17 Dec 2021 14:51:13 +0100 Message-Id: <20211217135119.316781-2-maxime@cerno.tech> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211217135119.316781-1-maxime@cerno.tech> References: <20211217135119.316781-1-maxime@cerno.tech> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211217_055128_576214_D55AE64E X-CRM114-Status: GOOD ( 11.94 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 8e90071de6ed..8ad0ce5c87f3 100644 --- a/drivers/of/property.c +++ b/drivers/of/property.c @@ -603,7 +603,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.33.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel