2021-12-13 18:00:42

by Andy Shevchenko

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

From: Lakshmi Sowjanya D <[email protected]>

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 <[email protected]>
Signed-off-by: Andy Shevchenko <[email protected]>
Acked-by: Jarkko Nikula <[email protected]>
---
v2: added tag (Jarkko)

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

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;
};

--
2.33.0



2021-12-15 07:55:52

by Jarkko Nikula

[permalink] [raw]
Subject: Re: [PATCH v2 4/6] i2c: designware-pci: Fix to change data types of hcnt and lcnt parameters

On 12/13/21 20:00, Andy Shevchenko wrote:
> From: Lakshmi Sowjanya D <[email protected]>
>
> 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 <[email protected]>
> Signed-off-by: Andy Shevchenko <[email protected]>
> Acked-by: Jarkko Nikula <[email protected]>
> ---
> 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

2021-12-15 13:52:34

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH v2 4/6] i2c: designware-pci: Fix to change data types of hcnt and lcnt parameters

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 <[email protected]>
> >
> > 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!

--
With Best Regards,
Andy Shevchenko



2021-12-15 14:21:21

by Jarkko Nikula

[permalink] [raw]
Subject: Re: [PATCH v2 4/6] i2c: designware-pci: Fix to change data types of hcnt and lcnt parameters

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 <[email protected]>
>>>
>>> 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