<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7654.12">
<TITLE>Re: [linuxppc-release] [PATCH] Fix case where phys_addr_t != unsigned long when reading proc entries</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2>Matthew McClintock wrote:<BR>
> +unsigned long long initrd_base, initrd_size;<BR>
> +unsigned long long devicetree_base, devicetree_size;<BR>
<BR>
These should be declared uint64_t, to match the code that assigns them.<BR>
<BR>
> + if (n == 4) {<BR>
> + kernel_end = ((uint32_t *)buf)[0];<BR>
> + } else if (n == 8) {<BR>
<BR>
How about<BR>
<BR>
n == sizeof(uint32_t)<BR>
<BR>
and<BR>
<BR>
n == sizeof(uint64_t)<BR>
<BR>
?<BR>
<BR>
+ memset(fname, 0, sizeof(fname));<BR>
+ strcpy(fname, device_tree);<BR>
+ strcat(fname, dentry->d_name);<BR>
+ strcat(fname, "/linux,initrd-start");<BR>
<BR>
Why not use sprintf() instead of three strcxx calls?<BR>
<BR>
--<BR>
Timur Tabi<BR>
Linux kernel developer<BR>
</FONT>
</P>
</BODY>
</HTML>