From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] mxs: Convert timeout parameter to 'unsigned int'
Date: Wed, 22 Aug 2012 22:16:17 +0200 [thread overview]
Message-ID: <201208222216.18044.marex@denx.de> (raw)
In-Reply-To: <1345666211-25992-1-git-send-email-festevam@gmail.com>
Dear Fabio Estevam,
> From: Fabio Estevam <fabio.estevam@freescale.com>>
>
> For representing a timeout value, it makes more sense to pass it as
> 'unsigned int'.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
> ---
> arch/arm/cpu/arm926ejs/mxs/mxs.c | 6 ++++--
> arch/arm/include/asm/arch-mxs/sys_proto.h | 4 ++--
> 2 files changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/cpu/arm926ejs/mxs/mxs.c
> b/arch/arm/cpu/arm926ejs/mxs/mxs.c index c028e5e..19c79f2 100644
> --- a/arch/arm/cpu/arm926ejs/mxs/mxs.c
> +++ b/arch/arm/cpu/arm926ejs/mxs/mxs.c
> @@ -81,7 +81,8 @@ void enable_caches(void)
> #endif
> }
>
> -int mxs_wait_mask_set(struct mxs_register_32 *reg, uint32_t mask, int
> timeout) +int mxs_wait_mask_set(struct mxs_register_32 *reg, uint32_t
> mask, unsigned +
int timeout)
> {
> while (--timeout) {
> if ((readl(®->reg) & mask) == mask)
> @@ -92,7 +93,8 @@ int mxs_wait_mask_set(struct mxs_register_32 *reg,
> uint32_t mask, int timeout) return !timeout;
> }
>
> -int mxs_wait_mask_clr(struct mxs_register_32 *reg, uint32_t mask, int
> timeout) +int mxs_wait_mask_clr(struct mxs_register_32 *reg, uint32_t
> mask, unsigned +
int timeout)
> {
> while (--timeout) {
> if ((readl(®->reg) & mask) == 0)
> diff --git a/arch/arm/include/asm/arch-mxs/sys_proto.h
> b/arch/arm/include/asm/arch-mxs/sys_proto.h index 4610363..983b888 100644
> --- a/arch/arm/include/asm/arch-mxs/sys_proto.h
> +++ b/arch/arm/include/asm/arch-mxs/sys_proto.h
> @@ -26,10 +26,10 @@
> int mxs_reset_block(struct mxs_register_32 *reg);
> int mxs_wait_mask_set(struct mxs_register_32 *reg,
> uint32_t mask,
> - int timeout);
> + unsigned int timeout);
> int mxs_wait_mask_clr(struct mxs_register_32 *reg,
> uint32_t mask,
> - int timeout);
> + unsigned int timeout);
>
> int mxsmmc_initialize(bd_t *bis, int id, int (*wp)(int));
Best regards,
Marek Vasut
next prev parent reply other threads:[~2012-08-22 20:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-22 20:10 [U-Boot] [PATCH] mxs: Convert timeout parameter to 'unsigned int' Fabio Estevam
2012-08-22 20:16 ` Marek Vasut [this message]
2012-08-23 10:17 ` Stefano Babic
2012-08-27 6:28 ` Stefano Babic
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=201208222216.18044.marex@denx.de \
--to=marek.vasut@gmail.com \
--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