drm/radeon: remove boolean checks in if statements.
Remove unnecessary variable comparisions to true/false in if statements and check the value of the variable directly. Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
2cacd20e91
commit
fbd62354f0
@ -333,7 +333,7 @@ void cik_sdma_enable(struct radeon_device *rdev, bool enable)
|
||||
u32 me_cntl, reg_offset;
|
||||
int i;
|
||||
|
||||
if (enable == false) {
|
||||
if (!enable) {
|
||||
cik_sdma_gfx_stop(rdev);
|
||||
cik_sdma_rlc_stop(rdev);
|
||||
}
|
||||
|
@ -2815,7 +2815,7 @@ void r100_vga_set_state(struct radeon_device *rdev, bool state)
|
||||
uint32_t temp;
|
||||
|
||||
temp = RREG32(RADEON_CONFIG_CNTL);
|
||||
if (state == false) {
|
||||
if (!state) {
|
||||
temp &= ~RADEON_CFG_VGA_RAM_EN;
|
||||
temp |= RADEON_CFG_VGA_IO_DIS;
|
||||
} else {
|
||||
|
@ -3191,7 +3191,7 @@ void r600_vga_set_state(struct radeon_device *rdev, bool state)
|
||||
uint32_t temp;
|
||||
|
||||
temp = RREG32(CONFIG_CNTL);
|
||||
if (state == false) {
|
||||
if (!state) {
|
||||
temp &= ~(1<<0);
|
||||
temp |= (1<<1);
|
||||
} else {
|
||||
|
@ -664,17 +664,17 @@ bool radeon_get_bios(struct radeon_device *rdev)
|
||||
uint16_t tmp;
|
||||
|
||||
r = radeon_atrm_get_bios(rdev);
|
||||
if (r == false)
|
||||
if (!r)
|
||||
r = radeon_acpi_vfct_bios(rdev);
|
||||
if (r == false)
|
||||
if (!r)
|
||||
r = igp_read_bios_from_vram(rdev);
|
||||
if (r == false)
|
||||
if (!r)
|
||||
r = radeon_read_bios(rdev);
|
||||
if (r == false)
|
||||
if (!r)
|
||||
r = radeon_read_disabled_bios(rdev);
|
||||
if (r == false)
|
||||
if (!r)
|
||||
r = radeon_read_platform_bios(rdev);
|
||||
if (r == false || rdev->bios == NULL) {
|
||||
if (!r || rdev->bios == NULL) {
|
||||
DRM_ERROR("Unable to locate a BIOS ROM\n");
|
||||
rdev->bios = NULL;
|
||||
return false;
|
||||
|
@ -440,7 +440,7 @@ radeon_connector_analog_encoder_conflict_solve(struct drm_connector *connector,
|
||||
if (radeon_conflict->use_digital)
|
||||
continue;
|
||||
|
||||
if (priority == true) {
|
||||
if (priority) {
|
||||
DRM_DEBUG_KMS("1: conflicting encoders switching off %s\n",
|
||||
conflict->name);
|
||||
DRM_DEBUG_KMS("in favor of %s\n",
|
||||
@ -700,7 +700,7 @@ static int radeon_connector_set_property(struct drm_connector *connector, struct
|
||||
else
|
||||
ret = radeon_legacy_get_tmds_info_from_combios(radeon_encoder, tmds);
|
||||
}
|
||||
if (val == 1 || ret == false) {
|
||||
if (val == 1 || !ret) {
|
||||
radeon_legacy_get_tmds_info_from_table(radeon_encoder, tmds);
|
||||
}
|
||||
radeon_property_change_mode(&radeon_encoder->base);
|
||||
|
@ -847,11 +847,11 @@ static bool radeon_setup_enc_conn(struct drm_device *dev)
|
||||
if (rdev->bios) {
|
||||
if (rdev->is_atom_bios) {
|
||||
ret = radeon_get_atom_connector_info_from_supported_devices_table(dev);
|
||||
if (ret == false)
|
||||
if (!ret)
|
||||
ret = radeon_get_atom_connector_info_from_object_table(dev);
|
||||
} else {
|
||||
ret = radeon_get_legacy_connector_info_from_bios(dev);
|
||||
if (ret == false)
|
||||
if (!ret)
|
||||
ret = radeon_get_legacy_connector_info_from_table(dev);
|
||||
}
|
||||
} else {
|
||||
|
@ -1712,7 +1712,7 @@ static struct radeon_encoder_int_tmds *radeon_legacy_get_tmds_info(struct radeon
|
||||
else
|
||||
ret = radeon_legacy_get_tmds_info_from_combios(encoder, tmds);
|
||||
|
||||
if (ret == false)
|
||||
if (!ret)
|
||||
radeon_legacy_get_tmds_info_from_table(encoder, tmds);
|
||||
|
||||
return tmds;
|
||||
@ -1735,7 +1735,7 @@ static struct radeon_encoder_ext_tmds *radeon_legacy_get_ext_tmds_info(struct ra
|
||||
|
||||
ret = radeon_legacy_get_ext_tmds_info_from_combios(encoder, tmds);
|
||||
|
||||
if (ret == false)
|
||||
if (!ret)
|
||||
radeon_legacy_get_ext_tmds_info_from_table(encoder, tmds);
|
||||
|
||||
return tmds;
|
||||
|
@ -1789,7 +1789,7 @@ static bool radeon_pm_debug_check_in_vbl(struct radeon_device *rdev, bool finish
|
||||
u32 stat_crtc = 0;
|
||||
bool in_vbl = radeon_pm_in_vbl(rdev);
|
||||
|
||||
if (in_vbl == false)
|
||||
if (!in_vbl)
|
||||
DRM_DEBUG_DRIVER("not in vbl for pm change %08x at %s\n", stat_crtc,
|
||||
finish ? "exit" : "entry");
|
||||
return in_vbl;
|
||||
|
Loading…
Reference in New Issue
Block a user