Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp3883627rwj; Tue, 20 Dec 2022 03:19:28 -0800 (PST) X-Google-Smtp-Source: AMrXdXsI0u5sAjKuzoJm+hRNtcbnS+6cvvruSS7V8EsgkQhcpkSvuhblizYURa9MS46IZf8b58Ri X-Received: by 2002:a05:6a20:c1a9:b0:a3:9598:e5c5 with SMTP id bg41-20020a056a20c1a900b000a39598e5c5mr15765258pzb.35.1671535168287; Tue, 20 Dec 2022 03:19:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671535168; cv=none; d=google.com; s=arc-20160816; b=ceMUmbzt9BaPQE5PR2Uj2lF4sKjbNqnCwEKjx34H9G0PQ+uFIAv0JbiEeeHnBZXOow tgkUq4bPEn6gLEvTkPjrPzQk8Ffrb7awHHyp5HxU6kQpYurvf2PljaxRlqFIGMs86y4U nBJKaJhP2XidsU25VmQsKvZU7Kr4TQoEjKA9NIAb4xEk0AKCABtMK2nRO7hFZgnn4Daf TH6793i17vvjmeYy6I85Hktry4Ysp+2TgQwtLAR32kQapEJ9ZYGY5puEhp9u1IXNY+hY lBZSdKyKw2awqFETdjePYEvj8Q1tLUYFP5Kks6t/YrJ7JzBPQlQrZGcS+iJuDqL+vvv+ bejw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Kg4mrntRNaky0GzN4tpQ84nYudnzCLwi1AKS4Dk2bC4=; b=uBPami/H5gsH110SvpBPa1RwDhJ1MCIxwxg+SMkg0ue3vHOmeAkhXr8s1Pd2WYkyRx AtpXqGo6azIOasMY0/U76xZEeR4k1QYwMMeR1iox3Pwaek0gyU7sxhNHXb7hwjaY/gDX rM2yzGc5cLg7M7CBf7Uq7Q/TKFzE8pEvX9xGvyVH/W/H3L98UrGnUQ6qHaiJeIK/BEJl 4s8Ad03ll+dfAlt9dl+0jVYTAi6tai1ZpREz1HBxN9osgVD6HkFcUeV1b+/iEkKlKJcl rP1VX2NE01daZdlRFy14AXxeJYTHxiNfOpafBnD6Y42LSPMgfPhgFS9qVo46vshaMcCR PN3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=fZY2NgJD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q21-20020a170902f35500b00186a16f8d94si12241307ple.77.2022.12.20.03.19.19; Tue, 20 Dec 2022 03:19:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=fZY2NgJD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233217AbiLTKsu (ORCPT + 70 others); Tue, 20 Dec 2022 05:48:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229749AbiLTKsm (ORCPT ); Tue, 20 Dec 2022 05:48:42 -0500 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4F6FB5E; Tue, 20 Dec 2022 02:48:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1671533321; x=1703069321; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=mGnjsZRZGuBUTGQnqaiYvmkGkVdj81DKocJt/J2G9rY=; b=fZY2NgJD4pEo10sZkbwDpvRNWZYfPb2TkKazncQjpF3WwsuSTrq2bLZO rJMbGpSGEaNhKKCCtf55Q1/NQylUf4uuKTcy7pxLvNwKVYsPDoCyuCrSQ RE01u+LXVGAU8adNL6tY83I1mwTaOlvMRaggzoDkXAen4/52w1zeLFCZs 4nGoDjgoBpKdEV8vSKKRFQx1Kt2um6T6HsTXXYQIrG1JhB1wOC0b4WtNv wEjSK7k1uw/ZlJHrac6O93yf7uz2HP2wYCAN5yR9ekzXK/N3dtuIZ+uWO K2elby4TJ+dtJiV0A1OEWA7UE70Nddi7iMtt2KI2fQ4x3Tv4QB1d0ECTH Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10566"; a="321488336" X-IronPort-AV: E=Sophos;i="5.96,259,1665471600"; d="scan'208";a="321488336" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Dec 2022 02:48:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10566"; a="719483877" X-IronPort-AV: E=Sophos;i="5.96,259,1665471600"; d="scan'208";a="719483877" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga004.fm.intel.com with ESMTP; 20 Dec 2022 02:48:31 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1p7aAf-00CpV6-1H; Tue, 20 Dec 2022 12:48:29 +0200 Date: Tue, 20 Dec 2022 12:48:29 +0200 From: Andy Shevchenko To: Hanna Hawa Cc: wsa@kernel.org, jarkko.nikula@linux.intel.com, Suravee.Suthikulpanit@amd.com, mika.westerberg@linux.intel.com, jsd@semihalf.com, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, dwmw@amazon.co.uk, benh@amazon.com, ronenk@amazon.com, talel@amazon.com, jonnyc@amazon.com, hanochu@amazon.com, farbere@amazon.com, itamark@amazon.com Subject: Re: [PATCH 1/1] i2c: designware: fix i2c_dw_clk_rate() return size to be u32 Message-ID: References: <20221219172345.14272-1-hhhawa@amazon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221219172345.14272-1-hhhawa@amazon.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham 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 On Mon, Dec 19, 2022 at 05:23:45PM +0000, Hanna Hawa wrote: > Make i2c_dw_clk_rate() to return u32 instead of unsigned long, as the > function return the value of get_clk_rate_khz() which returns u32. Makes sense. Reviewed-by: Andy Shevchenko > Fixes: b33af11de236 ("i2c: designware: Do not require clock when SSCN and FFCN are provided") > Signed-off-by: Hanna Hawa > --- > drivers/i2c/busses/i2c-designware-common.c | 2 +- > drivers/i2c/busses/i2c-designware-core.h | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/i2c/busses/i2c-designware-common.c b/drivers/i2c/busses/i2c-designware-common.c > index c023b691441e..e0a46dfd1c15 100644 > --- a/drivers/i2c/busses/i2c-designware-common.c > +++ b/drivers/i2c/busses/i2c-designware-common.c > @@ -462,7 +462,7 @@ void __i2c_dw_disable(struct dw_i2c_dev *dev) > dev_warn(dev->dev, "timeout in disabling adapter\n"); > } > > -unsigned long i2c_dw_clk_rate(struct dw_i2c_dev *dev) > +u32 i2c_dw_clk_rate(struct dw_i2c_dev *dev) > { > /* > * Clock is not necessary if we got LCNT/HCNT values directly from > diff --git a/drivers/i2c/busses/i2c-designware-core.h b/drivers/i2c/busses/i2c-designware-core.h > index 4d3a3b464ecd..56a029da448a 100644 > --- a/drivers/i2c/busses/i2c-designware-core.h > +++ b/drivers/i2c/busses/i2c-designware-core.h > @@ -322,7 +322,7 @@ int i2c_dw_init_regmap(struct dw_i2c_dev *dev); > u32 i2c_dw_scl_hcnt(u32 ic_clk, u32 tSYMBOL, u32 tf, int cond, int offset); > u32 i2c_dw_scl_lcnt(u32 ic_clk, u32 tLOW, u32 tf, int offset); > int i2c_dw_set_sda_hold(struct dw_i2c_dev *dev); > -unsigned long i2c_dw_clk_rate(struct dw_i2c_dev *dev); > +u32 i2c_dw_clk_rate(struct dw_i2c_dev *dev); > int i2c_dw_prepare_clk(struct dw_i2c_dev *dev, bool prepare); > int i2c_dw_acquire_lock(struct dw_i2c_dev *dev); > void i2c_dw_release_lock(struct dw_i2c_dev *dev); > -- > 2.38.1 > -- With Best Regards, Andy Shevchenko