]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
net: use log_err() for 'No ethernet found' message
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Mon, 14 Sep 2020 09:00:18 +0000 (11:00 +0200)
committerTom Rini <trini@konsulko.com>
Wed, 30 Sep 2020 20:48:18 +0000 (16:48 -0400)
Write the 'No ethernet found' message via the log drivers. This allows
suppressing it during output via the syslog driver.

This fixes the problem reported in:

[PATCH 0/4] log: Fix the syslog spam when running tests
https://lists.denx.de/pipermail/u-boot/2020-September/426343.html

Reported-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
net/eth-uclass.c
net/eth_legacy.c

index 0d9b75a9a20a1e4fab1bc268471e257952b65a16..396418eb390680d34da109d25003d692b186dc91 100644 (file)
@@ -273,7 +273,7 @@ int eth_init(void)
        if (!current) {
                current = eth_get_dev();
                if (!current) {
-                       printf("No ethernet found.\n");
+                       log_err("No ethernet found.\n");
                        return -ENODEV;
                }
        }
@@ -414,7 +414,7 @@ int eth_initialize(void)
         */
        uclass_first_device_check(UCLASS_ETH, &dev);
        if (!dev) {
-               printf("No ethernet found.\n");
+               log_err("No ethernet found.\n");
                bootstage_error(BOOTSTAGE_ID_NET_ETH_START);
        } else {
                char *ethprime = env_get("ethprime");
@@ -449,7 +449,7 @@ int eth_initialize(void)
                } while (dev);
 
                if (!num_devices)
-                       printf("No ethernet found.\n");
+                       log_err("No ethernet found.\n");
                putc('\n');
        }
 
index 992d1880bf3eb7ac30a2fdd4eb7885d845659717..6e0c0587616f61d1d8ef5953c6856d6b4a663077 100644 (file)
@@ -261,7 +261,7 @@ int eth_initialize(void)
        }
 
        if (!eth_devices) {
-               puts("No ethernet found.\n");
+               log_err("No ethernet found.\n");
                bootstage_error(BOOTSTAGE_ID_NET_ETH_START);
        } else {
                struct eth_device *dev = eth_devices;
@@ -319,7 +319,7 @@ int eth_init(void)
        struct eth_device *old_current;
 
        if (!eth_current) {
-               puts("No ethernet found.\n");
+               log_err("No ethernet found.\n");
                return -ENODEV;
        }