[linuxppc-release] [PATCH] Fix case where phys_addr_t != unsigned long when reading proc entries

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Matthew McClintock wrote:
> +unsigned long long initrd_base, initrd_size;
> +unsigned long long devicetree_base, devicetree_size;

These should be declared uint64_t, to match the code that assigns them.

> +				if (n == 4) {
> +					kernel_end = ((uint32_t *)buf)[0];
> +				} else if (n == 8) {

How about
	
	n == sizeof(uint32_t)

and

	n == sizeof(uint64_t)

?

+			memset(fname, 0, sizeof(fname));
+			strcpy(fname, device_tree);
+			strcat(fname, dentry->d_name);
+			strcat(fname, "/linux,initrd-start");

Why not use sprintf() instead of three strcxx calls?

-- 
Timur Tabi
Linux kernel developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/kexec/attachments/20100714/d14ac007/attachment.html>


[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux