public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Mukesh Kumar Savaliya <quic_msavaliy@quicinc.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Andi Shyti <andi.shyti@kernel.org>, <linux-i2c@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Cc: Jarkko Nikula <jarkko.nikula@linux.intel.com>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	Jan Dabros <jsd@semihalf.com>
Subject: Re: [PATCH v1 1/1] i2c: designware: Use better constants from units.h
Date: Wed, 16 Apr 2025 17:49:42 +0530	[thread overview]
Message-ID: <cf67e195-cb7f-4474-9f93-96030fe76e12@quicinc.com> (raw)
In-Reply-To: <20250416101702.2128740-1-andriy.shevchenko@linux.intel.com>



On 4/16/2025 3:47 PM, Andy Shevchenko wrote:
> When we use constants in a time or frequency related contexts,
> it's better to utilise the respective definitions that have
> encoded units in them. This will make code better to read and
> understand.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>   drivers/i2c/busses/i2c-designware-platdrv.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c
> index d6e1ee935399..879719e91df2 100644
> --- a/drivers/i2c/busses/i2c-designware-platdrv.c
> +++ b/drivers/i2c/busses/i2c-designware-platdrv.c
> @@ -34,7 +34,7 @@
>   
>   static u32 i2c_dw_get_clk_rate_khz(struct dw_i2c_dev *dev)
>   {
> -	return clk_get_rate(dev->clk) / KILO;
> +	return clk_get_rate(dev->clk) / HZ_PER_KHZ;
>   }
>   
>   #ifdef CONFIG_OF
Acked-by: Mukesh Kumar Savaliya <quic_msavaliy@quicinc.com>


  reply	other threads:[~2025-04-16 12:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-16 10:17 [PATCH v1 1/1] i2c: designware: Use better constants from units.h Andy Shevchenko
2025-04-16 12:19 ` Mukesh Kumar Savaliya [this message]
2025-04-16 12:23 ` Jarkko Nikula
2025-04-17 12:01 ` Andi Shyti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cf67e195-cb7f-4474-9f93-96030fe76e12@quicinc.com \
    --to=quic_msavaliy@quicinc.com \
    --cc=andi.shyti@kernel.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=jarkko.nikula@linux.intel.com \
    --cc=jsd@semihalf.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox