All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Giorgi Tchankvetadze <giorgitchankvetadze1997@gmail.com>,
	antoniu.miclaus@analog.com, lars@metafoo.de,
	Michael.Hennerich@analog.com, dlechner@baylibre.com,
	nuno.sa@analog.com, andy@kernel.org, linux-iio@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] iio: adc: ad7625: fix type mismatch in clamp() macro
Date: Mon, 27 Apr 2026 10:52:55 +0100	[thread overview]
Message-ID: <20260427105255.0dd96e51@jic23-huawei> (raw)
In-Reply-To: <ae8Q0MtuZgMxCOM9@ashevche-desk.local>

On Mon, 27 Apr 2026 10:31:28 +0300
Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:

> On Sat, Apr 25, 2026 at 11:16:16AM +0400, Giorgi Tchankvetadze wrote:
> > clamp() expects compatible operand types. The period calculation uses
> > nanosecond constants, while the local target variable was narrower than
> > the upper bound expression.
> > 
> > Make target unsigned long and use unsigned long bounds, including
> > NSEC_PER_USEC for the upper limit. This keeps the operands naturally
> > aligned without adding casts.  
> 
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> 
> ...
> 
> > -	u32 target;
> > +	unsigned long target;
> >  	struct pwm_waveform clk_gate_wf = { }, cnv_wf = { };
> >  	int ret;  
> 
> Preferred to keep the reversed xmas tree order (no need to resend, hopefully
> Jonathan tweaks this whilst applying).
> 
> 	struct pwm_waveform clk_gate_wf = { }, cnv_wf = { };
> 	unsigned long target;
> 	int ret;
> 

Done and applied. Thanks.

J

  reply	other threads:[~2026-04-27  9:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-25  7:16 [PATCH v2] iio: adc: ad7625: fix type mismatch in clamp() macro Giorgi Tchankvetadze
2026-04-27  7:31 ` Andy Shevchenko
2026-04-27  9:52   ` Jonathan Cameron [this message]
2026-04-27 13:28 ` David Laight

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=20260427105255.0dd96e51@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=Michael.Hennerich@analog.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=andy@kernel.org \
    --cc=antoniu.miclaus@analog.com \
    --cc=dlechner@baylibre.com \
    --cc=giorgitchankvetadze1997@gmail.com \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.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.