public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
From: David Laight <david.laight.linux@gmail.com>
To: Joshua Crofts <joshua.crofts1@gmail.com>
Cc: Andy Shevchenko <andriy.shevchenko@intel.com>,
	lars@metafoo.de, Michael.Hennerich@analog.com, jic23@kernel.org,
	dlechner@baylibre.com, andy@kernel.org,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-staging@lists.linux.dev,
	Greg KH <gregkh@linuxfoundation.org>,
	nuno.sa@analog.com
Subject: Re: [PATCH] iio: frequency: ad983x: replace do_div() with div64_ul().
Date: Fri, 10 Apr 2026 09:11:19 +0100	[thread overview]
Message-ID: <20260410091119.117d0feb@pumpkin> (raw)
In-Reply-To: <CALoEA-xo04NZoZLboZ_RNg+m8QfCaDMrfNRb0cZwnE1DMp=8ng@mail.gmail.com>

On Fri, 10 Apr 2026 08:58:10 +0200
Joshua Crofts <joshua.crofts1@gmail.com> wrote:

> On Fri, 10 Apr 2026 at 06:30, Andy Shevchenko
> <andriy.shevchenko@intel.com> wrote:
> > > The clk struct in linux/clk.h explicitly uses an unsigned long to represent
> > > the clock value, which is used in this driver. Using an unsigned long
> > > ensures platform independent usage without type mismatching.  
> >
> > ...which effectively means the frequency most likely fits 32-bit. Otherwise
> > would it ever work on 32-bit platform? This is a mistake in CLK design.  
> 
> So we keep the do_div() macro and cast mclk to u32.
> 

There is no need for a cast, just ignore coccineal.

	David

      reply	other threads:[~2026-04-10  8:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-09 13:18 [PATCH] iio: frequency: ad983x: replace do_div() with div64_ul() Joshua Crofts
2026-04-09 13:34 ` Joshua Crofts
2026-04-09 14:52   ` Greg KH
2026-04-09 15:01     ` [PATCH v2] " Joshua Crofts
2026-04-09 15:39       ` David Lechner
2026-04-09 15:50         ` Andy Shevchenko
2026-04-09 15:49 ` [PATCH] " Andy Shevchenko
2026-04-09 17:27 ` David Laight
2026-04-09 19:58   ` Joshua Crofts
2026-04-09 21:46     ` David Laight
2026-04-10  4:30     ` Andy Shevchenko
2026-04-10  6:58       ` Joshua Crofts
2026-04-10  8:11         ` David Laight [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=20260410091119.117d0feb@pumpkin \
    --to=david.laight.linux@gmail.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jic23@kernel.org \
    --cc=joshua.crofts1@gmail.com \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox