<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>This patch is ok but if you're going to propose it maybe ditch the braces on the single if line statements while you're at it?</p>
<p><br>
</p>
<p>Cheers,</p>
<p>Tom St Denis</p>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Edward O'Callaghan <funfunctor@folklore1984.net><br>
<b>Sent:</b> Sunday, July 10, 2016 05:03<br>
<b>To:</b> amd-gfx@lists.freedesktop.org<br>
<b>Subject:</b> [PATCH 3/5] drivers/amdgpu: Use canonical form in branch predicates</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Found-by: Coccinelle<br>
Signed-off-by: Edward O'Callaghan <funfunctor@folklore1984.net><br>
---<br>
drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c | 2 +-<br>
drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c | 14 +++++++-------<br>
drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 2 +-<br>
drivers/gpu/drm/amd/amdgpu/cik.c | 2 +-<br>
drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 2 +-<br>
drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 2 +-<br>
drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 2 +-<br>
7 files changed, 13 insertions(+), 13 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c<br>
index 35a1248..69942d2 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c<br>
@@ -144,7 +144,7 @@ static int amdgpu_atpx_validate(struct amdgpu_atpx *atpx)<br>
{<br>
/* make sure required functions are enabled */<br>
/* dGPU power control is required */<br>
- if (atpx->functions.power_cntl == false) {<br>
+ if (!atpx->functions.power_cntl) {<br>
printk("ATPX dGPU power cntl not present, forcing\n");<br>
atpx->functions.power_cntl = true;<br>
}<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c<br>
index 99ca75b..2b6afe1 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c<br>
@@ -352,22 +352,22 @@ bool amdgpu_get_bios(struct amdgpu_device *adev)<br>
uint16_t tmp, bios_header_start;<br>
<br>
r = amdgpu_atrm_get_bios(adev);<br>
- if (r == false)<br>
+ if (!r)<br>
r = amdgpu_acpi_vfct_bios(adev);<br>
- if (r == false)<br>
+ if (!r)<br>
r = igp_read_bios_from_vram(adev);<br>
- if (r == false)<br>
+ if (!r)<br>
r = amdgpu_read_bios(adev);<br>
- if (r == false) {<br>
+ if (!r) {<br>
r = amdgpu_read_bios_from_rom(adev);<br>
}<br>
- if (r == false) {<br>
+ if (!r) {<br>
r = amdgpu_read_disabled_bios(adev);<br>
}<br>
- if (r == false) {<br>
+ if (!r) {<br>
r = amdgpu_read_platform_bios(adev);<br>
}<br>
- if (r == false || adev->bios == NULL) {<br>
+ if (!r || adev->bios == NULL) {<br>
DRM_ERROR("Unable to locate a BIOS ROM\n");<br>
adev->bios = NULL;<br>
return false;<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/ci_dpm.c b/drivers/gpu/drm/amd/amdgpu/ci_dpm.c<br>
index 5ec1f1e..b3b17bb 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/ci_dpm.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/ci_dpm.c<br>
@@ -3030,7 +3030,7 @@ static int ci_populate_single_memory_level(struct amdgpu_device *adev,<br>
<br>
if (pi->mclk_stutter_mode_threshold &&<br>
(memory_clock <= pi->mclk_stutter_mode_threshold) &&<br>
- (pi->uvd_enabled == false) &&<br>
+ (!pi->uvd_enabled) &&<br>
(RREG32(mmDPG_PIPE_STUTTER_CONTROL) & DPG_PIPE_STUTTER_CONTROL__STUTTER_ENABLE_MASK) &&<br>
(adev->pm.dpm.new_active_crtc_count <= 2))<br>
memory_level->StutterEnable = true;<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/cik.c b/drivers/gpu/drm/amd/amdgpu/cik.c<br>
index 9104318..0e4a8e4 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/cik.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/cik.c<br>
@@ -879,7 +879,7 @@ static void cik_vga_set_state(struct amdgpu_device *adev, bool state)<br>
uint32_t tmp;<br>
<br>
tmp = RREG32(mmCONFIG_CNTL);<br>
- if (state == false)<br>
+ if (!state)<br>
tmp |= CONFIG_CNTL__VGA_DIS_MASK;<br>
else<br>
tmp &= ~CONFIG_CNTL__VGA_DIS_MASK;<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/cik_sdma.c b/drivers/gpu/drm/amd/amdgpu/cik_sdma.c<br>
index 9dc4e24..554f2fd 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/cik_sdma.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/cik_sdma.c<br>
@@ -365,7 +365,7 @@ static void cik_sdma_enable(struct amdgpu_device *adev, bool enable)<br>
u32 me_cntl;<br>
int i;<br>
<br>
- if (enable == false) {<br>
+ if (!enable) {<br>
cik_sdma_gfx_stop(adev);<br>
cik_sdma_rlc_stop(adev);<br>
}<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c b/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c<br>
index b556bd0..959cada9 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c<br>
@@ -406,7 +406,7 @@ static void sdma_v2_4_enable(struct amdgpu_device *adev, bool enable)<br>
u32 f32_cntl;<br>
int i;<br>
<br>
- if (enable == false) {<br>
+ if (!enable) {<br>
sdma_v2_4_gfx_stop(adev);<br>
sdma_v2_4_rlc_stop(adev);<br>
}<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c<br>
index 532ea88..f96fdc8 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c<br>
@@ -616,7 +616,7 @@ static void sdma_v3_0_enable(struct amdgpu_device *adev, bool enable)<br>
u32 f32_cntl;<br>
int i;<br>
<br>
- if (enable == false) {<br>
+ if (!enable) {<br>
sdma_v3_0_gfx_stop(adev);<br>
sdma_v3_0_rlc_stop(adev);<br>
}<br>
-- <br>
2.7.4<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx" id="LPlnk921561">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a><br>
</div>
</span></font></div>
</div>
</body>
</html>