Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Aug 2013 16:41:40 +0000 (UTC)
From:      "Kenneth D. Merry" <ken@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r255032 - head/sys/kern
Message-ID:  <201308291641.r7TGfemd045204@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ken
Date: Thu Aug 29 16:41:40 2013
New Revision: 255032
URL: http://svnweb.freebsd.org/changeset/base/255032

Log:
  Fix some issues in change 254760 pointed out by Bruce Evans:
  
   - Remove excessive parenthesis
   - Use KNF continuation indentation
   - Cut down on excessive continuation lines
   - More consistent style in messages
   - Use uprintf() instead of printf()
  
  Submitted by:	bde

Modified:
  head/sys/kern/kern_physio.c

Modified: head/sys/kern/kern_physio.c
==============================================================================
--- head/sys/kern/kern_physio.c	Thu Aug 29 16:26:04 2013	(r255031)
+++ head/sys/kern/kern_physio.c	Thu Aug 29 16:41:40 2013	(r255032)
@@ -58,25 +58,22 @@ physio(struct cdev *dev, struct uio *uio
 	 * If the driver does not want I/O to be split, that means that we
 	 * need to reject any requests that will not fit into one buffer.
 	 */
-	if ((dev->si_flags & SI_NOSPLIT) &&
-	    ((uio->uio_resid > dev->si_iosize_max) ||
-	     (uio->uio_resid > MAXPHYS) ||
-	     (uio->uio_iovcnt > 1))) {
+	if (dev->si_flags & SI_NOSPLIT &&
+	    (uio->uio_resid > dev->si_iosize_max || uio->uio_resid > MAXPHYS ||
+	    uio->uio_iovcnt > 1)) {
 		/*
 		 * Tell the user why his I/O was rejected.
 		 */
 		if (uio->uio_resid > dev->si_iosize_max)
-			printf("%s: request size %zd > si_iosize_max=%d, "
+			uprintf("%s: request size=%zd > si_iosize_max=%d; "
 			    "cannot split request\n", devtoname(dev),
 			    uio->uio_resid, dev->si_iosize_max);
-
 		if (uio->uio_resid > MAXPHYS)
-			printf("%s: request size %zd > MAXPHYS=%d, "
+			uprintf("%s: request size=%zd > MAXPHYS=%d; "
 			    "cannot split request\n", devtoname(dev),
 			    uio->uio_resid, MAXPHYS);
-
 		if (uio->uio_iovcnt > 1)
-			printf("%s: request vectors=%d > 1, "
+			uprintf("%s: request vectors=%d > 1; "
 			    "cannot split request\n", devtoname(dev),
 			    uio->uio_iovcnt);
 
@@ -117,8 +114,8 @@ physio(struct cdev *dev, struct uio *uio
 				 * This device does not want I/O to be split.
 				 */
 				if (dev->si_flags & SI_NOSPLIT) {
-					printf("%s: request ptr %p is not "
-					    "on a page boundary, cannot split "
+					uprintf("%s: request ptr %p is not "
+					    "on a page boundary; cannot split "
 					    "request\n", devtoname(dev),
 					    bp->b_data);
 					error = EFBIG;



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