Skip to contentSkip to conversation

drm/radeon: Simplify bool comparison

PATCH Applied Jiapeng Chong 2 participants 2 messages Feb 8, 2021 – Feb 9, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/radeon: Simplify bool comparison

Fix the following coccicheck warning:

./drivers/gpu/drm/radeon/rs690.c:190:6-35: WARNING: Comparison to bool.

---
 drivers/gpu/drm/radeon/rs690.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/radeon/rs690.c +1 -1
index c296f94..7bc302a 100644
@@ -187,7 +187,7 @@ static void rs690_mc_init(struct radeon_device *rdev)
 		/* FastFB shall be used with UMA memory. Here it is simply disabled when sideport 
 		 * memory is present.
 		 */
-		if (rdev->mc.igp_sideport_enabled == false && radeon_fastfb == 1) {
+		if (!rdev->mc.igp_sideport_enabled && radeon_fastfb == 1) {
 			DRM_INFO("Direct mapping: aper base at 0x%llx, replaced by direct mapping base 0x%llx.\n", 
 					(unsigned long long)rdev->mc.aper_base, k8_addr);
 			rdev->mc.aper_base = (resource_size_t)k8_addr;
Signature · 6 lines
1.8.3.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Applied
#1 lore raw

Applied. Thanks!

Alex

Quoted 27 lines · Jiapeng Chong

Fix the following coccicheck warning:

./drivers/gpu/drm/radeon/rs690.c:190:6-35: WARNING: Comparison to bool.

---
 drivers/gpu/drm/radeon/rs690.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/radeon/rs690.c +1 -2
index c296f94..7bc302a 100644
@@ -187,7 +187,7 @@ static void rs690_mc_init(struct radeon_device *rdev)
                /* FastFB shall be used with UMA memory. Here it is simply disabled when sideport
                 * memory is present.
                 */
-               if (rdev->mc.igp_sideport_enabled == false && radeon_fastfb == 1) {
+               if (!rdev->mc.igp_sideport_enabled && radeon_fastfb == 1) {
                        DRM_INFO("Direct mapping: aper base at 0x%llx, replaced by direct mapping base 0x%llx.\n",
                                        (unsigned long long)rdev->mc.aper_base, k8_addr);
                        rdev->mc.aper_base = (resource_size_t)k8_addr;
--

1.8.3.1

Quoted 4 lines

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel