From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Florian Fainelli <florian.fainelli@broadcom.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
Al Cooper <alcooperx@gmail.com>,
Broadcom internal kernel review list
<bcm-kernel-feedback-list@broadcom.com>,
Jiri Slaby <jirislaby@kernel.org>
Subject: Re: [PATCH v1 1/1] serial: 8250_bcm7271: Replace custom unit definitions
Date: Thu, 15 Feb 2024 21:40:20 +0200 [thread overview]
Message-ID: <Zc5opIrKD0UdXqrk@smile.fi.intel.com> (raw)
In-Reply-To: <d4619f25-12d8-4f95-8e5e-e83516e8230a@broadcom.com>
On Thu, Feb 15, 2024 at 11:27:39AM -0800, Florian Fainelli wrote:
> On 2/15/24 11:21, Andy Shevchenko wrote:
> > On Thu, Feb 15, 2024 at 10:35:11AM -0800, Florian Fainelli wrote:
> > > On 2/15/24 08:02, Andy Shevchenko wrote:
...
> > > > -#define KHZ 1000
> > > > -#define MHZ(x) ((x) * KHZ * KHZ)
> > > > static const u32 brcmstb_rate_table[] = {
> > > > - MHZ(81),
> > > > - MHZ(108),
> > > > - MHZ(64), /* Actually 64285715 for some chips */
> > > > - MHZ(48),
> > > > + 81 * HZ_PER_MHZ,
> > > > + 108 * HZ_PER_MHZ,
> > > > + 64 * HZ_PER_MHZ, /* Actually 64285715 for some chips */
> > > > + 48 * HZ_PER_MHZ,
> > >
> > > The previous notation was IMHO more readable,
> >
> > I tend to disagree as we read in plain text "frequency is 64 MHz",
> > the patch follows natural language.
> >
> > > can we meet in the middle and do:
> > >
> > > #define MHZ(x) ((x) * HZ_PER_MHZ
> > >
> > > and avoid touching the tables entirely?
> >
> > I don't like the intermediate layer which hides the implementation of MHZ().
> > What does it do exactly? You need to look at the internals, with the patch
> > applied you immediately see that these are just constants.
>
> OK, I suppose today's color is blue for the bike shed.
Sky is blue and sun is shining and I am happy person :-)
> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Thank you!
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2024-02-15 19:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-15 16:02 [PATCH v1 1/1] serial: 8250_bcm7271: Replace custom unit definitions Andy Shevchenko
2024-02-15 16:32 ` Ilpo Järvinen
2024-02-15 18:35 ` Florian Fainelli
2024-02-15 19:21 ` Andy Shevchenko
2024-02-15 19:27 ` Florian Fainelli
2024-02-15 19:40 ` Andy Shevchenko [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=Zc5opIrKD0UdXqrk@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=alcooperx@gmail.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=florian.fainelli@broadcom.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
/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