Author: ian
Date: Sat Nov 15 02:58:17 2014
New Revision: 274536
URL: https://svnweb.freebsd.org/changeset/base/274536

Log:
  Use the standard powerof2() macro from param.h instead of a local one.
  
  Pointed out by:        jhb@

Modified:
  head/sys/arm/arm/busdma_machdep-v6.c

Modified: head/sys/arm/arm/busdma_machdep-v6.c
==============================================================================
--- head/sys/arm/arm/busdma_machdep-v6.c        Sat Nov 15 01:18:49 2014        
(r274535)
+++ head/sys/arm/arm/busdma_machdep-v6.c        Sat Nov 15 02:58:17 2014        
(r274536)
@@ -64,8 +64,6 @@ __FBSDID("$FreeBSD$");
 #include <machine/cpufunc.h>
 #include <machine/md_var.h>
 
-#define        IS_POWER_OF_2(val)      (((val) & ((val) - 1)) == 0)
-
 #define MAX_BPAGES 64
 #define MAX_DMA_SEGMENTS       4096
 #define BUS_DMA_EXCL_BOUNCE    BUS_DMA_BUS2
@@ -469,11 +467,11 @@ bus_dma_tag_create(bus_dma_tag_t parent,
 #endif
 
        /* Basic sanity checking. */
-       KASSERT(boundary == 0 || IS_POWER_OF_2(boundary),
+       KASSERT(boundary == 0 || powerof2(boundary),
            ("dma tag boundary %lu, must be a power of 2", boundary));
        KASSERT(boundary == 0 || boundary >= maxsegsz,
            ("dma tag boundary %lu is < maxsegsz %lu\n", boundary, maxsegsz));
-       KASSERT(alignment != 0 && IS_POWER_OF_2(alignment),
+       KASSERT(alignment != 0 && powerof2(alignment),
            ("dma tag alignment %lu, must be non-zero power of 2", alignment));
        KASSERT(maxsegsz != 0, ("dma tag maxsegsz must not be zero"));
 
_______________________________________________
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