powerpc/legacy_serial: cache serial port and info in add_legacy_port()
authorJiri Slaby (SUSE) <jirislaby@kernel.org>
Wed, 11 Jun 2025 10:02:48 +0000 (12:02 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Jun 2025 11:42:33 +0000 (13:42 +0200)
commit2c35a83b11123591fecd792744834082d037bd4f
tree3bb9e0cb59035c2e75a9d620b2aa97fd3c09d0b6
parent2b5eac0f8c6e79bc152c8804f9f88d16717013ab
powerpc/legacy_serial: cache serial port and info in add_legacy_port()

Caching the port and info in local variables makes the code more compact
and easier to understand.

Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: linuxppc-dev@lists.ozlabs.org
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20250611100319.186924-3-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/kernel/legacy_serial.c