From: "Lothar Waßmann" <LW@KARO-electronics.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] mmc: rpmb: update size format for write_counter
Date: Mon, 19 Jun 2017 08:42:21 +0200 [thread overview]
Message-ID: <20170619084221.10d3b6e1@karo-electronics.de> (raw)
In-Reply-To: <4dd588cc-481e-7573-23f0-bbe45306ab0d@rock-chips.com>
Hi,
On Tue, 13 Jun 2017 10:11:17 +0800 Kever Yang wrote:
> Hi Simon,
>
>
> On 06/09/2017 08:28 PM, Simon Glass wrote:
> > On 7 June 2017 at 19:20, Kever Yang <kever.yang@rock-chips.com> wrote:
> >> According to MMC spec, the write_counter is 4-byte length,
> >> use 'int' instead of 'long' type for the 'long' is not 4-byte
> >> in 64 bit CPU.
> >>
> >> Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
> >> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> >> ---
> >>
> >> drivers/mmc/rpmb.c | 2 +-
> >> 1 file changed, 1 insertion(+), 1 deletion(-)
> > So should we use uint32_t?
>
> Yes, we can use uint32_t, I use 'unsigned int' just for the same format
> with other
> members in the structure which using unsigned char/short.
>
> Is there a doc for which kind of data format prefer to use first in U-Boot?
> unsigned int, uint32_t, u32;
>
uint32_t is guaranteed to be of size 32bit according to the C spec.
'[unsigned] int' is only guaranteed to be at least 32bit but can be
larger on some machine.
A good overview of the C data types and their properties can be found
at: https://en.wikipedia.org/wiki/C_data_types
Lothar Waßmann
next prev parent reply other threads:[~2017-06-19 6:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20170608012015epcas4p2821661342a6e314e29afcb2390ee7ca2@epcas4p2.samsung.com>
2017-06-08 1:20 ` [U-Boot] [PATCH 1/2] mmc: use new hwpart API when CONFIG_BLK enabled Kever Yang
2017-06-08 1:20 ` [U-Boot] [PATCH 2/2] mmc: rpmb: update size format for write_counter Kever Yang
2017-06-09 12:28 ` Simon Glass
2017-06-13 2:11 ` Kever Yang
2017-06-17 3:40 ` Simon Glass
2017-06-19 6:42 ` Lothar Waßmann [this message]
2017-06-29 9:43 ` Jaehoon Chung
2017-06-09 12:28 ` [U-Boot] [PATCH 1/2] mmc: use new hwpart API when CONFIG_BLK enabled Simon Glass
2017-06-29 9:43 ` Jaehoon Chung
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=20170619084221.10d3b6e1@karo-electronics.de \
--to=lw@karo-electronics.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox