[PATCH] serial: imx: Simplify imx_uart_type

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Thu Mar 2 05:19:28 PST 2023


Hello,

On Thu, Mar 02, 2023 at 01:20:25PM +0100, Alexander Stein wrote:
> Am Donnerstag, 2. März 2023, 12:55:47 CET schrieb Uwe Kleine-König:
> > * PGP Signed by an unknown key
> > 
> > Hello,
> > 
> > On Thu, Mar 02, 2023 at 12:48:10PM +0100, Uwe Kleine-König wrote:
> > > There is no point in casting a struct uart_port to a struct imx_port
> > > just to access the first member of the latter (a struct uart_port).
> > > 
> > > This introduces code changes.
> > 
> > Please disregard this patch. While the patch is fine as is, I just
> > noticed a few more functions in this driver that can be simplified
> > accordingly. I'm about to send out an improved version (with a different
> > subject, so not called v2).
> 
> Shouldn't this cast on the other locations be converted into a to_imx_port() 
> function using container_of as well?

Yeah, I wondered about that, too, but didn't tackle that (yet). I'll
keep that for another day (or someone else, don't hesitate if you're
motivated).

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20230302/cf0c3ac8/attachment.sig>


More information about the linux-arm-kernel mailing list