Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Consistency use -1 instead of 1 for some error c...
details: https://anonhg.NetBSD.org/src/rev/7e18a053d4f7
branches: trunk
changeset: 368852:7e18a053d4f7
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Mon Aug 08 08:52:36 2022 +0000
description:
Consistency use -1 instead of 1 for some error code. Advised by knakahara.
diffstat:
sys/dev/pci/if_wm.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diffs (81 lines):
diff -r 495f375b6c78 -r 7e18a053d4f7 sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c Mon Aug 08 07:49:18 2022 +0000
+++ b/sys/dev/pci/if_wm.c Mon Aug 08 08:52:36 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_wm.c,v 1.755 2022/08/08 07:49:18 msaitoh Exp $ */
+/* $NetBSD: if_wm.c,v 1.756 2022/08/08 08:52:36 msaitoh Exp $ */
/*
* Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -82,7 +82,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.755 2022/08/08 07:49:18 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.756 2022/08/08 08:52:36 msaitoh Exp $");
#ifdef _KERNEL_OPT
#include "opt_net_mpsafe.h"
@@ -14567,7 +14567,7 @@
for (i = 0; i < NVM_SIZE; i++) {
if (wm_nvm_read(sc, i, 1, &eeprom_data))
- return 1;
+ return -1;
checksum += eeprom_data;
}
@@ -14917,7 +14917,7 @@
goto retry;
}
aprint_error_dev(sc->sc_dev, "could not acquire SWSM SMBI\n");
- return 1;
+ return -1;
}
/* Get the FW semaphore. */
@@ -14940,7 +14940,7 @@
"could not acquire SWSM SWESMBI\n");
/* Release semaphores */
wm_put_swsm_semaphore(sc);
- return 1;
+ return -1;
}
return 0;
}
@@ -14987,7 +14987,7 @@
aprint_error_dev(sc->sc_dev,
"%s: failed to get semaphore\n",
__func__);
- return 1;
+ return -1;
}
swfw_sync = CSR_READ(sc, WMREG_SW_FW_SYNC);
if ((swfw_sync & (swmask | fwmask)) == 0) {
@@ -15003,7 +15003,7 @@
device_printf(sc->sc_dev,
"failed to get swfw semaphore mask 0x%x swfw 0x%x\n",
mask, swfw_sync);
- return 1;
+ return -1;
}
static void
@@ -15151,7 +15151,7 @@
device_printf(sc->sc_dev,
"failed to get swfwhw semaphore ext_ctrl 0x%x\n", ext_ctrl);
mutex_exit(sc->sc_ich_phymtx); /* Use PHY mtx for both PHY and NVM */
- return 1;
+ return -1;
}
static void
@@ -15208,7 +15208,7 @@
out:
mutex_exit(sc->sc_ich_phymtx);
- return 1;
+ return -1;
}
static void
Home |
Main Index |
Thread Index |
Old Index