Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Jul 2015 22:09:48 +0000 (UTC)
From:      Zbigniew Bodek <zbb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r285293 - head/sys/sys
Message-ID:  <201507082209.t68M9mIi077630@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: zbb
Date: Wed Jul  8 22:09:47 2015
New Revision: 285293
URL: https://svnweb.freebsd.org/changeset/base/285293

Log:
  Style cleanups after r285270
  
  There should be no semicolons in added macro definitions.
  Define empty macro as "do {} while (0)".
  
  Pointed out by: jmg

Modified:
  head/sys/sys/bus_dma.h

Modified: head/sys/sys/bus_dma.h
==============================================================================
--- head/sys/sys/bus_dma.h	Wed Jul  8 21:32:57 2015	(r285292)
+++ head/sys/sys/bus_dma.h	Wed Jul  8 22:09:47 2015	(r285293)
@@ -289,18 +289,18 @@ void bus_dmamem_free(bus_dma_tag_t dmat,
  */
 void _bus_dmamap_sync(bus_dma_tag_t, bus_dmamap_t, bus_dmasync_op_t);
 #if defined(__arm__)
-	#define __BUS_DMAMAP_SYNC_DEFAULT		mb();
+	#define __BUS_DMAMAP_SYNC_DEFAULT		mb()
 #elif defined(__aarch64__)
-	#define	__BUS_DMAMAP_SYNC_DEFAULT		dmb(sy);
+	#define	__BUS_DMAMAP_SYNC_DEFAULT		dmb(sy)
 #else
-	#define	__BUS_DMAMAP_SYNC_DEFAULT		{}
+	#define	__BUS_DMAMAP_SYNC_DEFAULT		do {} while (0)
 #endif
 #define bus_dmamap_sync(dmat, dmamap, op) 			\
 	do {							\
 		if ((dmamap) != NULL)				\
 			_bus_dmamap_sync(dmat, dmamap, op);	\
 		else						\
-			__BUS_DMAMAP_SYNC_DEFAULT		\
+			__BUS_DMAMAP_SYNC_DEFAULT;		\
 	} while (0)
 
 /*



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