[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zie_SWPwpbsdU4mK@smile.fi.intel.com>
Date: Tue, 23 Apr 2024 17:01:45 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jirislaby@...nel.org>, linux-kernel@...r.kernel.org,
linux-serial@...r.kernel.org
Subject: Re: [PATCH 1/1] serial: 8250_pnp: Simplify "line" related code
On Tue, Apr 23, 2024 at 04:49:30PM +0300, Ilpo Järvinen wrote:
> 8250_pnp sets drvdata to line + 1 if the probe is successful. The users
> of drvdata are in remove, suspend and resume callbacks, none of which
> will be called if probe failed. The line acquired from drvdata can
> never be zero in those functions and the checks for that can be
> removed.
>
> Eliminate also +/-1 step because all users of line subtract 1 from the
> value.
Also noticed that, looks like a leftover from the legacy PM callbacks that
might be called without probe being succeeded.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists