[PATCH] net: miiphybb: Convert ifdef DEBUG to debug()
Paul Barker
paul.barker.ct at bp.renesas.com
Tue Jan 21 13:03:41 CET 2025
On 18/01/2025 06:16, Marek Vasut wrote:
> Replace ifdeffery with plain debug() function call. No functional change.
>
> Signed-off-by: Marek Vasut <marek.vasut+renesas at mailbox.org>
> ---
> Cc: Adam Ford <aford173 at gmail.com>
> Cc: Hai Pham <hai.pham.ud at renesas.com>
> Cc: Ilias Apalodimas <ilias.apalodimas at linaro.org>
> Cc: Jerome Forissier <jerome.forissier at linaro.org>
> Cc: Joe Hershberger <joe.hershberger at ni.com>
> Cc: Mario Six <mario.six at gdsys.cc>
> Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj at renesas.com>
> Cc: Paul Barker <paul.barker.ct at bp.renesas.com>
> Cc: Peter Robinson <pbrobinson at gmail.com>
> Cc: Ramon Fried <rfried.dev at gmail.com>
> Cc: Sumit Garg <sumit.garg at linaro.org>
> Cc: Tom Rini <trini at konsulko.com>
> Cc: u-boot at lists.denx.de
> ---
> drivers/net/phy/miiphybb.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/net/phy/miiphybb.c b/drivers/net/phy/miiphybb.c
> index 171c1719b5b..5497b838225 100644
> --- a/drivers/net/phy/miiphybb.c
> +++ b/drivers/net/phy/miiphybb.c
> @@ -183,9 +183,7 @@ int bb_miiphy_read(struct mii_dev *miidev, int addr, int devad, int reg)
> bus->set_mdc(bus, 1);
> bus->delay(bus);
>
> -#ifdef DEBUG
> - printf("miiphy_read(0x%x) @ 0x%x = 0x%04x\n", reg, addr, rdreg);
> -#endif
> + debug("miiphy_read(0x%x) @ 0x%x = 0x%04x\n", reg, addr, rdreg);
>
> return rdreg;
> }
While we're here, can we include the bus name in the output to avoid
confusion when we have multiple buses? Maybe something like:
debug("miiphy_read(0x%x) @ %s:0x%x = 0x%04x\n", reg, bus->name, addr, rdreg);
Thanks,
--
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/20250121/9b9d1b89/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/20250121/9b9d1b89/attachment.sig>
More information about the U-Boot
mailing list