Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Aug 2002 16:30:13 -0600 (MDT)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        scsi@freebsd.org
Subject:   Review
Message-ID:  <20020812.163013.28786716.imp@bsdimp.com>

next in thread | raw e-mail | index | archive | help
panic already terminates messages with \n.  There are a few in cam
that redundantly include the \n.  Here's a small patch to remove
them.  Any objections to my committing it?

Warner

Index: cam_periph.c
===================================================================
RCS file: /cache/ncvs/src/sys/cam/cam_periph.c,v
retrieving revision 1.39
diff -u -r1.39 cam_periph.c
--- cam_periph.c	7 Jun 2002 23:51:30 -0000	1.39
+++ cam_periph.c	12 Aug 2002 22:27:39 -0000
@@ -1473,7 +1473,7 @@
 			break;
 		}
 		default:
-			panic("Unhandled error action %x\n", err_action);
+			panic("Unhandled error action %x", err_action);
 		}
 		
 		if ((err_action & SS_MASK) >= SS_START) {
Index: scsi/scsi_low.c
===================================================================
RCS file: /cache/ncvs/src/sys/cam/scsi/scsi_low.c,v
retrieving revision 1.14
diff -u -r1.14 scsi_low.c
--- scsi/scsi_low.c	20 Mar 2002 08:55:21 -0000	1.14
+++ scsi/scsi_low.c	12 Aug 2002 22:28:35 -0000
@@ -1805,7 +1805,7 @@
 
 	li = SCSI_LOW_MALLOC(ti->ti_lunsize);
 	if (li == NULL)
-		panic("no lun info mem\n");
+		panic("no lun info mem");
 
 	SCSI_LOW_BZERO(li, ti->ti_lunsize);
 	li->li_lun = lun;
@@ -1847,7 +1847,7 @@
 
 	ti = SCSI_LOW_MALLOC(slp->sl_targsize);
 	if (ti == NULL)
-		panic("%s short of memory\n", slp->sl_xname);
+		panic("%s short of memory", slp->sl_xname);
 
 	SCSI_LOW_BZERO(ti, slp->sl_targsize);
 	ti->ti_id = targ;
@@ -1954,7 +1954,7 @@
 			cb->ccb_flags |= CCB_NORETRY;
 			cb->ccb_error |= SELTIMEOUTIO;
 			if (scsi_low_revoke_ccb(slp, cb, 1) != NULL)
-				panic("%s: ccb not finished\n", slp->sl_xname);
+				panic("%s: ccb not finished", slp->sl_xname);
 		}
 
 		if (slp->sl_Tnexus == NULL)
@@ -2078,7 +2078,7 @@
 	else if ((cb->ccb_flags & CCB_DISCQ) != 0)
 	{
 		if (scsi_low_revoke_ccb(slp, cb, 0) == NULL)
-			panic("%s: revoked ccb done\n", slp->sl_xname);
+			panic("%s: revoked ccb done", slp->sl_xname);
 
 		cb->ccb_flags |= CCB_STARTQ;
 		TAILQ_INSERT_HEAD(&slp->sl_start, cb, ccb_chain);
@@ -2089,7 +2089,7 @@
 	else
 	{
 		if (scsi_low_revoke_ccb(slp, cb, 1) != NULL)
-			panic("%s: revoked ccb retried\n", slp->sl_xname);
+			panic("%s: revoked ccb retried", slp->sl_xname);
 	}
 	return 0;
 }
@@ -2114,7 +2114,7 @@
 #endif	/* SCSI_LOW_INTERFACE_CAM */
 
 	if (slp->sl_osdep_fp == NULL)
-		panic("scsi_low: interface not spcified\n");
+		panic("scsi_low: interface not spcified");
 
 	if (ntargs > SCSI_LOW_NTARGETS)
 	{
@@ -2384,7 +2384,7 @@
 		return SCSI_LOW_START_QTAG;
 
 	default:
-		panic("%s: no setup phase\n", slp->sl_xname);
+		panic("%s: no setup phase", slp->sl_xname);
 	}
 
 	return SCSI_LOW_START_NO_QTAG;
@@ -2440,7 +2440,7 @@
 	if (slp->sl_Tnexus || slp->sl_Lnexus || slp->sl_Qnexus)
 	{
 		scsi_low_info(slp, NULL, "NEXUS INCOSISTENT");
-		panic("%s: inconsistent\n", slp->sl_xname);
+		panic("%s: inconsistent", slp->sl_xname);
 	}
 #endif	/* SCSI_LOW_DIAGNOSTIC */
 
@@ -3773,7 +3773,7 @@
 	cb->ccb_tag = SCSI_LOW_UNKTAG;
 	cb->ccb_otag = SCSI_LOW_UNKTAG;
 	if (scsi_low_done(slp, cb) == SCSI_LOW_DONE_RETRY)
-		panic("%s: linked ccb retried\n", slp->sl_xname);
+		panic("%s: linked ccb retried", slp->sl_xname);
 
 	slp->sl_Qnexus = ncb;
 	slp->sl_ph_count = 0;
@@ -4443,7 +4443,7 @@
 	if ((cb->ccb_flags & (CCB_STARTQ | CCB_DISCQ)) == 
 	    (CCB_STARTQ | CCB_DISCQ))
 	{
-		panic("%s: ccb in both queue\n", slp->sl_xname);
+		panic("%s: ccb in both queue", slp->sl_xname);
 	}
 #endif	/* SCSI_LOW_DIAGNOSTIC */
 
@@ -4470,7 +4470,7 @@
 		cb->ccb_error |= FATALIO;
 		cb->ccb_flags &= ~CCB_AUTOSENSE;
 		if (scsi_low_done(slp, cb) != SCSI_LOW_DONE_COMPLETE)
-			panic("%s: done ccb retried\n", slp->sl_xname);
+			panic("%s: done ccb retried", slp->sl_xname);
 		return NULL;
 	}
 	else
Index: scsi/scsi_sa.c
===================================================================
RCS file: /cache/ncvs/src/sys/cam/scsi/scsi_sa.c,v
retrieving revision 1.82
diff -u -r1.82 scsi_sa.c
--- scsi/scsi_sa.c	19 Jun 2002 20:44:48 -0000	1.82
+++ scsi/scsi_sa.c	12 Aug 2002 22:28:57 -0000
@@ -614,7 +614,7 @@
 		break;
 	default:
 		xpt_print_path(periph->path);
-		panic("unknown mode 0x%x in saclose\n", mode);
+		panic("unknown mode 0x%x in saclose", mode);
 		/* NOTREACHED */
 		break;
 	}

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-scsi" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020812.163013.28786716.imp>