Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Dec 2012 12:53:46 +0000 (UTC)
From:      Attilio Rao <attilio@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r244733 - head/sys/sys
Message-ID:  <201212271253.qBRCrkwp080595@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: attilio
Date: Thu Dec 27 12:53:46 2012
New Revision: 244733
URL: http://svnweb.freebsd.org/changeset/base/244733

Log:
  Remove an unused var.
  
  Sponsored by:	EMC / Isilon storage division
  MFC after:	3 days

Modified:
  head/sys/sys/buf_ring.h

Modified: head/sys/sys/buf_ring.h
==============================================================================
--- head/sys/sys/buf_ring.h	Thu Dec 27 12:36:58 2012	(r244732)
+++ head/sys/sys/buf_ring.h	Thu Dec 27 12:53:46 2012	(r244733)
@@ -77,7 +77,6 @@ buf_ring_enqueue(struct buf_ring *br, vo
 {
 	uint32_t prod_head, prod_next;
 	uint32_t cons_tail;
-	int success;
 #ifdef DEBUG_BUFRING
 	int i;
 	for (i = br->br_cons_head; i != br->br_prod_head;
@@ -98,10 +97,7 @@ buf_ring_enqueue(struct buf_ring *br, vo
 			critical_exit();
 			return (ENOBUFS);
 		}
-		
-		success = atomic_cmpset_int(&br->br_prod_head, prod_head,
-		    prod_next);
-	} while (success == 0);
+	} while (!atomic_cmpset_int(&br->br_prod_head, prod_head, prod_next));
 #ifdef DEBUG_BUFRING
 	if (br->br_ring[prod_head] != NULL)
 		panic("dangling value in enqueue");



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