aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2043-drm-amd-powerplay-Place-the-constant-on-the-right-si.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2043-drm-amd-powerplay-Place-the-constant-on-the-right-si.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2043-drm-amd-powerplay-Place-the-constant-on-the-right-si.patch59
1 files changed, 59 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2043-drm-amd-powerplay-Place-the-constant-on-the-right-si.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2043-drm-amd-powerplay-Place-the-constant-on-the-right-si.patch
new file mode 100644
index 00000000..56f14ae4
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2043-drm-amd-powerplay-Place-the-constant-on-the-right-si.patch
@@ -0,0 +1,59 @@
+From a89d019b2253ae22b09db7ae620bf936aa016701 Mon Sep 17 00:00:00 2001
+From: Georgiana Chelu <georgiana.chelu93@gmail.com>
+Date: Tue, 17 Oct 2017 23:22:09 +0300
+Subject: [PATCH 2043/4131] drm/amd/powerplay: Place the constant on the right
+ side of the test
+
+Move the constant on the right side of the comparison in order to
+make the code easier to read.
+
+Issue found by checkpatch script:
+* WARNING: Comparisons should place the constant on the right side of
+the test
+
+Signed-off-by: Georgiana Chelu <georgiana.chelu93@gmail.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/powerplay/hwmgr/vega10_processpptables.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_processpptables.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_processpptables.c
+index 769ac11..f14c761 100644
+--- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_processpptables.c
++++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_processpptables.c
+@@ -1021,7 +1021,7 @@ static int get_vddc_lookup_table(
+
+ table = kzalloc(table_size, GFP_KERNEL);
+
+- if (NULL == table)
++ if (table == NULL)
+ return -ENOMEM;
+
+ table->count = vddc_lookup_pp_tables->ucNumEntries;
+@@ -1130,12 +1130,12 @@ int vega10_pp_tables_initialize(struct pp_hwmgr *hwmgr)
+
+ hwmgr->pptable = kzalloc(sizeof(struct phm_ppt_v2_information), GFP_KERNEL);
+
+- PP_ASSERT_WITH_CODE((NULL != hwmgr->pptable),
++ PP_ASSERT_WITH_CODE((hwmgr->pptable != NULL),
+ "Failed to allocate hwmgr->pptable!", return -ENOMEM);
+
+ powerplay_table = get_powerplay_table(hwmgr);
+
+- PP_ASSERT_WITH_CODE((NULL != powerplay_table),
++ PP_ASSERT_WITH_CODE((powerplay_table != NULL),
+ "Missing PowerPlay Table!", return -1);
+
+ result = check_powerplay_tables(hwmgr, powerplay_table);
+@@ -1229,7 +1229,7 @@ int vega10_get_number_of_powerplay_table_entries(struct pp_hwmgr *hwmgr)
+ const ATOM_Vega10_State_Array *state_arrays;
+ const ATOM_Vega10_POWERPLAYTABLE *pp_table = get_powerplay_table(hwmgr);
+
+- PP_ASSERT_WITH_CODE((NULL != pp_table),
++ PP_ASSERT_WITH_CODE((pp_table != NULL),
+ "Missing PowerPlay Table!", return -1);
+ PP_ASSERT_WITH_CODE((pp_table->sHeader.format_revision >=
+ ATOM_Vega10_TABLE_REVISION_VEGA10),
+--
+2.7.4
+