From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: Yihao Han <hanyihao@vivo.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Ulf Hansson <ulf.hansson@linaro.org>,
Mark Brown <broonie@kernel.org>,
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
William Breathitt Gray <vilhelm.gray@gmail.com>,
Sven Van Asbroeck <TheSven73@gmail.com>,
Corentin Labbe <clabbe@baylibre.com>,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
kernel@vivo.com
Subject: Re: [PATCH] macintosh: macio_asic: fix resource_size.cocci warnings
Date: Mon, 25 Apr 2022 19:23:50 +0200 [thread overview]
Message-ID: <20220425172350.fggwi7a76v5d6cbh@pengutronix.de> (raw)
In-Reply-To: <87zgkd8vnb.fsf@mpe.ellerman.id.au>
[-- Attachment #1: Type: text/plain, Size: 850 bytes --]
Hello Michael,
On Fri, Apr 22, 2022 at 04:44:24PM +1000, Michael Ellerman wrote:
> Yihao Han <hanyihao@vivo.com> writes:
> > - if (index == 0 && (res->end - res->start) > 0xfff)
> > + if (index == 0 && (resource_size(res)) > 0xfff)
> > res->end = res->start + 0xfff;
> > - if (index == 1 && (res->end - res->start) > 0xff)
> > + if (index == 1 && (resource_size(res)) > 0xff)
>
> Are you sure the conversion is correct? It's not exactly equivalent:
>
> static inline resource_size_t resource_size(const struct resource *res)
> {
> return res->end - res->start + 1;
> }
Indeed. I pointed out this issue in the v2 that already hit my inbox.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2022-04-25 17:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-14 14:02 [PATCH] macintosh: macio_asic: fix resource_size.cocci warnings Yihao Han
2022-04-19 7:54 ` Uwe Kleine-König
2022-04-22 6:44 ` Michael Ellerman
2022-04-25 17:23 ` Uwe Kleine-König [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=20220425172350.fggwi7a76v5d6cbh@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=TheSven73@gmail.com \
--cc=benh@kernel.crashing.org \
--cc=broonie@kernel.org \
--cc=clabbe@baylibre.com \
--cc=hanyihao@vivo.com \
--cc=kernel@vivo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=srinivas.pandruvada@linux.intel.com \
--cc=ulf.hansson@linaro.org \
--cc=vilhelm.gray@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).