svn commit: r293775 - head/sys/boot/uboot/lib
Ian Lepore
ian at FreeBSD.org
Tue Jan 12 16:31:09 UTC 2016
Author: ian
Date: Tue Jan 12 16:31:07 2016
New Revision: 293775
URL: https://svnweb.freebsd.org/changeset/base/293775
Log:
Cast using uintfptr_t and eliminate the cast to uint64_t which is uneeded
because rounding down cannot increase the number of bits needed to express
the result.
I had no idea there was such a thing as uintfptr_t.
Requested by: bde
Modified:
head/sys/boot/uboot/lib/copy.c
Modified: head/sys/boot/uboot/lib/copy.c
==============================================================================
--- head/sys/boot/uboot/lib/copy.c Tue Jan 12 16:21:34 2016 (r293774)
+++ head/sys/boot/uboot/lib/copy.c Tue Jan 12 16:31:07 2016 (r293775)
@@ -100,7 +100,7 @@ uboot_loadaddr(u_int type, void *data, u
biggest_block = 0;
biggest_size = 0;
- subldr = rounddown2((uint64_t)(uintptr_t)_start, KERN_ALIGN);
+ subldr = rounddown2((uintfptr_t)_start, KERN_ALIGN);
eubldr = roundup2((uint64_t)uboot_heap_end, KERN_ALIGN);
for (i = 0; i < si->mr_no; i++) {
if (si->mr[i].flags != MR_ATTR_DRAM)
More information about the svn-src-head
mailing list