compile fix for drivers/mtd/redboot.c
Quoted 1 line
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
mtd/redboot.c +8 -8
@@ -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 {
Signature · 3 lines
Ben ([email protected], http://www.fluff.org/) 'a smiley only costs 4 bytes'