From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933683AbbHKGMA (ORCPT ); Tue, 11 Aug 2015 02:12:00 -0400 Received: from mail-pa0-f46.google.com ([209.85.220.46]:36533 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755010AbbHKGL7 (ORCPT ); Tue, 11 Aug 2015 02:11:59 -0400 Date: Tue, 11 Aug 2015 11:40:44 +0530 From: Viresh Kumar To: Stephen Boyd Cc: Rafael Wysocki , nm@ti.com, linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, khilman@linaro.org, Greg Kroah-Hartman , Len Brown , open list , Pavel Machek Subject: Re: [PATCH 1/6] PM / OPP: reuse of_parse_phandle() Message-ID: <20150811061044.GA5147@linux> References: <8c4503fe1c1c545d5f7ac68351d81d0238532b54.1439187821.git.viresh.kumar@linaro.org> <20150811060229.GG9678@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150811060229.GG9678@codeaurora.org> 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 On 10-08-15, 23:02, Stephen Boyd wrote: > > - if (prop->length != sizeof(__be32)) { > > - dev_err(dev, "%s: Invalid opp desc phandle\n", __func__); > > - return ERR_PTR(-EINVAL); > > - } > > But we lost this check? Perhaps we can use > of_count_phandle_with_args() to make suer we only have one > phandle? I thought about it earlier and it looked like we don't need to care about this. Even if the user passes multiple strings here, its his problem. We will just pick the first entry and parse it. And that's true until the point we support multiple table entries, ofcourse :) Now that you are still awake, let me update the other patches as well where u commented :) -- viresh