mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hugo Villeneuve <hugo@hugovil.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: jirislaby@kernel.org, fvallee@eukrea.fr,
	linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
	Hugo Villeneuve <hvilleneuve@dimonoff.com>,
	stable@vger.kernel.org
Subject: Re: [PATCH v2 01/15] serial: sc16is7xx: remove useless enable of enhanced features
Date: Thu, 2 Oct 2025 11:53:33 -0400	[thread overview]
Message-ID: <20251002115333.23f1c4a535a4a6f64cdca8a2@hugovil.com> (raw)
In-Reply-To: <2025100219-neon-litter-24c0@gregkh>

Hi Greg,

On Thu, 2 Oct 2025 17:43:52 +0200
Greg KH <gregkh@linuxfoundation.org> wrote:

> On Thu, Oct 02, 2025 at 10:57:24AM -0400, Hugo Villeneuve wrote:
> > From: Hugo Villeneuve <hvilleneuve@dimonoff.com>
> > 
> > Commit 43c51bb573aa ("sc16is7xx: make sure device is in suspend once
> > probed") permanently enabled access to the enhanced features in
> > sc16is7xx_probe(), and it is never disabled after that.
> > 
> > Therefore, remove useless re-enable of enhanced features in
> > sc16is7xx_set_baud().
> > 
> > Fixes: 43c51bb573aa ("sc16is7xx: make sure device is in suspend once probed")
> > Cc: stable@vger.kernel.org
> > Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
> > ---
> >  drivers/tty/serial/sc16is7xx.c | 7 -------
> >  1 file changed, 7 deletions(-)
> > 
> > diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c
> > index 1a2c4c14f6aac..c7435595dce13 100644
> > --- a/drivers/tty/serial/sc16is7xx.c
> > +++ b/drivers/tty/serial/sc16is7xx.c
> > @@ -588,13 +588,6 @@ static int sc16is7xx_set_baud(struct uart_port *port, int baud)
> >  		div /= prescaler;
> >  	}
> >  
> > -	/* Enable enhanced features */
> > -	sc16is7xx_efr_lock(port);
> > -	sc16is7xx_port_update(port, SC16IS7XX_EFR_REG,
> > -			      SC16IS7XX_EFR_ENABLE_BIT,
> > -			      SC16IS7XX_EFR_ENABLE_BIT);
> > -	sc16is7xx_efr_unlock(port);
> > -
> >  	/* If bit MCR_CLKSEL is set, the divide by 4 prescaler is activated. */
> >  	sc16is7xx_port_update(port, SC16IS7XX_MCR_REG,
> >  			      SC16IS7XX_MCR_CLKSEL_BIT,
> > -- 
> > 2.39.5
> > 
> > 
> 
> Why is this needed for stable kernels?  It's useless, what is it
> harming?

It is useless, and doing no "harm", but since the device is on a SPI
or I2C bus, this is inefficient as it takes precious cycles on these
busses.

> If so, please send it separately, not as a part of a larger series.

That is why this patch is the first in the series, so that it could be
easily backported. But I can send it separately, sure.

Hugo.

  reply	other threads:[~2025-10-02 15:53 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-02 14:57 [PATCH v2 00/15] serial: sc16is7xx: register access fixes and improvements Hugo Villeneuve
2025-10-02 14:57 ` [PATCH v2 01/15] serial: sc16is7xx: remove useless enable of enhanced features Hugo Villeneuve
2025-10-02 15:43   ` Greg KH
2025-10-02 15:53     ` Hugo Villeneuve [this message]
2025-10-02 14:57 ` [PATCH v2 02/15] serial: sc16is7xx: rename LCR macros to better reflect usage Hugo Villeneuve
2025-10-02 14:57 ` [PATCH v2 03/15] serial: sc16is7xx: rename EFR mutex with generic name Hugo Villeneuve
2025-10-02 14:57 ` [PATCH v2 04/15] serial: sc16is7xx: define common register access function Hugo Villeneuve
2025-10-02 14:57 ` [PATCH v2 05/15] serial: sc16is7xx: remove unnecessary pointer cast Hugo Villeneuve
2025-10-02 14:57 ` [PATCH v2 06/15] serial: sc16is7xx: use guards for simple mutex locks Hugo Villeneuve
2025-10-02 14:57 ` [PATCH v2 07/15] serial: sc16is7xx: drop -ENOMEM error message Hugo Villeneuve
2025-10-02 14:57 ` [PATCH v2 08/15] serial: sc16is7xx: declare SPR/TLR/XOFF2 register as volatile Hugo Villeneuve
2025-10-02 14:57 ` [PATCH v2 09/15] serial: sc16is7xx: move port/channel init to separate function Hugo Villeneuve
2025-10-02 14:57 ` [PATCH v2 10/15] serial: sc16is7xx: simplify to_sc16is7xx_one() with a single parameter Hugo Villeneuve
2025-10-02 14:57 ` [PATCH v2 11/15] serial: sc16is7xx: Kconfig: allow building with COMPILE_TEST Hugo Villeneuve
2025-10-02 14:57 ` [PATCH v2 12/15] serial: sc16is7xx: use KBUILD_MODNAME Hugo Villeneuve
2025-10-02 14:57 ` [PATCH v2 13/15] serial: sc16is7xx: change conditional operator indentation Hugo Villeneuve
2025-10-02 14:57 ` [PATCH v2 14/15] serial: sc16is7xx: reformat comments to improve readability Hugo Villeneuve
2025-10-02 14:57 ` [PATCH v2 15/15] serial: sc16is7xx: add comments for lock requirements Hugo Villeneuve

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=20251002115333.23f1c4a535a4a6f64cdca8a2@hugovil.com \
    --to=hugo@hugovil.com \
    --cc=fvallee@eukrea.fr \
    --cc=gregkh@linuxfoundation.org \
    --cc=hvilleneuve@dimonoff.com \
    --cc=jirislaby@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=stable@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

all inboxes | Powered by JetHome®