Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Jan 2016 15:36:57 +0000 (UTC)
From:      Justin Hibbits <jhibbits@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r293041 - head/sys/powerpc/mpc85xx
Message-ID:  <201601011536.u01Favhj085145@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;
 



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