From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9E805C48260 for ; Fri, 16 Feb 2024 15:04:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=LQEzmixdFdqjul6t9K2KjIFWaJ1q3QT/AOBSijFTNys=; b=cCBo7tyBQDh5qU DgrdkOmh2FuwFKRMrcX289L4TY5oE+T+r122CxmQ29cnFf2r/MbH6Ito2rOqVnoa1x+RrLRVWmXa2 wtL5u9oEvoRAzkOE3bz6ra6Z389EaWZrnmqBR3jo18yUxmGUG6oK1bFVCgp+pqG6NW7CWTH/TPJAJ 9QJoMwu2fOFvHKJs6uwUuE9i9nvBpsD/raEGcrc37WCrc4ukB7UX49wlswNmsuhxUDoWuDeoNKSMM 5AOjVUXgiQTtqwKHy0RKMctTIA990V9R4Cce8diwRAa2CQ4Y+DT6uIxwO6dOyo0dYB3mL83l03jLc hVzQlJt+rCnqZ24irOeA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1razkm-00000002gwb-2Gke; Fri, 16 Feb 2024 15:03:52 +0000 Received: from mgamail.intel.com ([198.175.65.18]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1razkk-00000002gw9-0WBT; Fri, 16 Feb 2024 15:03:51 +0000 X-IronPort-AV: E=McAfee;i="6600,9927,10985"; a="2337587" X-IronPort-AV: E=Sophos;i="6.06,164,1705392000"; d="scan'208";a="2337587" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Feb 2024 07:03:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10985"; a="912373712" X-IronPort-AV: E=Sophos;i="6.06,164,1705392000"; d="scan'208";a="912373712" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga002.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Feb 2024 07:03:41 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1razkY-000000054p0-1409; Fri, 16 Feb 2024 17:03:38 +0200 Date: Fri, 16 Feb 2024 17:03:37 +0200 From: Andy Shevchenko To: Siddharth Vadapalli Cc: Vinod Koul , Thomas Richard , Linus Walleij , Bartosz Golaszewski , Tony Lindgren , Haojian Zhuang , Vignesh R , Aaro Koskinen , Janusz Krzysztofik , Andi Shyti , Peter Rosin , Kishon Vijay Abraham I , Philipp Zabel , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, linux-i2c@vger.kernel.org, linux-phy@lists.infradead.org, linux-pci@vger.kernel.org, gregory.clement@bootlin.com, theo.lebrun@bootlin.com, thomas.petazzoni@bootlin.com, u-kumar1@ti.com Subject: Re: [PATCH v3 08/18] phy: ti: phy-j721e-wiz: split wiz_clock_init() function Message-ID: References: <20240102-j7200-pcie-s2r-v3-0-5c2e4a3fac1f@bootlin.com> <20240102-j7200-pcie-s2r-v3-8-5c2e4a3fac1f@bootlin.com> <14429802-b4d8-4a3e-88ea-a9fc55d2251c@ti.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <14429802-b4d8-4a3e-88ea-a9fc55d2251c@ti.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240216_070350_216398_22702E48 X-CRM114-Status: GOOD ( 18.25 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Feb 16, 2024 at 02:34:39PM +0530, Siddharth Vadapalli wrote: > On 24/02/16 11:32AM, Vinod Koul wrote: > > On 15-02-24, 17:43, Andy Shevchenko wrote: > > > On Thu, Feb 15, 2024 at 04:17:53PM +0100, Thomas Richard wrote: ... > > > (Side note, as this can be done later) > > > > > > > if (rate >= 100000000) > > > > > > > + if (rate >= 100000000) > > > > > > > + if (rate >= 100000000) > > > > > > I would make local definition and use it, we may get the global one as there > > > are users. > > > > > > #define HZ_PER_GHZ 1000000000UL > > > > Better to define as: > > #define HZ_PER_GHZ 1 * GIGA > > The variable "rate" is being compared against 100 MHz and not 1 GHz. Extremely good point why constant definitions are better (to avoid missing or extra 0, etc)! > The driver already has the following macros defined: > #define REF_CLK_19_2MHZ 19200000 > #define REF_CLK_25MHZ 25000000 > #define REF_CLK_100MHZ 100000000 > #define REF_CLK_156_25MHZ 156250000 > > So would it be acceptable to change it to: > if (rate >= REF_CLK_100MHZ) > instead? Sounds like a good idea to me. -- With Best Regards, Andy Shevchenko _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel