Re: [PATCH v3 09/10] iio: adc: ti-ads1015: Replace data_rate with chip data struct ads1015_data

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

 



On Mon, 21 Mar 2022 18:17:28 +0200
Andy Shevchenko <andy.shevchenko@xxxxxxxxx> wrote:

> On Mon, Mar 21, 2022 at 03:41:20PM +0100, Marek Vasut wrote:
> > On 3/21/22 10:26, Andy Shevchenko wrote:  
> > > On Sun, Mar 20, 2022 at 8:14 PM Marek Vasut <marex@xxxxxxx> wrote:  
> 
> ...
> 
> > > >                          if (period <= ads1015_comp_queue[i] *
> > > > -                                       USEC_PER_SEC / data->data_rate[dr])
> > > > +                                       USEC_PER_SEC / data_rate[dr])  
> 
> 			if (period <= ads1015_comp_queue[i] * USEC_PER_SEC / data_rate[dr])
> 
> > > I would put these two to one line.  
> > 
> > That'd make the line over 80 chars long, is that OK in iio now ? 
 
Depends on readability.  Where it doesn't hurt such as line breaks in
between functional parameters I prefer we stick to sub 80 chars.

> 
> If not (Jonathan, what's your opinion?), you can do a better splitting
> 
> 			if (period <=
> 			    ads1015_comp_queue[i] * USEC_PER_SEC / data_rate[dr])
> 
> although I think it's worse than putting on one line.
> 

Agreed. This particular case is more readable on one line.


Thanks,

Jonathan





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux