From: Ben Dooks <ben-mtd@fluff.org>
To: linux-mtd@lists.infradead.org
Subject: compile fix for drivers/mtd/redboot.c
Date: Thu, 30 Mar 2006 18:16:08 +0100 [thread overview]
Message-ID: <20060330171608.GA30647@home.fluff.org> (raw)
>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'
reply other threads:[~2006-03-30 17:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060330171608.GA30647@home.fluff.org \
--to=ben-mtd@fluff.org \
--cc=linux-mtd@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox