lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210418104835.3ac0e311@jic23-huawei>
Date:   Sun, 18 Apr 2021 10:48:35 +0100
From:   Jonathan Cameron <jic23@...nel.org>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
Cc:     Puranjay Mohan <puranjay12@...il.com>,
        Alexandru Ardelean <alexandru.ardelean@...log.com>,
        devicetree <devicetree@...r.kernel.org>,
        Hartmut Knaack <knaack.h@....de>,
        linux-iio <linux-iio@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Lars-Peter Clausen <lars@...afoo.de>
Subject: Re: [PATCH v4 2/2] iio: temperature: add driver support for ti
 tmp117

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

> On Sun, Apr 11, 2021 at 9:07 PM Andy Shevchenko
> <andy.shevchenko@...il.com> wrote:
> > On Sun, Apr 11, 2021 at 5:53 PM Jonathan Cameron <jic23@...nel.org> wrote:  
> > > On Wed,  7 Apr 2021 23:51:47 +0530
> > > Puranjay Mohan <puranjay12@...il.com> 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.  
> 
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ