Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2257931pxk; Sat, 5 Sep 2020 14:57:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyUohsmEql6c3rK2hIZwM7ZfUsWA8wV3ElHLDsvjDmQIAHnGma/JGL/ytCINIIlKUtgXJFU X-Received: by 2002:a17:906:194b:: with SMTP id b11mr13604018eje.159.1599343033084; Sat, 05 Sep 2020 14:57:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599343033; cv=none; d=google.com; s=arc-20160816; b=TAcWKotCOQKSTFGNKtmO4EhDr038+Mz/6HNzWcPnJzAtyBPF8ry7fG1lROUxdcZFOV pfNd1JUdMJJG+uqx/1KdTT8Xg1kAT6ihsattoJmwPZoFjS6BxfFWX7EdJNQcXp7Lprmm 3WUgRZYPsfSRf/0UbV5DJTiTeN+9U9rR9CXxG1F9k8aPBB4RD5j3kdV3HuvH7gctXz6B ZifKcQYx0C2ff7tpcPmIuTbmQGKxalwfGdR+xEGSZZszez+knRstamEmXWw6YHaD2rxY xYLUG/wSpPPWywuHcM5ZtijBEXG4AuEVimDnN05qzKZgjlK94M2aPC/9CW7OqYTBr3VV +n6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Jclnhq/PoZWBdjbxIxuGyUsmio3Xrb2QVY9qcrNfytE=; b=cSvkIeII/m0JfZRsXcrV9xwozt3vjFqrbbCD7/Hax+NAWOkhnX8+/o/INsBlNpE9ZQ 0AA0xjzGQOmV3bYqant5dB81vuBcnctFRzg1n7yL24OUQ6IaxEdNTnSdYzCpgE2fCwct n6c9d9ng0bS2446Q2RnAJpgEjcRGBU0Cxc/z8O8xQ4fGroKJ8jcQ74xDH+HmfuSPMk/5 YfkE5YhMN5NApQlfOAWxXWnaqKEsZz7vtBg0Z5TTxeV5IGrGB0no2adQxqUvDoI9x8IF VctRzU3M2JCvCPsjnHewoVaz+X4rFdffLmYPpJsX4WtQ3x39Y+uHiSUMAy4pUiVVjwMi /D7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rere.qmqm.pl header.s=1 header.b=SL9c69wo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q24si6687312edb.85.2020.09.05.14.56.49; Sat, 05 Sep 2020 14:57:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@rere.qmqm.pl header.s=1 header.b=SL9c69wo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728726AbgIEV4O (ORCPT + 99 others); Sat, 5 Sep 2020 17:56:14 -0400 Received: from rere.qmqm.pl ([91.227.64.183]:58754 "EHLO rere.qmqm.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728103AbgIEV4N (ORCPT ); Sat, 5 Sep 2020 17:56:13 -0400 Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 4BkSyb1Nssz2F; Sat, 5 Sep 2020 23:55:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1599342919; bh=rYmTcMELA+20hqUbQWfmBH4UEfHZtGVP6M4zSQre8g0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=SL9c69woItKdVhfLH3GN0w/HQlpEgbLwfHlR88bWj7wIyurTVKSglqkqBC5l6wLIQ 8SdAOuL18OwfK+8fEAxlA3nWDXcJN+P2YRsHsWqe5CswV/2EveQJ8exEBJyIP/v1vO aGhhcKpMm9brvgP/MpRidyot+XR9Br3bC+BKPj4DSnxhzQZpdAQEekWe2EY5XUOA3d 5dbgDrAIBuOb5F1IoILH18UsUoFO++eYZfVw8jusyS2USY8A5d9B4N074e7kGZKz8e UVvoFGS0ZX/CWBmFnwrflnDdghMjIveDWCykPuWKBrbIgeViN3MRTymub9ru+NmMFh RUX3exYuRYxsg== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.102.4 at mail Date: Sat, 5 Sep 2020 23:56:08 +0200 From: =?iso-8859-2?Q?Micha=B3_Miros=B3aw?= To: Dmitry Osipenko Cc: Thierry Reding , Jonathan Hunter , Laxman Dewangan , Wolfram Sang , Andy Shevchenko , linux-i2c@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 10/31] i2c: tegra: Use clk-bulk helpers Message-ID: <20200905215608.GA18554@qmqm.qmqm.pl> References: <20200905204151.25343-1-digetx@gmail.com> <20200905204151.25343-11-digetx@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200905204151.25343-11-digetx@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Sep 05, 2020 at 11:41:30PM +0300, Dmitry Osipenko wrote: > Use clk-bulk helpers and factor out clocks initialization into separate > function in order to make code cleaner. [...] > --- a/drivers/i2c/busses/i2c-tegra.c > +++ b/drivers/i2c/busses/i2c-tegra.c [...] > static const struct tegra_i2c_hw_feature tegra194_i2c_hw = { > .has_continue_xfer_support = true, > .has_per_pkt_xfer_complete_irq = true, > - .has_single_clk_source = true, > .clk_divisor_hs_mode = 1, > .clk_divisor_std_mode = 0x4f, > .clk_divisor_fast_mode = 0x3c, [...] > +static int tegra_i2c_init_clocks(struct tegra_i2c_dev *i2c_dev) > +{ > + unsigned int i; > + int err; > + > + err = devm_clk_bulk_get_all(i2c_dev->dev, &i2c_dev->clocks); > + if (err < 0) > + return err; > + > + i2c_dev->nclocks = err [...] You loose checking whether number of clocks matches the device version. Is this intended? Best Regards, Micha? Miros?aw