From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jean-Francois Moine Subject: Re: [PATCH 1/2] of: Make const the device node pointers in of_clk_get and of_node_put Date: Sun, 9 Nov 2014 20:28:20 +0100 Message-ID: <20141109202820.026252bf@armhf> References: <375a82230accf26dfbbb74e6f928243ea8e38b50.1415557680.git.moinejf@free.fr> <20141109185019.GU4042@n2100.arm.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <20141109185019.GU4042-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Russell King - ARM Linux Cc: Grant Likely , Rob Herring , Mark Brown , Lars-Peter Clausen , devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: devicetree@vger.kernel.org On Sun, 9 Nov 2014 18:50:19 +0000 Russell King - ARM Linux wrote: > What this then means is that it fundamentally undermines the idea of > storing the pointer to a device_node as a const pointer, as the devic= e > node must always be modified when you're done with it (because it's a > ref-counted structure.) So, having it const in your code is a bug. >=20 > What this also means is that every other place that you've added cons= t > below is also very dubious. Thanks for the explanation. The correct patch will be simpler: in the ASoC structures, I found only three places where the device_node pointer is const. --=20 Ken ar c'henta=C3=B1 | ** Breizh ha Linux atav! ** Jef | http://moinejf.free.fr/ -- To unsubscribe from this list: send the line "unsubscribe devicetree" i= n the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html