From: Sascha Hauer <s.hauer@pengutronix.de>
To: Rouven Czerwinski <r.czerwinski@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 1/2] i.MX: HABv4: use min_t instead of min
Date: Wed, 26 Jun 2019 09:03:08 +0200 [thread overview]
Message-ID: <20190626070308.kyetzg53yrptt4t7@pengutronix.de> (raw)
In-Reply-To: <20190625073146.26639-1-r.czerwinski@pengutronix.de>
On Tue, Jun 25, 2019 at 09:31:45AM +0200, Rouven Czerwinski wrote:
> This fixes a compiler warning because len is size_t and
> RNG_FAIL_EVENT_SIZE was cast to uint32_t.
>
> Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
> ---
> drivers/hab/habv4.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks
Sascha
>
> diff --git a/drivers/hab/habv4.c b/drivers/hab/habv4.c
> index 496fbe3ccd..2e3e349b0b 100644
> --- a/drivers/hab/habv4.c
> +++ b/drivers/hab/habv4.c
> @@ -419,7 +419,7 @@ static bool is_known_rng_fail_event(const uint8_t *data, size_t len)
> int i;
> for (i = 0; i < ARRAY_SIZE(habv4_known_rng_fail_events); i++) {
> if (memcmp(data, habv4_known_rng_fail_events[i],
> - min(len, (uint32_t)RNG_FAIL_EVENT_SIZE)) == 0) {
> + min_t(size_t, len, RNG_FAIL_EVENT_SIZE)) == 0) {
> return true;
> }
> }
> --
> 2.22.0
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2019-06-26 7:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-25 7:31 Rouven Czerwinski
2019-06-25 7:31 ` [PATCH 2/2] i.MX: HABv4: Reset index variable after error type Rouven Czerwinski
2019-06-26 7:03 ` Sascha Hauer [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=20190626070308.kyetzg53yrptt4t7@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=r.czerwinski@pengutronix.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