From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Thomas Gleixner" <tglx@linutronix.de>,
linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-aspeed@lists.ozlabs.org,
linux-rpi-kernel@lists.infradead.org, linux-mips@vger.kernel.org,
linux-tegra@vger.kernel.org, "Jiri Slaby" <jirislaby@kernel.org>,
"Joel Stanley" <joel@jms.id.au>,
"Andrew Jeffery" <andrew@codeconstruct.com.au>,
"Florian Fainelli" <florian.fainelli@broadcom.com>,
"Broadcom internal kernel review list"
<bcm-kernel-feedback-list@broadcom.com>,
"Ray Jui" <rjui@broadcom.com>,
"Scott Branden" <sbranden@broadcom.com>,
"Al Cooper" <alcooperx@gmail.com>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Paul Cercueil" <paul@crapouillou.net>,
"Vladimir Zapolskiy" <vz@mleia.com>,
"Thierry Reding" <thierry.reding@gmail.com>,
"Jonathan Hunter" <jonathanh@nvidia.com>,
"Kunihiko Hayashi" <hayashi.kunihiko@socionext.com>,
"Masami Hiramatsu" <mhiramat@kernel.org>
Subject: Re: [PATCH v2 03/14] serial: port: Introduce a common helper to read properties
Date: Mon, 4 Mar 2024 13:09:07 +0200 [thread overview]
Message-ID: <ZeWr06YWj5cDHfWL@smile.fi.intel.com> (raw)
In-Reply-To: <2024030259-playback-starlit-a472@gregkh>
On Sat, Mar 02, 2024 at 09:58:53PM +0100, Greg Kroah-Hartman wrote:
> On Mon, Feb 26, 2024 at 04:19:19PM +0200, Andy Shevchenko wrote:
...
> > + * uart_read_port_properties - read firmware properties of the given UART port
>
> I like, but:
>
> > + * @port: corresponding port
> > + * @use_defaults: apply defaults (when %true) or validate the values (when %false)
>
> Using random booleans in a function is horrid. Every time you see the
> function call, or want to call it, you need to go and look up what the
> boolean is and means.
>
> Make 2 public functions here, one that does it with use_defaults=true
> and one =false and then have them both call this one static function,
> that way the function names themselves are easy to read and understand
> and maintain over time.
Okay! I'll redo that.
...
> > +EXPORT_SYMBOL(uart_read_port_properties);
>
> EXPORT_SYMBOL_GPL()? I have to ask :)
No clue, the rest in this file is EXPORT_SYMBOL, but I admit I followed the
cargo cult. I'll check the modified code and see if I may use _GPL version.
Thank you for review!
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2024-03-04 11:09 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-26 14:19 [PATCH v2 00/14] serial: Add a helper to parse device properties and more Andy Shevchenko
2024-02-26 14:19 ` [PATCH v2 01/14] serial: core: Move struct uart_port::quirks closer to possible values Andy Shevchenko
2024-02-26 14:19 ` [PATCH v2 02/14] serial: core: Add UPIO_UNKNOWN constant for unknown port type Andy Shevchenko
2024-02-26 14:19 ` [PATCH v2 03/14] serial: port: Introduce a common helper to read properties Andy Shevchenko
2024-03-02 20:58 ` Greg Kroah-Hartman
2024-03-04 11:09 ` Andy Shevchenko [this message]
2024-02-26 14:19 ` [PATCH v2 04/14] serial: 8250_aspeed_vuart: Switch to use uart_read_port_properties() Andy Shevchenko
2024-02-26 14:19 ` [PATCH v2 05/14] serial: 8250_bcm2835aux: " Andy Shevchenko
2024-02-26 18:23 ` Florian Fainelli
2024-02-26 14:19 ` [PATCH v2 06/14] serial: 8250_bcm7271: " Andy Shevchenko
2024-02-26 18:23 ` Florian Fainelli
2024-02-26 14:19 ` [PATCH v2 07/14] serial: 8250_dw: " Andy Shevchenko
2024-02-26 14:19 ` [PATCH v2 08/14] serial: 8250_ingenic: " Andy Shevchenko
2024-02-26 14:19 ` [PATCH v2 09/14] serial: 8250_lpc18xx: " Andy Shevchenko
2024-02-26 14:19 ` [PATCH v2 10/14] serial: 8250_of: " Andy Shevchenko
2024-02-26 18:24 ` Florian Fainelli
2024-02-27 14:55 ` Andy Shevchenko
2024-02-26 14:19 ` [PATCH v2 11/14] serial: 8250_omap: " Andy Shevchenko
2024-02-26 14:19 ` [PATCH v2 12/14] serial: 8250_pxa: " Andy Shevchenko
2024-02-26 14:19 ` [PATCH v2 13/14] serial: 8250_tegra: " Andy Shevchenko
2024-02-26 14:19 ` [PATCH v2 14/14] serial: 8250_uniphier: " Andy Shevchenko
2024-02-27 9:43 ` Kunihiko Hayashi
2024-02-27 14:55 ` Andy Shevchenko
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=ZeWr06YWj5cDHfWL@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=alcooperx@gmail.com \
--cc=andrew@codeconstruct.com.au \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=florian.fainelli@broadcom.com \
--cc=gregkh@linuxfoundation.org \
--cc=hayashi.kunihiko@socionext.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jirislaby@kernel.org \
--cc=joel@jms.id.au \
--cc=jonathanh@nvidia.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-aspeed@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=paul@crapouillou.net \
--cc=rjui@broadcom.com \
--cc=sbranden@broadcom.com \
--cc=tglx@linutronix.de \
--cc=thierry.reding@gmail.com \
--cc=vz@mleia.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).