aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/boot/mktree.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/boot/mktree.c')
-rw-r--r--arch/powerpc/boot/mktree.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/powerpc/boot/mktree.c b/arch/powerpc/boot/mktree.c
index 45d06a8c7cd1..c2baae0a3d89 100644
--- a/arch/powerpc/boot/mktree.c
+++ b/arch/powerpc/boot/mktree.c
@@ -42,7 +42,7 @@ int main(int argc, char *argv[])
42{ 42{
43 int in_fd, out_fd; 43 int in_fd, out_fd;
44 int nblks, i; 44 int nblks, i;
45 uint cksum, *cp; 45 unsigned int cksum, *cp;
46 struct stat st; 46 struct stat st;
47 boot_block_t bt; 47 boot_block_t bt;
48 48
@@ -90,7 +90,7 @@ int main(int argc, char *argv[])
90 90
91 cksum = 0; 91 cksum = 0;
92 cp = (void *)&bt; 92 cp = (void *)&bt;
93 for (i=0; i<sizeof(bt)/sizeof(uint); i++) 93 for (i = 0; i < sizeof(bt) / sizeof(unsigned int); i++)
94 cksum += *cp++; 94 cksum += *cp++;
95 95
96 /* Assume zImage is an ELF file, and skip the 64K header. 96 /* Assume zImage is an ELF file, and skip the 64K header.
@@ -101,7 +101,7 @@ int main(int argc, char *argv[])
101 exit(4); 101 exit(4);
102 } 102 }
103 103
104 if ((*(uint *)tmpbuf) != htonl(0x7f454c46)) { 104 if ((*(unsigned int *)tmpbuf) != htonl(0x7f454c46)) {
105 fprintf(stderr, "%s is not an ELF image\n", argv[1]); 105 fprintf(stderr, "%s is not an ELF image\n", argv[1]);
106 exit(4); 106 exit(4);
107 } 107 }
@@ -125,8 +125,8 @@ int main(int argc, char *argv[])
125 perror("zImage read"); 125 perror("zImage read");
126 exit(5); 126 exit(5);
127 } 127 }
128 cp = (uint *)tmpbuf; 128 cp = (unsigned int *)tmpbuf;
129 for (i=0; i<sizeof(tmpbuf)/sizeof(uint); i++) 129 for (i = 0; i < sizeof(tmpbuf) / sizeof(unsigned int); i++)
130 cksum += *cp++; 130 cksum += *cp++;
131 if (write(out_fd, tmpbuf, sizeof(tmpbuf)) != sizeof(tmpbuf)) { 131 if (write(out_fd, tmpbuf, sizeof(tmpbuf)) != sizeof(tmpbuf)) {
132 perror("boot-image write"); 132 perror("boot-image write");