diff options
author | Alex Waterman <alexw@nvidia.com> | 2018-03-08 15:56:19 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-03-30 17:54:01 -0400 |
commit | a697d0053835f90187bfd53499510d2dc3e9afa7 (patch) | |
tree | eded5f8f03afea65b0ee870dcd22039b56e00a9e /drivers/gpu/nvgpu | |
parent | 54dd7f2370e366944c1ffbbc26599f44f1e22821 (diff) |
gpu: nvgpu: WAR unlikely() bug in CLANG
CLANG, when compiling regops_gk20a.c sees the following warning:
../drivers/gpu/nvgpu/gk20a/regops_gk20a.c:464:30: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality]
if (unlikely(skip_read_lo == false)) {
~~~~~~~~~~~~~^~~~~~~~
../drivers/gpu/nvgpu/gk20a/regops_gk20a.c:464:30: note: remove extraneous parentheses around the comparison to silence this warning
if (unlikely(skip_read_lo == false)) {
~ ^ ~
../drivers/gpu/nvgpu/gk20a/regops_gk20a.c:464:30: note: use '=' to turn this equality comparison into an assignment
if (unlikely(skip_read_lo == false)) {
^~
=
1 error generated.
But this obviously is fine. However, it's simple enough to work around
by just deleting the unlikely() call. We don't do anything with that
anyway.
JIRA NVGPU-525
Change-Id: I674855ad08daf65ac6d79ceab7d4f56f637d4437
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1673818
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Konsta Holtta <kholtta@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/regops_gk20a.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/regops_gk20a.c b/drivers/gpu/nvgpu/gk20a/regops_gk20a.c index 06cd5051..a2aeb1b3 100644 --- a/drivers/gpu/nvgpu/gk20a/regops_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/regops_gk20a.c | |||
@@ -461,7 +461,7 @@ int exec_regops_gk20a(struct dbg_session_gk20a *dbg_s, | |||
461 | } | 461 | } |
462 | 462 | ||
463 | /* read first 32bits */ | 463 | /* read first 32bits */ |
464 | if (unlikely(skip_read_lo == false)) { | 464 | if (skip_read_lo == false) { |
465 | data32_lo = gk20a_readl(g, ops[i].offset); | 465 | data32_lo = gk20a_readl(g, ops[i].offset); |
466 | data32_lo &= ~ops[i].and_n_mask_lo; | 466 | data32_lo &= ~ops[i].and_n_mask_lo; |
467 | data32_lo |= ops[i].value_lo; | 467 | data32_lo |= ops[i].value_lo; |