The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@gmail.com>
To: Marek Belisko <marek.belisko@open-nandra.com>
Cc: gregkh@suse.de, devel@driverdev.osuosl.org,
	Stano Lanci <chl.pixo@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: ft1000-pcmcia: Fix ft1000_dnld() to work also on 64bit architectures.
Date: Wed, 23 Mar 2011 11:27:16 +0100	[thread overview]
Message-ID: <4D89CB04.70003@gmail.com> (raw)
In-Reply-To: <1300864088-24438-1-git-send-email-marek.belisko@open-nandra.com>

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@gmail.com>
> Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
> 
> Tested-by: Stano Lanci <chl.pixo@gmail.com>
> ---
>  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?

Or at least the change doesn't affect code flow?

regards,
-- 
js

  reply	other threads:[~2011-03-23 10:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-23  7:08 [PATCH] staging: ft1000-pcmcia: Fix ft1000_dnld() to work also on 64bit architectures Marek Belisko
2011-03-23 10:27 ` Jiri Slaby [this message]
2011-03-23 10:36   ` Belisko Marek

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=4D89CB04.70003@gmail.com \
    --to=jirislaby@gmail.com \
    --cc=chl.pixo@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marek.belisko@open-nandra.com \
    /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