[PATCH v2 19/24] net: miiphybb: Use container_of() in bb_miiphy_getbus()

Paul Barker paul.barker.ct at bp.renesas.com
Mon Feb 17 12:10:51 CET 2025


On 09/02/2025 12:01, Marek Vasut wrote:
> Replace the name based look up in bb_miiphy_getbus() with trivial
> container_of() call. This works because the struct bb_miiphy_bus
> always embeds the matching struct mii_dev . This also makes the
> code much simpler and more efficient.
> 
> Signed-off-by: Marek Vasut <marek.vasut+renesas at mailbox.org>

Reviewed-by: Paul Barker <paul.barker.ct at bp.renesas.com>

-- 
Paul Barker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0x27F4B3459F002257.asc
Type: application/pgp-keys
Size: 3520 bytes
Desc: OpenPGP public key
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20250217/247d07a0/attachment.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 236 bytes
Desc: OpenPGP digital signature
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20250217/247d07a0/attachment.sig>


More information about the U-Boot mailing list