Author: luigi
Date: Fri Jan 13 11:58:06 2012
New Revision: 230058
URL: http://svn.freebsd.org/changeset/base/230058

Log:
  indentation and whitespace fixes

Modified:
  head/sys/dev/netmap/netmap.c
  head/sys/dev/netmap/netmap_kern.h

Modified: head/sys/dev/netmap/netmap.c
==============================================================================
--- head/sys/dev/netmap/netmap.c        Fri Jan 13 11:10:17 2012        
(r230057)
+++ head/sys/dev/netmap/netmap.c        Fri Jan 13 11:58:06 2012        
(r230058)
@@ -1056,6 +1056,7 @@ netmap_poll(__unused struct cdev *dev, i
        struct netmap_kring *kring;
        u_int core_lock, i, check_all, want_tx, want_rx, revents = 0;
        void *adapter;
+       enum {NO_CL, NEED_CL, LOCKED_CL }; /* see below */
 
        if (devfs_get_cdevpriv((void **)&priv) != 0 || priv == NULL)
                return POLLERR;
@@ -1130,8 +1131,7 @@ netmap_poll(__unused struct cdev *dev, i
         *              to remember to release the lock once done.
         * LOCKED_CL    core lock is set, so we need to release it.
         */
-       enum {NO_CL, NEED_CL, LOCKED_CL };
-       core_lock = (check_all || !na->separate_locks) ?  NEED_CL:NO_CL;
+       core_lock = (check_all || !na->separate_locks) ? NEED_CL : NO_CL;
        /*
         * We start with a lock free round which is good if we have
         * data available. If this fails, then lock and call the sync

Modified: head/sys/dev/netmap/netmap_kern.h
==============================================================================
--- head/sys/dev/netmap/netmap_kern.h   Fri Jan 13 11:10:17 2012        
(r230057)
+++ head/sys/dev/netmap/netmap_kern.h   Fri Jan 13 11:58:06 2012        
(r230058)
@@ -39,13 +39,13 @@ MALLOC_DECLARE(M_NETMAP);
 #endif
 
 #define ND(format, ...)
-#define D(format, ...)                                 \
-       do {                                            \
-               struct timeval __xxts;                  \
+#define D(format, ...)                                         \
+       do {                                                    \
+               struct timeval __xxts;                          \
                microtime(&__xxts);                             \
-               printf("%03d.%06d %s [%d] " format "\n",\
-               (int)__xxts.tv_sec % 1000, (int)__xxts.tv_usec,         \
-               __FUNCTION__, __LINE__, ##__VA_ARGS__); \
+               printf("%03d.%06d %s [%d] " format "\n",        \
+               (int)__xxts.tv_sec % 1000, (int)__xxts.tv_usec, \
+               __FUNCTION__, __LINE__, ##__VA_ARGS__);         \
        } while (0)
  
 struct netmap_adapter;
@@ -197,7 +197,7 @@ enum {                                  
 
 /* Callback invoked by the dma machinery after a successfull dmamap_load */
 static void netmap_dmamap_cb(__unused void *arg,
-       __unused bus_dma_segment_t * segs, __unused int nseg, __unused int 
error)
+    __unused bus_dma_segment_t * segs, __unused int nseg, __unused int error)
 {
 }
 
@@ -209,7 +209,7 @@ netmap_load_map(bus_dma_tag_t tag, bus_d
 {
        if (map)
                bus_dmamap_load(tag, map, buf, NETMAP_BUF_SIZE,
-                       netmap_dmamap_cb, NULL, BUS_DMA_NOWAIT);
+                   netmap_dmamap_cb, NULL, BUS_DMA_NOWAIT);
 }
 
 /* update the map when a buffer changes. */
@@ -219,7 +219,7 @@ netmap_reload_map(bus_dma_tag_t tag, bus
        if (map) {
                bus_dmamap_unload(tag, map);
                bus_dmamap_load(tag, map, buf, NETMAP_BUF_SIZE,
-                       netmap_dmamap_cb, NULL, BUS_DMA_NOWAIT);
+                   netmap_dmamap_cb, NULL, BUS_DMA_NOWAIT);
        }
 }
 
@@ -227,7 +227,6 @@ netmap_reload_map(bus_dma_tag_t tag, bus
 /*
  * NMB return the virtual address of a buffer (buffer 0 on bad index)
  * PNMB also fills the physical address
- * XXX this is a special version with hardwired 2k bufs
  */
 static inline void *
 NMB(struct netmap_slot *slot)
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to