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 1/3] cfi_flash: use specific length types for cword
Date: Wed, 21 Oct 2015 16:00:28 +0200	[thread overview]
Message-ID: <56279A7C.30908@denx.de> (raw)
In-Reply-To: <CAD0U-hK0WutzvK1NXb=bw+57_tg56o11=LbhqOV0eW=HzRU_4Q@mail.gmail.com>

Hi Ryan,

On 21.10.2015 15:48, Ryan Harkin wrote:

<snip>

>>>> Perhaps also the "c", "w", "l" and "ll" in "cword" should be renamed
>>>> to "u8", "u16", "u32" and "u64"?  We aren't actually looking for a
>>>> "char" in this file, but an 8 bit value, for example.
>>>
>>>
>>> Correct. But I suspect that u8 etc will not be possible as variable
>>> names. As they are already taken. The current names are not perfect
>>> but still not that bad. Feel free to come up with some better names
>>> that match the meaning of the variables more closely in v2...
>>
>> Yeah, I just noticed that problem too.  I'll think of an appropriate
>> new name.  For now, I've just used w8, w16, w32 and w64, meaning
>> "width 8", etc., but that might not be very clear either.
>
> I'm actually liking the "w" names now.  Let me know if it doesn't suit.

I'm fine with the "w" names.

> Now for a separate but related issue, so I thought I'd ask about it
> here.  Looking through the code to make this rename, I noticed a few
> u32 pointers, eg:
>
> 1056:            u32 *flash;
> 1063:            flash = (u32 *)info->start[sect];
> 1145:    u32 *flash;
> 1151:    flash = (u32 *)info->start[i];
>
> Perhaps I'm lucky that my flash part lives in the 32-bit address
> range, but I think this may need fixing too - with a separate patch.
> That took me to looking at the definition of flash_info_t in
> include/flash.h and I see there are quite a few "uchar", "ushort" and
> "ulong"s in there.  Do you think these will need changing too?

The cfi flash driver unfortunately has not seem much "love" in the last
few years. As parallel NOR flash devices are used rarely nowadays. So
you will most likely find many places that could use some cleanup /
fixes. And yes, some "ulong"s might cause problems on the new 64bit
systems. I really appreciate it that you take a look at this.

Thanks,
Stefan

  reply	other threads:[~2015-10-21 14:00 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-21  9:54 [U-Boot] [PATCH 0/3] vexpress64 flash support Ryan Harkin
2015-10-21  9:54 ` [U-Boot] [PATCH 1/3] cfi_flash: use specific length types for cword Ryan Harkin
2015-10-21 10:24   ` Stefan Roese
2015-10-21 11:34     ` Ryan Harkin
2015-10-21 12:40       ` Stefan Roese
2015-10-21 12:49         ` Ryan Harkin
2015-10-21 13:48           ` Ryan Harkin
2015-10-21 14:00             ` Stefan Roese [this message]
2015-10-21  9:54 ` [U-Boot] [PATCH 2/3] vexpress64: remove #error Ryan Harkin
2015-10-27 11:36   ` Linus Walleij
2015-10-27 12:29     ` Ryan Harkin
2015-11-11 16:11       ` Ryan Harkin
2015-11-17 13:36         ` Linus Walleij
2015-10-21  9:54 ` [U-Boot] [PATCH 3/3] vexpress64: store env in flash Ryan Harkin
2015-10-27 11:49   ` Linus Walleij
2015-10-27 12:49     ` Ryan Harkin
2015-10-27 21:39       ` Linus Walleij
2015-10-28 15:07         ` Ryan Harkin
2015-10-28 15:10           ` Linus Walleij
2015-10-28 16:06             ` Ryan Harkin
2015-10-28 21:43               ` Linus Walleij
2015-10-28 22:07                 ` Tom Rini
2015-10-29  9:17                   ` Ryan Harkin
2015-10-29 14:50                     ` Tom Rini

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=56279A7C.30908@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.