All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Puranjay Mohan <puranjay12@gmail.com>,
	Alexandru Ardelean <alexandru.ardelean@analog.com>,
	devicetree <devicetree@vger.kernel.org>,
	Hartmut Knaack <knaack.h@gmx.de>,
	linux-iio <linux-iio@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Lars-Peter Clausen <lars@metafoo.de>
Subject: Re: [PATCH v4 2/2] iio: temperature: add driver support for ti tmp117
Date: Sun, 18 Apr 2021 10:48:35 +0100	[thread overview]
Message-ID: <20210418104835.3ac0e311@jic23-huawei> (raw)
In-Reply-To: <CAHp75VfN5J747w6o=A2eng+9SV_2L-NH28O=sGRuxGz_oxPh-Q@mail.gmail.com>

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

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


      reply	other threads:[~2021-04-18  9:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-07 18:21 [PATCH v4 0/2] iio: temperature: add support for tmp117 Puranjay Mohan
2021-04-07 18:21 ` [PATCH v4 1/2] dt-bindings: iio: temperature: Add DT bindings for TMP117 Puranjay Mohan
2021-04-08 20:22   ` Rob Herring
2021-04-07 18:21 ` [PATCH v4 2/2] iio: temperature: add driver support for ti tmp117 Puranjay Mohan
2021-04-09  6:53   ` Lars-Peter Clausen
2021-04-11 14:54   ` Jonathan Cameron
2021-04-11 18:07     ` Andy Shevchenko
2021-04-11 18:08       ` Andy Shevchenko
2021-04-18  9:48         ` Jonathan Cameron [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210418104835.3ac0e311@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=alexandru.ardelean@analog.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=puranjay12@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.