* compile fix for drivers/mtd/redboot.c
@ 2006-03-30 17:16 Ben Dooks
0 siblings, 0 replies; only message in thread
From: Ben Dooks @ 2006-03-30 17:16 UTC (permalink / raw)
To: linux-mtd
>From the current kernel build, the following errors are
comming from drivers/mtd/redboot.c:
In function 'parse_redboot_partitions':
107: warning: passing argument 1 of '__swab32s' from incompatible pointer type
108: warning: passing argument 1 of '__swab32s' from incompatible pointer type
109: warning: passing argument 1 of '__swab32s' from incompatible pointer type
110: warning: passing argument 1 of '__swab32s' from incompatible pointer type
111: warning: passing argument 1 of '__swab32s' from incompatible pointer type
112: warning: passing argument 1 of '__swab32s' from incompatible pointer type
113: warning: passing argument 1 of '__swab32s' from incompatible pointer type
I belive the best way to fix this is to change the
`unsigned long` declerations in `struct fis_image_desc`
to __u32, which is what swab32s() expects to see, and
is more specific that `unsigned long`.
Should I commit the following patch to the CVS?
Index: drivers/mtd/redboot.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/redboot.c,v
retrieving revision 1.20
diff -u -r1.20 redboot.c
--- drivers/mtd/redboot.c 29 Mar 2006 08:43:21 -0000 1.20
+++ drivers/mtd/redboot.c 30 Mar 2006 17:15:03 -0000
@@ -15,14 +15,14 @@
struct fis_image_desc {
unsigned char name[16]; // Null terminated name
- unsigned long flash_base; // Address within FLASH of image
- unsigned long mem_base; // Address in memory where it executes
- unsigned long size; // Length of image
- unsigned long entry_point; // Execution entry point
- unsigned long data_length; // Length of actual data
- unsigned char _pad[256-(16+7*sizeof(unsigned long))];
- unsigned long desc_cksum; // Checksum over image descriptor
- unsigned long file_cksum; // Checksum over image data
+ __u32 flash_base; // Address within FLASH of image
+ __u32 mem_base; // Address in memory where it executes
+ __u32 size; // Length of image
+ __u32 entry_point; // Execution entry point
+ __u32 data_length; // Length of actual data
+ __u32 _pad[256-(16+7*sizeof(__u32))];
+ __u32 desc_cksum; // Checksum over image descriptor
+ __u32 file_cksum; // Checksum over image data
};
struct fis_list {
--
Ben (ben@fluff.org, http://www.fluff.org/)
'a smiley only costs 4 bytes'
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-03-30 17:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-30 17:16 compile fix for drivers/mtd/redboot.c Ben Dooks
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox