Commit fbd62354 authored by Wambui Karuga's avatar Wambui Karuga Committed by Alex Deucher
Browse files

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: default avatarWambui Karuga <wambui.karugax@gmail.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 2cacd20e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
	}
+1 −1
Original line number Diff line number Diff line
@@ -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 {
+1 −1
Original line number Diff line number Diff line
@@ -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 {
+6 −6
Original line number Diff line number Diff line
@@ -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;
+2 −2
Original line number Diff line number Diff line
@@ -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);
Loading