Module Name:    src
Committed By:   jdolecek
Date:           Wed Jul 29 13:03:36 UTC 2020

Modified Files:
        src/sys/dev/pci: xmm7360.c

Log Message:
fix xmm7360_os_msleep() macro to actually work when not wrapped inside a block

from genua


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/pci/xmm7360.c

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/pci/xmm7360.c
diff -u src/sys/dev/pci/xmm7360.c:1.5 src/sys/dev/pci/xmm7360.c:1.6
--- src/sys/dev/pci/xmm7360.c:1.5	Wed Jul 29 13:01:19 2020
+++ src/sys/dev/pci/xmm7360.c	Wed Jul 29 13:03:36 2020
@@ -74,7 +74,7 @@ MODULE_DEVICE_TABLE(pci, xmm7360_ids);
 #include "opt_gateway.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xmm7360.c,v 1.5 2020/07/29 13:01:19 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xmm7360.c,v 1.6 2020/07/29 13:03:36 jdolecek Exp $");
 #endif
 
 #include <sys/param.h>
@@ -286,9 +286,11 @@ typedef struct kmutex spinlock_t;
 		return -error;				\
 	__ret;						\
 })
-#define xmm7360_os_msleep(msec)				\
-		KASSERT(!cold);				\
-		tsleep(xmm, 0, "wwancsl", msec * hz / 1000)
+#define xmm7360_os_msleep(msec)					\
+	do {							\
+		KASSERT(!cold);					\
+		tsleep(xmm, 0, "wwancsl", msec * hz / 1000);	\
+	} while (0)
 
 static void *dma_alloc_coherent(struct device *, size_t, dma_addr_t *, int);
 static void dma_free_coherent(struct device *, size_t, volatile void *, dma_addr_t);

Reply via email to