All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] jedec_flash: Fix compilation warning in jedec_flash.c
Date: Tue, 27 Jan 2009 06:16:52 +0100	[thread overview]
Message-ID: <200901270616.52557.sr@denx.de> (raw)
In-Reply-To: <20090126194402.B4D7B832E416@gemini.denx.de>

Hi Wolfgang,

On Monday 26 January 2009, Wolfgang Denk wrote:
> > diff --git a/drivers/mtd/jedec_flash.c b/drivers/mtd/jedec_flash.c
> > index 2d99d4d..879f25e 100644
> > --- a/drivers/mtd/jedec_flash.c
> > +++ b/drivers/mtd/jedec_flash.c
> > @@ -172,7 +172,7 @@ struct amd_flash_info {
> >  static const struct amd_flash_info jedec_table[] = {
> >  #ifdef CONFIG_SYS_FLASH_LEGACY_256Kx8
> >  	{
> > -		.mfr_id		= MANUFACTURER_SST,
> > +		.mfr_id		= (u16)MANUFACTURER_SST,
>
> Which toolchain is throwing which exact warnings here? For which
> board?
>
> I don't think this should be needed. MANUFACTURER_SST is defined as
> 0x00BF - this hsould give no conflicts here.

Your correct this line doesn't give a waring. The toolchain is ELDK
4.2. But the warning is "only" in line 219:

[stefan at kubuntu u-boot (master)]$ ./MAKEALL hcu4
Configuring for hcu4 board...
jedec_flash.c:219: warning: large integer implicitly truncated to unsigned type

Some of the manufacturer defines are defined (again) 16bit wide
in jedec_flash.c, and one (STM_MANUFACT) is defined 32bit wide
in include/flash.h (0x00200020). 

Perhaps its better to remove those double manufacturer defines from
jedec_flash.c? Just let me know if you would prefer such a version
and I will generate a patch for it.

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================

      reply	other threads:[~2009-01-27  5:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-26  9:05 [U-Boot] [PATCH] jedec_flash: Fix compilation warning in jedec_flash.c Stefan Roese
2009-01-26 19:44 ` Wolfgang Denk
2009-01-27  5:16   ` Stefan Roese [this message]

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=200901270616.52557.sr@denx.de \
    --to=sr@denx.de \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.