From: Dave Jones <davej@codemonkey.org.uk>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>,
Tony Cheng <Tony.Cheng@amd.com>,
Harry Wentland <Harry.Wentland@amd.com>,
Alex Deucher <alexander.deucher@amd.com>
Subject: Re: drm/amd/display: Restructuring and cleaning up DML
Date: Tue, 28 Nov 2017 22:05:31 -0500 [thread overview]
Message-ID: <20171129030531.GA13413@codemonkey.org.uk> (raw)
In-Reply-To: <20171118000201.31E1B21C31@pdx-korg-gitolite-1.ci.codeaurora.org>
On Sat, Nov 18, 2017 at 12:02:01AM +0000, Linux Kernel wrote:
> Web: https://git.kernel.org/torvalds/c/6d04ee9dc10149db842d41de66eca201c9d91b60
> Commit: 6d04ee9dc10149db842d41de66eca201c9d91b60
> Parent: 19b7fe4a48efbe0f7e8c496b040c4eb16ff02313
> Refname: refs/heads/master
> Author: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
> AuthorDate: Wed Aug 23 16:43:17 2017 -0400
> Committer: Alex Deucher <alexander.deucher@amd.com>
> CommitDate: Sat Oct 21 16:45:24 2017 -0400
>
> drm/amd/display: Restructuring and cleaning up DML
>
> Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
> Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
> Acked-by: Harry Wentland <Harry.Wentland@amd.com>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> ---
> diff --git a/drivers/gpu/drm/amd/display/dc/calcs/dcn_calc_math.c b/drivers/gpu/drm/amd/display/dc/calcs/dcn_calc_math.c
> index a18474437990..b6abe0f3bb15 100644
> --- a/drivers/gpu/drm/amd/display/dc/calcs/dcn_calc_math.c
> +++ b/drivers/gpu/drm/amd/display/dc/calcs/dcn_calc_math.c
> @@ -27,20 +27,36 @@
>
> float dcn_bw_mod(const float arg1, const float arg2)
> {
> + if (arg1 != arg1)
> + return arg2;
> + if (arg2 != arg2)
> + return arg1;
> return arg1 - arg1 * ((int) (arg1 / arg2));
> }
>
> float dcn_bw_min2(const float arg1, const float arg2)
> {
> + if (arg1 != arg1)
> + return arg2;
> + if (arg2 != arg2)
> + return arg1;
> return arg1 < arg2 ? arg1 : arg2;
> }
>
> unsigned int dcn_bw_max(const unsigned int arg1, const unsigned int arg2)
> {
> + if (arg1 != arg1)
> + return arg2;
> + if (arg2 != arg2)
> + return arg1;
> return arg1 > arg2 ? arg1 : arg2;
> }
> float dcn_bw_max2(const float arg1, const float arg2)
> {
> + if (arg1 != arg1)
> + return arg2;
> + if (arg2 != arg2)
> + return arg1;
> return arg1 > arg2 ? arg1 : arg2;
> }
This looks really, really bizarre. What was the intention here ?
(This, and a bunch of other stuff in this driver picked up by Coverity,
sign up at scan.coverity.com if you want access, and I'll approve.)
Dave
next parent reply other threads:[~2017-11-29 3:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20171118000201.31E1B21C31@pdx-korg-gitolite-1.ci.codeaurora.org>
2017-11-29 3:05 ` Dave Jones [this message]
2017-11-29 3:34 ` drm/amd/display: Restructuring and cleaning up DML Cheng, Tony
2017-11-29 15:22 ` Harry Wentland
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=20171129030531.GA13413@codemonkey.org.uk \
--to=davej@codemonkey.org.uk \
--cc=Dmytro.Laktyushkin@amd.com \
--cc=Harry.Wentland@amd.com \
--cc=Tony.Cheng@amd.com \
--cc=alexander.deucher@amd.com \
--cc=linux-kernel@vger.kernel.org \
/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