diff mbox series

[v2,4/6] i2c: designware-pci: Fix to change data types of hcnt and lcnt parameters

Message ID 20211213180034.30929-4-andriy.shevchenko@linux.intel.com
State New
Headers show
Series [v2,1/6] i2c: designware-pci: Use temporary variable for struct device | expand

Commit Message

Andy Shevchenko Dec. 13, 2021, 6 p.m. UTC
From: Lakshmi Sowjanya D <lakshmi.sowjanya.d@intel.com>

The data type of hcnt and lcnt in the struct dw_i2c_dev is of type u16.
It's better to have same data type in struct dw_scl_sda_cfg as well.

Signed-off-by: Lakshmi Sowjanya D <lakshmi.sowjanya.d@intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
---
v2: added tag (Jarkko)

 drivers/i2c/busses/i2c-designware-pcidrv.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Jarkko Nikula Dec. 15, 2021, 7:55 a.m. UTC | #1
On 12/13/21 20:00, Andy Shevchenko wrote:
> From: Lakshmi Sowjanya D <lakshmi.sowjanya.d@intel.com>
> 
> The data type of hcnt and lcnt in the struct dw_i2c_dev is of type u16.
> It's better to have same data type in struct dw_scl_sda_cfg as well.
> 
> Signed-off-by: Lakshmi Sowjanya D <lakshmi.sowjanya.d@intel.com>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
> ---
> v2: added tag (Jarkko)
> 
>   drivers/i2c/busses/i2c-designware-pcidrv.c | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
> 
I proposed this to be first before questionable cleanups since this 
fixes existing confusion (noted by Wolfram not any of us). Same to 5-6/6.

Jarkko
Andy Shevchenko Dec. 15, 2021, 1:51 p.m. UTC | #2
On Wed, Dec 15, 2021 at 09:55:47AM +0200, Jarkko Nikula wrote:
> On 12/13/21 20:00, Andy Shevchenko wrote:
> > From: Lakshmi Sowjanya D <lakshmi.sowjanya.d@intel.com>
> > 
> > The data type of hcnt and lcnt in the struct dw_i2c_dev is of type u16.
> > It's better to have same data type in struct dw_scl_sda_cfg as well.

...

> I proposed this to be first before questionable cleanups since this fixes
> existing confusion (noted by Wolfram not any of us). Same to 5-6/6.

Okay, I postpone this series. It seems altogether it will require more time
than I currently have. Consider picking patches on the basis you have in mind
if you consider them useful. Thanks!
Jarkko Nikula Dec. 15, 2021, 2:21 p.m. UTC | #3
On 12/15/21 15:51, Andy Shevchenko wrote:
> On Wed, Dec 15, 2021 at 09:55:47AM +0200, Jarkko Nikula wrote:
>> On 12/13/21 20:00, Andy Shevchenko wrote:
>>> From: Lakshmi Sowjanya D <lakshmi.sowjanya.d@intel.com>
>>>
>>> The data type of hcnt and lcnt in the struct dw_i2c_dev is of type u16.
>>> It's better to have same data type in struct dw_scl_sda_cfg as well.
> 
> ...
> 
>> I proposed this to be first before questionable cleanups since this fixes
>> existing confusion (noted by Wolfram not any of us). Same to 5-6/6.
> 
> Okay, I postpone this series. It seems altogether it will require more time
> than I currently have. Consider picking patches on the basis you have in mind
> if you consider them useful. Thanks!
> 
Will do. I really like to get those patches before any cosmetic changes 
that fix existing issues that were confusing all of us (patches 4/6 and 
6/6) and do obvious cleanup (3/6 and 5/6).

Jarkko
diff mbox series

Patch

diff --git a/drivers/i2c/busses/i2c-designware-pcidrv.c b/drivers/i2c/busses/i2c-designware-pcidrv.c
index e4be5420840a..499970d70755 100644
--- a/drivers/i2c/busses/i2c-designware-pcidrv.c
+++ b/drivers/i2c/busses/i2c-designware-pcidrv.c
@@ -39,10 +39,10 @@  enum dw_pci_ctl_id_t {
 };
 
 struct dw_scl_sda_cfg {
-	u32 ss_hcnt;
-	u32 fs_hcnt;
-	u32 ss_lcnt;
-	u32 fs_lcnt;
+	u16 ss_hcnt;
+	u16 fs_hcnt;
+	u16 ss_lcnt;
+	u16 fs_lcnt;
 	u32 sda_hold;
 };