Re: [PATCH v3 3/6] i2c: rcar: Consolidate timings calls in rcar_i2c_clock_calculate()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 24, 2020 at 11:02:00AM +0200, Andy Shevchenko wrote:
> On Tue, Mar 24, 2020 at 09:13:28AM +0100, Wolfram Sang wrote:
> > Hi Andy,
> > 
> > > > Here, the initialization to 0 is missing, so some values are broken.
> > > 
> > > Yes, and this is fine. They are not being used. So, the idea is, whenever we
> > > pass "false" as a parameter to the function we must take care of all fields we
> > > are using.
> > 
> > Can be argued. Still, uninitialized values look a little sloppy IMO. I
> > had a patch on top of this series to print the generated values as debug
> > output, and '0' looks much more intentional there.
> > 
> > > > Why don't we just drop the pointer and init the array directly?
> > > > 
> > > > 	struct i2c_timings t = {
> > > > 		.bus_freq_hz = ...
> > > > 		...
> > > > 	}
> > > 
> > > I can do it if you think it's better. I have no strong opinion here.
> > > From code prospective I guess it will be something similar anyway.
> > 
> > I like it better. Easier to read in the code, no need for a seperate
> > pointer. I can fix it locally here, though.
> 
> I already sent v4 the other day, but can update since I have got new tags to
> pick up.

Okay, v5 is fine with me as well.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux