Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/atari/vme No need to print errors via aprint_error(...



details:   https://anonhg.NetBSD.org/src/rev/126f1e2e4d68
branches:  trunk
changeset: 368146:126f1e2e4d68
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Sat Jun 25 22:38:43 2022 +0000

description:
No need to print errors via aprint_error(9) in probe/match function.

Note aprint_error(9) triggers "WARNING: 1 error while detecting hardware"
message after device configuration, so it's a bit confusing for users.
Also check all possible variants even if bus_space_map(9) fails
(though now it shouldn't fail).

diffstat:

 sys/arch/atari/vme/if_le_vme.c |  10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diffs (38 lines):

diff -r 9081b6f03de4 -r 126f1e2e4d68 sys/arch/atari/vme/if_le_vme.c
--- a/sys/arch/atari/vme/if_le_vme.c    Sat Jun 25 22:31:09 2022 +0000
+++ b/sys/arch/atari/vme/if_le_vme.c    Sat Jun 25 22:38:43 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_le_vme.c,v 1.32 2022/06/25 22:31:09 tsutsui Exp $   */
+/*     $NetBSD: if_le_vme.c,v 1.33 2022/06/25 22:38:43 tsutsui Exp $   */
 
 /*-
  * Copyright (c) 1998 maximum entropy.  All rights reserved.
@@ -74,7 +74,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_le_vme.c,v 1.32 2022/06/25 22:31:09 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_le_vme.c,v 1.33 2022/06/25 22:38:43 tsutsui Exp $");
 
 #include "opt_inet.h"
 
@@ -233,8 +233,7 @@
 
                if (bus_space_map(iot, le_ap->reg_addr, le_ap->reg_size, 0,
                    &ioh)) {
-                       aprint_error("leprobe: cannot map io-area\n");
-                       return 0;
+                       continue;
                }
                if (le_ap->mem_size == VMECF_MEMSIZ_DEFAULT) {
                        if (bvme410_probe(iot, ioh)) {
@@ -252,8 +251,7 @@
                if (bus_space_map(memt, le_ap->mem_addr, le_ap->mem_size, 0,
                    &memh)) {
                        bus_space_unmap(iot, ioh, le_ap->reg_size);
-                       aprint_error("leprobe: cannot map memory-area\n");
-                       return 0;
+                       continue;
                }
                found = probe_addresses(&iot, &memt, &ioh, &memh);
                bus_space_unmap(iot, ioh, le_ap->reg_size);



Home | Main Index | Thread Index | Old Index