Author: jhibbits
Date: Fri Jan  1 15:36:56 2016
New Revision: 293041
URL: https://svnweb.freebsd.org/changeset/base/293041

Log:
  Use uint32_t for LBC block size.
  
  LBC block size can only be up to 4GB.  The existing code already clamps it, 
but
  mixes unsigned long and uint32_t.  This works on 32-bit targets, but not 
64-bit,
  so isn't completely correct.  This fixes the type confusion.

Modified:
  head/sys/powerpc/mpc85xx/lbc.c

Modified: head/sys/powerpc/mpc85xx/lbc.c
==============================================================================
--- head/sys/powerpc/mpc85xx/lbc.c      Fri Jan  1 15:30:11 2016        
(r293040)
+++ head/sys/powerpc/mpc85xx/lbc.c      Fri Jan  1 15:36:56 2016        
(r293041)
@@ -126,11 +126,11 @@ lbc_address_mask(uint32_t size)
 {
        int n = 15;
 
-       if (size == ~0UL)
+       if (size == ~0)
                return (0);
 
        while (n < 32) {
-               if (size == (1UL << n))
+               if (size == (1U << n))
                        break;
                n++;
        }
@@ -267,7 +267,7 @@ lbc_banks_map(struct lbc_softc *sc)
 static int
 lbc_banks_enable(struct lbc_softc *sc)
 {
-       u_long size;
+       uint32_t size;
        uint32_t regval;
        int error, i;
 
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to