Re: [PATCH v4 2/2] iio: temperature: add driver support for ti tmp117

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

 



On Sun, 11 Apr 2021 21:08:29 +0300
Andy Shevchenko <andy.shevchenko@xxxxxxxxx> wrote:

> On Sun, Apr 11, 2021 at 9:07 PM Andy Shevchenko
> <andy.shevchenko@xxxxxxxxx> wrote:
> > On Sun, Apr 11, 2021 at 5:53 PM Jonathan Cameron <jic23@xxxxxxxxxx> wrote:  
> > > On Wed,  7 Apr 2021 23:51:47 +0530
> > > Puranjay Mohan <puranjay12@xxxxxxxxx> wrote:  
> 
> > Good point, but better is to use clamp_t(s16, ...) rather than explicit casting.  
> 
> Sorry, I meant clamp_t(int, ...) of course, otherwise it will give wrong values.
I've switched it over to this which is indeed nicer.

Jonathan

> 
> > I always consider explicit casting in C (and esp. in Linux kernel) is
> > a red flag. Should be really rarely needed.  
> 
> 
> 




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux