On Wed, Mar 23, 2011 at 11:27 AM, Jiri Slaby <jirislaby@xxxxxxxxx> wrote: > On 03/23/2011 08:08 AM, Marek Belisko wrote: >> From: pixo <pixo@pixo-LIFEBOOK-E8310.(none)> >> >> Firmware file needs to be read by 4bytes also on 64 bit architectures. >> Change long type to u32 and also extend checking. Tested on 32 and also >> 64 bit architectures. >> >> Signed-off-by: Stano Lanci <chl.pixo@xxxxxxxxx> >> Signed-off-by: Marek Belisko <marek.belisko@xxxxxxxxxxxxxxx> >> >> Tested-by: Stano Lanci <chl.pixo@xxxxxxxxx> >> --- >> Âdrivers/staging/ft1000/ft1000-pcmcia/ft1000_dnld.c | Â 78 ++++++++++---------- >> Â1 files changed, 39 insertions(+), 39 deletions(-) >> >> diff --git a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_dnld.c b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_dnld.c >> index b0729fc..fb375ea 100644 >> --- a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_dnld.c >> +++ b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_dnld.c >> @@ -95,47 +95,47 @@ void put_request_value(struct net_device *dev, long lvalue); >> ÂUSHORT hdr_checksum(PPSEUDO_HDR pHdr); >> >> Âtypedef struct _DSP_FILE_HDR { >> - Â Â long build_date; >> - Â Â long dsp_coff_date; >> - Â Â long loader_code_address; >> - Â Â long loader_code_size; >> - Â Â long loader_code_end; >> - Â Â long dsp_code_address; >> - Â Â long dsp_code_size; >> - Â Â long dsp_code_end; >> - Â Â long reserved[8]; >> + Â Â u32 Âbuild_date; >> + Â Â u32 Âdsp_coff_date; >> + Â Â u32 Âloader_code_address; >> + Â Â u32 Âloader_code_size; >> + Â Â u32 Âloader_code_end; >> + Â Â u32 Âdsp_code_address; >> + Â Â u32 Âdsp_code_size; >> + Â Â u32 Âdsp_code_end; >> + Â Â u32 Âreserved[8]; >> Â} __attribute__ ((packed)) DSP_FILE_HDR, *PDSP_FILE_HDR; > > As you also changed signedness, did you check (or do you know) that the > values cannot be negative? No structures represent FW part and non of values could be negative. This is bug from old implementation. > > Or at least the change doesn't affect code flow? > > regards, > -- > js > regards, marek -- as simple and primitive as possible ------------------------------------------------- Marek Belisko - OPEN-NANDRA Freelance Developer Ruska Nova Ves 219 | Presov, 08005 Slovak Republic Tel: +421 915 052 184 skype: marekwhite icq: 290551086 web: http://open-nandra.com _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel