Skip to contentSkip to conversation

drm/amd/powerplay: fix compare_const_fl.cocci warnings

PATCH New Julia Lawall 1 participant 1 message Jan 5, 2016

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

PATCH 1/1 drm/amd/powerplay: fix compare_const_fl.cocci warnings

X != NULL, or even !X is more normmal in the kernel.

Generated by: scripts/coccinelle/misc/compare_const_fl.cocci

---

 smumgr.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/smumgr.c +3 -3
@@ -70,7 +70,7 @@ int smum_fini(struct pp_smumgr *smumgr)
 
 int smum_get_argument(struct pp_smumgr *smumgr)
 {
-	if (NULL != smumgr->smumgr_funcs->get_argument)
+	if (smumgr->smumgr_funcs->get_argument != NULL)
 		return smumgr->smumgr_funcs->get_argument(smumgr);
 
 	return 0;
@@ -79,7 +79,7 @@ int smum_get_argument(struct pp_smumgr *
 int smum_download_powerplay_table(struct pp_smumgr *smumgr,
 								void **table)
 {
-	if (NULL != smumgr->smumgr_funcs->download_pptable_settings)
+	if (smumgr->smumgr_funcs->download_pptable_settings != NULL)
 		return smumgr->smumgr_funcs->download_pptable_settings(smumgr,
 									table);
 
@@ -88,7 +88,7 @@ int smum_download_powerplay_table(struct
 
 int smum_upload_powerplay_table(struct pp_smumgr *smumgr)
 {
-	if (NULL != smumgr->smumgr_funcs->upload_pptable_settings)
+	if (smumgr->smumgr_funcs->upload_pptable_settings != NULL)
 		return smumgr->smumgr_funcs->upload_pptable_settings(smumgr);
 
 	return 0;

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