Page MenuHomeFreeBSD

D55575.id177324.diff
No OneTemporary

D55575.id177324.diff

diff --git a/sys/dev/thunderbolt/nhi.c b/sys/dev/thunderbolt/nhi.c
--- a/sys/dev/thunderbolt/nhi.c
+++ b/sys/dev/thunderbolt/nhi.c
@@ -788,8 +788,11 @@
int
nhi_tx_synchronous(struct nhi_ring_pair *r, struct nhi_cmd_frame *cmd)
{
+ struct nhi_softc *sc __diagused;
int error, count;
+ sc = r->sc;
+
if ((error = nhi_tx_schedule(r, cmd)) != 0)
return (error);
@@ -812,16 +815,16 @@
if ((cmd->flags & CMD_REQ_COMPLETE) == 0)
error = ETIMEDOUT;
- tb_debug(r->sc, DBG_TXQ|DBG_FULL, "tx_synchronous done waiting, "
+ tb_debug(sc, DBG_TXQ|DBG_FULL, "tx_synchronous done waiting, "
"err= %d, TX_COMPLETE= %d\n", error,
!!(cmd->flags & CMD_REQ_COMPLETE));
if (error == ERESTART) {
- tb_printf(r->sc, "TX command interrupted\n");
+ tb_printf(sc, "TX command interrupted\n");
} else if ((error == EWOULDBLOCK) || (error == ETIMEDOUT)) {
- tb_printf(r->sc, "TX command timed out\n");
+ tb_printf(sc, "TX command timed out\n");
} else if (error != 0) {
- tb_printf(r->sc, "TX command failed error= %d\n", error);
+ tb_printf(sc, "TX command failed error= %d\n", error);
}
return (error);
@@ -831,7 +834,7 @@
nhi_tx_complete(struct nhi_ring_pair *r, struct nhi_tx_buffer_desc *desc,
struct nhi_cmd_frame *cmd)
{
- struct nhi_softc *sc;
+ struct nhi_softc *sc __diagused;
struct nhi_pdf_dispatch *txpdf;
u_int sof;
@@ -865,9 +868,10 @@
nhi_rx_complete(struct nhi_ring_pair *r, struct nhi_rx_post_desc *desc,
struct nhi_cmd_frame *cmd)
{
- struct nhi_softc *sc;
+ struct nhi_softc *sc __diagused;
struct nhi_pdf_dispatch *rxpdf;
- u_int eof, len;
+ u_int eof;
+ u_int len __diagused;
sc = r->sc;
eof = desc->eof_len >> RX_BUFFER_DESC_EOF_SHIFT;
diff --git a/sys/dev/thunderbolt/router.c b/sys/dev/thunderbolt/router.c
--- a/sys/dev/thunderbolt/router.c
+++ b/sys/dev/thunderbolt/router.c
@@ -277,7 +277,8 @@
{
struct tb_cfg_router *cfg;
uint32_t *buf;
- int error, up;
+ int error;
+ int up __diagused;
buf = malloc(9 * 4, M_THUNDERBOLT, M_NOWAIT|M_ZERO);
if (buf == NULL)
@@ -297,8 +298,9 @@
sc->uuid[1] = cfg->uuid_hi;
sc->uuid[2] = 0xffffffff;
sc->uuid[3] = 0xffffffff;
- tb_debug(sc, DBG_ROUTER, "Router upstream_port= %d, max_port= %d, "
- "depth= %d\n", up, sc->max_adap, sc->depth);
+ tb_debug(sc, DBG_ROUTER,
+ "Router upstream_port= %d, max_port= %d, depth= %d\n",
+ up, sc->max_adap, sc->depth);
free(buf, M_THUNDERBOLT);
/* Downstream adapters are indexed in the array allocated here. */
@@ -718,7 +720,8 @@
struct router_softc *sc;
struct router_command *cmd;
struct tb_cfg_notify event;
- u_int ev, adap;
+ u_int adap __diagused;
+ u_int ev;
KASSERT(context != NULL, ("context cannot be NULL\n"));
diff --git a/sys/dev/thunderbolt/tb_acpi_pcib.c b/sys/dev/thunderbolt/tb_acpi_pcib.c
--- a/sys/dev/thunderbolt/tb_acpi_pcib.c
+++ b/sys/dev/thunderbolt/tb_acpi_pcib.c
@@ -120,7 +120,7 @@
ACPI_OBJECT_LIST list;
ACPI_OBJECT arg;
ACPI_BUFFER buf;
- ACPI_STATUS s;
+ ACPI_STATUS s __diagused;
tb_debug(sc, DBG_BRIDGE, "Executing OSUP\n");
diff --git a/sys/dev/thunderbolt/tb_debug.h b/sys/dev/thunderbolt/tb_debug.h
--- a/sys/dev/thunderbolt/tb_debug.h
+++ b/sys/dev/thunderbolt/tb_debug.h
@@ -81,7 +81,7 @@
*/
void tbdbg_dprintf(device_t dev, u_int debug, u_int val, const char *fmt, ...) __printflike(4, 5);
-#if defined(THUNDERBOLT_DEBUG) && (THUNDERBOLT_DEBUG > 0)
+#ifdef THUNDERBOLT_DEBUG
#define tb_debug(sc, level, fmt...) \
tbdbg_dprintf((sc)->dev, (sc)->debug, level, ##fmt)
#else
diff --git a/sys/dev/thunderbolt/tb_debug.c b/sys/dev/thunderbolt/tb_debug.c
--- a/sys/dev/thunderbolt/tb_debug.c
+++ b/sys/dev/thunderbolt/tb_debug.c
@@ -206,7 +206,7 @@
tb_debug_sysctl(SYSCTL_HANDLER_ARGS)
{
struct sbuf *sbuf;
-#if defined (THUNDERBOLT_DEBUG) && (THUNDERBOLT_DEBUG > 0)
+#ifdef THUNDERBOLT_DEBUG
struct tb_debug_string *string;
char *buffer;
size_t sz;
@@ -221,7 +221,7 @@
sbuf = sbuf_new_for_sysctl(NULL, NULL, 128, req);
-#if defined (THUNDERBOLT_DEBUG) && (THUNDERBOLT_DEBUG > 0)
+#ifdef THUNDERBOLT_DEBUG
debug = (u_int *)arg1;
sbuf_printf(sbuf, "%#x", *debug);
@@ -317,7 +317,7 @@
void
tbdbg_dprintf(device_t dev, u_int debug, u_int val, const char *fmt, ...)
{
-#if defined(THUNDERBOLT_DEBUG) && (THUNDERBOLT_DEBUG > 0)
+#ifdef THUNDERBOLT_DEBUG
va_list ap;
u_int lvl, dbg;
diff --git a/sys/dev/thunderbolt/tb_pcib.c b/sys/dev/thunderbolt/tb_pcib.c
--- a/sys/dev/thunderbolt/tb_pcib.c
+++ b/sys/dev/thunderbolt/tb_pcib.c
@@ -304,7 +304,7 @@
tb_pcib_detach(device_t dev)
{
struct tb_pcib_softc *sc;
- int error;
+ int error __diagused;
sc = device_get_softc(dev);

File Metadata

Mime Type
text/plain
Expires
Thu, May 14, 7:22 PM (5 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33055948
Default Alt Text
D55575.id177324.diff (4 KB)

Event Timeline