]> git.baikalelectronics.ru Git - kernel.git/commit
drm/nouveau/bios/ramcfg: fix missing parentheses when calculating RON
authorColin Ian King <colin.king@canonical.com>
Sun, 25 Nov 2018 17:09:18 +0000 (17:09 +0000)
committerBen Skeggs <bskeggs@redhat.com>
Tue, 19 Feb 2019 22:59:58 +0000 (08:59 +1000)
commitfca40e67dc35b82570c0f95a373909d8a1aa67c6
tree72cc6657b133d13db20dd467b2a12440ee7cf724
parent47187a363e4bbba566baaae7e2a5da7b8fd872b6
drm/nouveau/bios/ramcfg: fix missing parentheses when calculating RON

Currently, the expression for calculating RON is always going to result
in zero no matter the value of ram->mr[1] because the ! operator has
higher precedence than the shift >> operator.  I believe the missing
parentheses around the expression before appying the ! operator will
result in the desired result.

[ Note, not tested ]

Detected by CoveritScan, CID#1324005 ("Operands don't affect result")

Fixes: 9c9ccb29aebf ("drm/nouveau/bios/ramcfg: Separate out RON pull value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nvkm/subdev/fb/gddr3.c