Module Name:    src
Committed By:   martin
Date:           Sat Sep 14 12:43:08 UTC 2013

Modified Files:
        src/sys/dev/ic: isp.c ispmbox.h

Log Message:
Remove unused variables, use C99 open arrays for variable sized arrays


To generate a diff of this commit:
cvs rdiff -u -r1.123 -r1.124 src/sys/dev/ic/isp.c
cvs rdiff -u -r1.55 -r1.56 src/sys/dev/ic/ispmbox.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/ic/isp.c
diff -u src/sys/dev/ic/isp.c:1.123 src/sys/dev/ic/isp.c:1.124
--- src/sys/dev/ic/isp.c:1.123	Wed Feb 27 09:29:21 2013
+++ src/sys/dev/ic/isp.c	Sat Sep 14 12:43:08 2013
@@ -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 @@ isp_plogx(ispsoftc_t *isp, int chan, uin
 	fcparam *fcp;
 	uint8_t *scp;
 	uint32_t sst, parm1;
-	int rval, lev;
+	int rval;
 	const char *msg;
 	char buf[64];
 
@@ -2160,7 +2160,6 @@ isp_plogx(ispsoftc_t *isp, int chan, uin
 	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 @@ isp_plogx(ispsoftc_t *isp, int chan, uin
 		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 @@ static void
 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_rdnvram_word(ispsoftc_t *isp, int wo
 		}
 		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_rdnvram_word(ispsoftc_t *isp, int wo
 		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);
 }
 

Index: src/sys/dev/ic/ispmbox.h
diff -u src/sys/dev/ic/ispmbox.h:1.55 src/sys/dev/ic/ispmbox.h:1.56
--- src/sys/dev/ic/ispmbox.h:1.55	Fri Mar 26 20:52:00 2010
+++ src/sys/dev/ic/ispmbox.h	Sat Sep 14 12:43:08 2013
@@ -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 @@ typedef struct {
 	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 @@ typedef struct {
 	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 {

Reply via email to