[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cfc8fd0fbef54262f7cf714726b7b7cafc8c567e.camel@perches.com>
Date: Mon, 27 Apr 2020 00:18:17 -0700
From: Joe Perches <joe@...ches.com>
To: Jason Yan <yanaijie@...wei.com>, harry.wentland@....com,
sunpeng.li@....com, alexander.deucher@....com,
christian.koenig@....com, David1.Zhou@....com, airlied@...ux.ie,
daniel@...ll.ch, amd-gfx@...ts.freedesktop.org,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drm/amd/display: remove conversion to bool in
dcn20_mpc.c
On Mon, 2020-04-27 at 14:37 +0800, Jason Yan wrote:
> The '==' expression itself is bool, no need to convert it to bool again.
trivia:
These descriptions are not quite correct.
The operators return an int, either 0 or 1.
-----------------
6.5.8 Relational operators
6 Each of the operators < (less than), > (greater than), <= (less than or equal to), and >=
(greater than or equal to) shall yield 1 if the specified relation is true and 0 if it is false. 90)
The result has type int
6.5.9 Equality operators
3 The == (equal to) and != (not equal to) operators are analogous to the relational
operators except for their lower precedence. 91) Each of the operators yields 1 if the
specified relation is true and 0 if it is false. The result has type int. For any pair of
operands, exactly one of the relations is true.
-----------------
Powered by blists - more mailing lists