Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp4440933imm; Mon, 25 Jun 2018 16:04:52 -0700 (PDT) X-Google-Smtp-Source: ADUXVKK2Lj7QvCI7T+CYuG7qQ/1HW1u6V/xB3iSxkM77aTddSgW/Ns3m0gzhRRqdM9ZLWvrKK04I X-Received: by 2002:a65:6157:: with SMTP id o23-v6mr12441580pgv.310.1529967892845; Mon, 25 Jun 2018 16:04:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529967892; cv=none; d=google.com; s=arc-20160816; b=ZJufFu3h+CIp1+26hG5yvAQ+IsvLz71RTz6MNIEu17Qc7U8SRfGtobPbQj0oq9axxw 1Gg2e1cyu8hjNLEZl/LqGjPMjVAE3qpEEoMH/LveMPkaeRt7a0da3f/BOA8Ay20mtXX3 cs4jEoidEcDfUqNFckiINb7KiQ0BHVPWRH2RUqVD1LFwL5mkvpsMmbnJTNR4+465XSWd MVqoQZyoOeWstw5RpiqWZ8e3Z6D1POk7QTm82F8fjv6NjfTs3Dli+j1aKVYht3OgfnDq sBvH4uaznZaf/5D+jTI3TcHemxPmwUuOVXTqUkwlEvfg7cYPNQdm54WqVximRIHQ3cp9 0OVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=h3c1wC0NN7g5gFRbtOFLAPEI2WuLdyNuvC94qg932uY=; b=nK5798k9MeiWBFSIox5WQSraVuLFNJGApuXS5/JYrzQ+wMKrrbZOkoA25wVVChrQFk rfyvRvCmW07zMznIYquu1AAEWGkUNysAZt5aGxeg+q6hLCVQQiQ24LeUN81XEx/nLjxX 3t3q8KcceXuypRKkI8s4YJuuWlqw0VAT1CRObDw+Dp9Tqa4UHdBebiM2D82H/ksLR1wR 36IssXcLQkysmNs7eRkcjsbe/f1k9D01Ju6t2TimClF8eMfQ6lwd5H6hwNEZbBKPr2PN uYm/OG+MmJ1b4SK45Bp4T/8uFg3hUQsekdhWEfzTxr0y8L2o5QII+0zgIwVeqeigkMpQ rfvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lechnology.com header.s=default header.b=UmMj7EOq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u127-v6si90710pgc.482.2018.06.25.16.04.38; Mon, 25 Jun 2018 16:04:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@lechnology.com header.s=default header.b=UmMj7EOq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755184AbeFYXCa (ORCPT + 99 others); Mon, 25 Jun 2018 19:02:30 -0400 Received: from vern.gendns.com ([206.190.152.46]:35083 "EHLO vern.gendns.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753205AbeFYXC3 (ORCPT ); Mon, 25 Jun 2018 19:02:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lechnology.com; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=h3c1wC0NN7g5gFRbtOFLAPEI2WuLdyNuvC94qg932uY=; b=UmMj7EOq48lSjTteL9cQBJ5x44 vMZ6C6fbK+sSBtcvejNJn24CGzvOWXfQTV8FhnU5HvjFSBDXByOFoIe7v58hvldExQpoLRqjJDFhA IRjpsTRG342YHwluhDvX1Y0CsoHU10PnY8O1MyXghdhVnmz+B9SeLUDqycBmt3rhZoZa8nNwrB4F3 rkhYMC8MmPL3diWcSWjczMFFE6amHprqp+Cpt1TF/j2ukCY0UcIHlK92r23hK5Pby8/CjXHLhnSVE Ro3O2ttE1y3crCD9QRFxILeZD/Jo62C1pRfuSP3msdgoshF0L5aBq4nc+pMe+SCnBDLcnDZBrMu9S MqIM5Wow==; Received: from 108-198-5-147.lightspeed.okcbok.sbcglobal.net ([108.198.5.147]:60372 helo=[192.168.0.134]) by vern.gendns.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.91) (envelope-from ) id 1fXaV7-002LVF-B6; Mon, 25 Jun 2018 19:02:25 -0400 Subject: Re: [RESEND (again) PATCH] clkdev: don't call __of_clk_get_by_name() unnecessarily from clk_get() To: Bartosz Golaszewski , Russell King , Greg Kroah-Hartman Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski , Sekhar Nori , Kevin Hilman References: <20180625160440.10537-1-brgl@bgdev.pl> From: David Lechner Message-ID: <5824a382-00fc-0af3-097f-519a36c2d555@lechnology.com> Date: Mon, 25 Jun 2018 18:02:24 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180625160440.10537-1-brgl@bgdev.pl> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vern.gendns.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lechnology.com X-Get-Message-Sender-Via: vern.gendns.com: authenticated_id: davidmain+lechnology.com/only user confirmed/virtual account not confirmed X-Authenticated-Sender: vern.gendns.com: davidmain@lechnology.com X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/25/2018 11:04 AM, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski > > The way this function is implemented caused some confusion when > converting the TI DaVinci platform to using the common clock framework. > > Current kernel supports booting DaVinci boards both in device tree as > well as legacy, board-file mode. In the latter, we always end up > calling clk_get_sys() as of_node is NULL and __of_clk_get_by_name() > returns -ENOENT. > > It was not obvious at first glance how clk_get(dev, NULL) will work in > board-file mode since we always call __of_clk_get_by_name(). Let's make > it clearer by checking if of_node is NULL and skipping right to > clk_get_sys(). > > Cc: Sekhar Nori > Cc: Kevin Hilman > Cc: David Lechner > Signed-off-by: Bartosz Golaszewski > --- Reviewed-by: David Lechner