Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp920761pxp; Wed, 16 Mar 2022 21:21:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwMMhNadEjuLIPI9cjdXWif8zQGB52OYjKcgLi8d/+IxEkRg+SjLUtNjrfuX7/AwPXjNDri X-Received: by 2002:a05:6a00:130e:b0:4cc:3c7d:4dec with SMTP id j14-20020a056a00130e00b004cc3c7d4decmr2991732pfu.32.1647490897517; Wed, 16 Mar 2022 21:21:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647490897; cv=none; d=google.com; s=arc-20160816; b=qA6yqLdzJVpWo4YB0xCNMGNh+Js5RFtM/utzl7r/rB+dJTv478PQJQWnEfdUV3QtTH AeypNT2kNwEeCo3+rXDENVzgw4gSroJAtGyzGLru1WtUhFS9qYJIrEMUxeeRDrjqhDzN 1EgGWbG0upHuHFv4osQpzu0RgEWLCUV6RBhOU/9U7f2IOYWNbURcQUGgCe2YSW6tidYj wLUJIFs/0M4bol3B07UkbiRFItIA3FT3WjROqG7DZbMHGJXOFn5Dx96DH8AC/sKk2jaz 4rLCMicwZECveemLjydHkNZphyhMbf+8STOn8lAnkzd6HEifFVDdt9gR+Oj4nZ1cy/Aw oNTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:user-agent:date:to:cc:from:subject :references:in-reply-to:content-transfer-encoding:mime-version :dkim-signature; bh=FwuWs1qTrjehn9fJGzRi+c6XB7IRqJ5zRPDBOlDaea4=; b=QTp59c2RMGwpLd4XtahyJMLnPiv3jfgf/XXBdeCiiipTGiyQM8BeruF6X38n0MR5Ew 768S67TjcYBAK2DECvvdYzHgLXcxWAS4N6fbx+ONEIND/4+VeKab6AuN3DOJ3XN51jj9 +yFR7AMO76dG+Se0qo5oV0GCI+M6bJbMRglTQ2KQ9nev+6Cbe8S4tKy+a1ej0c9rg9lq 3qdjgG9vxpvapMgZbGHUlkCDxijyh+oTscz4fngbKlebAMptZKummKpIXxxApWxjiXiX HAfrDYObcnYBfTrUibnIpZ9vq7RrR/vavpMOcksZzvoETF+X4ZcyPpP7KJwqHjuqkETs wucg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=M4PwMSDo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id m19-20020a056a00165300b004f6664623casi3712724pfc.214.2022.03.16.21.21.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 21:21:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=M4PwMSDo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A985765836; Wed, 16 Mar 2022 20:55:21 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344029AbiCOVbv (ORCPT + 99 others); Tue, 15 Mar 2022 17:31:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350379AbiCOVbq (ORCPT ); Tue, 15 Mar 2022 17:31:46 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A14C15BE4B; Tue, 15 Mar 2022 14:30:33 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 19EA3B81892; Tue, 15 Mar 2022 21:30:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C8E47C340F4; Tue, 15 Mar 2022 21:30:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1647379830; bh=Z+w7qmmwtApw9A0X4lTrxH73AXRGI1t4uG6akIL9azM=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=M4PwMSDorSTfdtY0s/1gMPAGwA76o8BVklHp8cUpOsLR/WrS9AYZ0xQbOt88TuQaH EMQbSpPCoHfLXrEwj2M+QFhUoVpxT++T84P/S7tTMMZOvurhsiRzOWIGXE3vASsh+e 36FI6P9cehMnn4n2+l4rzhjFAqEy35TiQWb3azA3bsUcQzWn2u1GgsQhcX2nilHAfS eF4egGjPLjkS4eVKhpZ2+lctYADUqew2oGAyw1mE8bswn940YdxDiTyWOZ3pAMwYVG +7xrwSWWJ8yHK8a6zeB47BABudr8r8ppqzsH7d+muharC6MX2YyZZNiwVPyxJ/RmZN 4tKFqn7Jr7fVA== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: References: <20220313190419.2207-1-ansuelsmth@gmail.com> <20220313190419.2207-2-ansuelsmth@gmail.com> <20220315175520.32E1AC340EE@smtp.kernel.org> Subject: Re: [PATCH 01/16] clk: permit to define a custom parent for clk_hw_get_parent_index From: Stephen Boyd Cc: Andy Gross , Bjorn Andersson , Jonathan Hunter , Michael Turquette , Peter De Schrijver , Prashant Gaikwad , Rob Herring , Thierry Reding , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org To: Ansuel Smith Date: Tue, 15 Mar 2022 14:30:28 -0700 User-Agent: alot/0.10 Message-Id: <20220315213030.C8E47C340F4@smtp.kernel.org> X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Ansuel Smith (2022-03-15 11:07:26) > On Tue, Mar 15, 2022 at 10:55:18AM -0700, Stephen Boyd wrote: > > Quoting Ansuel Smith (2022-03-13 12:04:04) > > > */ > > > -int clk_hw_get_parent_index(struct clk_hw *hw) > > > +int clk_hw_get_parent_index(struct clk_hw *hw, struct clk_hw *parent) > >=20 > > Please introduce another API vs. tacking on an "output" argument to this > > API. That makes the patch less invasive. And it can also return a > > pointer instead of an integer in that case. > > >=20 > Any suggestion about the name? clk_hw_fetch_parent_index? That would be > a direct access of the internal clk_fetch_parent_index. >=20 > The name is already not that intuitive as is. The alternative is to make > it extra long, don't know if that's a problem... > Something like clk_hw_get_parent_index_by_parent? (that is even more > confusing) Haha that's a mouthful. clk_hw_get_index_of_parent()? I realize now that I misread the API because parent wasn't a const pointer. Please make parent argument const as well and return an int as before.