Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756751AbbLCGfL (ORCPT ); Thu, 3 Dec 2015 01:35:11 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:51161 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755870AbbLCGfG (ORCPT ); Thu, 3 Dec 2015 01:35:06 -0500 Date: Wed, 2 Dec 2015 22:35:04 -0800 From: Stephen Boyd To: Masahiro Yamada Cc: linux-clk@vger.kernel.org, Michael Turquette , linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] clk: let of_clk_get_parent_name() fail for invalid clock-indices Message-ID: <20151203063504.GA14699@codeaurora.org> References: <1449109235-27214-1-git-send-email-yamada.masahiro@socionext.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1449109235-27214-1-git-send-email-yamada.masahiro@socionext.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1370 Lines: 38 On 12/03, Masahiro Yamada wrote: > Currently, of_clk_get_parent_name() returns a wrong parent clock name > when "clock-indices" property exists and the target index is not > found in the property. In this case, NULL should be returned. > > For example, > > oscillator { > compatible = "myclocktype"; > #clock-cells = <1>; > clock-indices = <1>, <3>; > clock-output-names = "clka", "clkb"; > }; > > consumer { > compatible = "myclockconsumer"; > clocks = <&oscillator 0>, <&oscillator 1>; > }; > > Currently, of_clk_get_parent_name(consumer_np, 0) returns "clka" > (and of_clk_get_parent_name(consumer_np, 1) also returns "clka", > this is correct). Because the "clock-indices" in the clock parent > does not contain <0>, of_clk_get_parent_name(consumer_np, 0) should > return NULL. > > Signed-off-by: Masahiro Yamada > --- Applied to clk-next -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/