* [PATCH] drm/amd/powerplay: fix compare_const_fl.cocci warnings
@ 2016-01-05 14:46 Julia Lawall
0 siblings, 0 replies; only message in thread
From: Julia Lawall @ 2016-01-05 14:46 UTC (permalink / raw)
To: Jammy Zhou; +Cc: linux-kernel, dri-devel, kbuild-all, Alex Deucher, Rex Zhu
X != NULL, or even !X is more normmal in the kernel.
Generated by: scripts/coccinelle/misc/compare_const_fl.cocci
CC: Jammy Zhou <Jammy.Zhou@amd.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
---
smumgr.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- a/drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/smumgr.c
+++ b/drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/smumgr.c
@@ -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
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-01-05 14:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-05 14:46 [PATCH] drm/amd/powerplay: fix compare_const_fl.cocci warnings Julia Lawall
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.