lkml.org 
[lkml]   [2022]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] i2c: designware: use u64 for clock freq to avoid u32 multiplication overflow
On Wed, Dec 14, 2022 at 10:34:18AM +0000, Hanna Hawa wrote:
> From: Lareine Khawaly <lareine@amazon.com>
>
> In functions i2c_dw_scl_lcnt() and i2c_dw_scl_hcnt() may have overflow
> by depending on the values of the given parameters including the ic_clk.
> For example in our usecase where ic_clk >= 1000000, multiplication of

It's hard to count 0:s, can you use plain words instead (like million, billion)?

> ic_clk * 4700 will result in 32 bit overflow.

> This commit change the ic_clk to be u64 parameter to avoid the overflow.

Read Submitting Patches about imperative mood in the commit messages.

...

Smells like you are missing the Fixes tag.

--
With Best Regards,
Andy Shevchenko


\
 
 \ /
  Last update: 2022-12-14 12:45    [W:0.024 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site