Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic Remove unused variables, use C99 open arrays for ...
details: https://anonhg.NetBSD.org/src/rev/cb54859d12a7
branches: trunk
changeset: 789963:cb54859d12a7
user: martin <martin%NetBSD.org@localhost>
date: Sat Sep 14 12:43:08 2013 +0000
description:
Remove unused variables, use C99 open arrays for variable sized arrays
diffstat:
sys/dev/ic/isp.c | 21 +++++++++------------
sys/dev/ic/ispmbox.h | 6 +++---
2 files changed, 12 insertions(+), 15 deletions(-)
diffs (116 lines):
diff -r 61e1557693f8 -r cb54859d12a7 sys/dev/ic/isp.c
--- a/sys/dev/ic/isp.c Sat Sep 14 12:39:28 2013 +0000
+++ b/sys/dev/ic/isp.c Sat Sep 14 12:43:08 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: isp.c,v 1.123 2013/02/27 09:29:21 martin Exp $ */
+/* $NetBSD: isp.c,v 1.124 2013/09/14 12:43:08 martin Exp $ */
/*
* Machine and OS Independent (well, as best as possible)
* code for the Qlogic ISP SCSI adapters.
@@ -43,7 +43,7 @@
*/
#ifdef __NetBSD__
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isp.c,v 1.123 2013/02/27 09:29:21 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isp.c,v 1.124 2013/09/14 12:43:08 martin Exp $");
#include <dev/ic/isp_netbsd.h>
#endif
#ifdef __FreeBSD__
@@ -2086,7 +2086,7 @@
fcparam *fcp;
uint8_t *scp;
uint32_t sst, parm1;
- int rval, lev;
+ int rval;
const char *msg;
char buf[64];
@@ -2160,7 +2160,6 @@
parm1 = plp->plogx_ioparm[1].lo16 | (plp->plogx_ioparm[1].hi16 << 16);
rval = -1;
- lev = ISP_LOGERR;
msg = NULL;
switch (sst) {
@@ -2200,13 +2199,11 @@
msg = buf;
break;
case PLOGX_IOCBERR_PORTUSED:
- lev = ISP_LOGSANCFG|ISP_LOGDEBUG0;
ISP_SNPRINTF(buf, sizeof (buf), "already logged in with N-Port handle 0x%x", parm1);
msg = buf;
rval = MBOX_PORT_ID_USED | (parm1 << 16);
break;
case PLOGX_IOCBERR_HNDLUSED:
- lev = ISP_LOGSANCFG|ISP_LOGDEBUG0;
ISP_SNPRINTF(buf, sizeof (buf), "handle already used for PortID 0x%06x", parm1);
msg = buf;
rval = MBOX_LOOP_ID_USED;
@@ -7818,7 +7815,7 @@
isp_rdnvram_word(ispsoftc_t *isp, int wo, uint16_t *rp)
{
int i, cbits;
- uint16_t bit, rqst, junk;
+ uint16_t bit, rqst;
ISP_WRITE(isp, BIU_NVRAM, BIU_NVRAM_SELECT);
ISP_DELAY(10);
@@ -7853,13 +7850,13 @@
}
ISP_WRITE(isp, BIU_NVRAM, bit);
ISP_DELAY(10);
- junk = ISP_READ(isp, BIU_NVRAM); /* force PCI flush */
+ (void)ISP_READ(isp, BIU_NVRAM); /* force PCI flush */
ISP_WRITE(isp, BIU_NVRAM, bit | BIU_NVRAM_CLOCK);
ISP_DELAY(10);
- junk = ISP_READ(isp, BIU_NVRAM); /* force PCI flush */
+ (void)ISP_READ(isp, BIU_NVRAM); /* force PCI flush */
ISP_WRITE(isp, BIU_NVRAM, bit);
ISP_DELAY(10);
- junk = ISP_READ(isp, BIU_NVRAM); /* force PCI flush */
+ (void)ISP_READ(isp, BIU_NVRAM); /* force PCI flush */
}
/*
* Now read the result back in (bits come back in MSB format).
@@ -7877,11 +7874,11 @@
ISP_DELAY(10);
ISP_WRITE(isp, BIU_NVRAM, BIU_NVRAM_SELECT);
ISP_DELAY(10);
- junk = ISP_READ(isp, BIU_NVRAM); /* force PCI flush */
+ (void)ISP_READ(isp, BIU_NVRAM); /* force PCI flush */
}
ISP_WRITE(isp, BIU_NVRAM, 0);
ISP_DELAY(10);
- junk = ISP_READ(isp, BIU_NVRAM); /* force PCI flush */
+ (void)ISP_READ(isp, BIU_NVRAM); /* force PCI flush */
ISP_SWIZZLE_NVRAM_WORD(isp, rp);
}
diff -r 61e1557693f8 -r cb54859d12a7 sys/dev/ic/ispmbox.h
--- a/sys/dev/ic/ispmbox.h Sat Sep 14 12:39:28 2013 +0000
+++ b/sys/dev/ic/ispmbox.h Sat Sep 14 12:43:08 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ispmbox.h,v 1.55 2010/03/26 20:52:00 mjacob Exp $ */
+/* $NetBSD: ispmbox.h,v 1.56 2013/09/14 12:43:08 martin Exp $ */
/*
* Copyright (C) 1997, 1998, 1999 National Aeronautics & Space Administration
* All rights reserved.
@@ -1450,7 +1450,7 @@
uint16_t snscb_addr[4]; /* response buffer address */
uint16_t snscb_sblen; /* subcommand buffer length (words) */
uint16_t snscb_reserved1;
- uint16_t snscb_data[1]; /* variable data */
+ uint16_t snscb_data[]; /* variable data */
} sns_screq_t; /* Subcommand Request Structure */
typedef struct {
@@ -1511,7 +1511,7 @@
uint8_t snscb_port_type;
uint8_t snscb_port_id[3];
uint8_t snscb_portname[8];
- uint16_t snscb_data[1]; /* variable data */
+ uint16_t snscb_data[]; /* variable data */
} sns_scrsp_t; /* Subcommand Response Structure */
typedef struct {
Home |
Main Index |
Thread Index |
Old Index