public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
From: Herve Codina <herve.codina@bootlin.com>
To: Bastien Curutchet <bastien.curutchet@bootlin.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jirislaby@kernel.org>,
	linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	christophercordahi@nanometrics.ca
Subject: Re: [PATCH 1/1] serial: 8250_of: Add clock_notifier
Date: Thu, 4 Apr 2024 10:34:46 +0200	[thread overview]
Message-ID: <20240404103446.2fd953a1@bootlin.com> (raw)
In-Reply-To: <20240404074450.42708-1-bastien.curutchet@bootlin.com>

Hi Bastien,

On Thu,  4 Apr 2024 09:44:50 +0200
Bastien Curutchet <bastien.curutchet@bootlin.com> wrote:

> The UART's input clock rate can change at runtime but this is not
> handled by the driver.
> 
> Add a clock_notifier callback that updates the divisors when the input
> clock is updated. The serial8250_update_uartclk() is used to do so.
> PRE_RATE_CHANGE and ABORT_RATE_CHANGE notifications are ignored, only
> the POST_RATE_CHANGE is used.
> 
> Reorder the #include to match alphabetic order.
> 
> It has been tested on a DAVINCI/OMAP-L138 processor.
> 
> Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
...
> +static int of_platform_serial_clk_notifier_cb(struct notifier_block *nb, unsigned long event,
> +					      void *data)
> +{
> +	struct of_serial_info *info = clk_nb_to_info(nb);
> +	struct uart_8250_port *port8250 = serial8250_get_port(info->line);
> +	struct clk_notifier_data *ndata = data;
> +
> +	if (IS_ERR(info->clk))
> +		return NOTIFY_DONE;

The info->clk pointer cannot contain an error code.
Can you double check that and remove the test if it is not needed?

Best regards,
Hervé

      parent reply	other threads:[~2024-04-04  8:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-04  7:44 [PATCH 1/1] serial: 8250_of: Add clock_notifier Bastien Curutchet
2024-04-04  7:50 ` Greg Kroah-Hartman
2024-04-04  8:50   ` Bastien Curutchet
2024-04-04  8:34 ` Herve Codina [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=20240404103446.2fd953a1@bootlin.com \
    --to=herve.codina@bootlin.com \
    --cc=bastien.curutchet@bootlin.com \
    --cc=christophercordahi@nanometrics.ca \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=thomas.petazzoni@bootlin.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