From patchwork Tue Jan 5 14:46:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 7955491 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6C0EFBEEE5 for ; Tue, 5 Jan 2016 14:47:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7AEB120265 for ; Tue, 5 Jan 2016 14:47:04 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id A611B201F2 for ; Tue, 5 Jan 2016 14:47:03 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 011DE7203E; Tue, 5 Jan 2016 06:47:02 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by gabe.freedesktop.org (Postfix) with ESMTPS id 24A407204D for ; Tue, 5 Jan 2016 06:46:59 -0800 (PST) X-IronPort-AV: E=Sophos;i="5.20,525,1444687200"; d="scan'208";a="195707393" Received: from vaio-julia.rsr.lip6.fr ([132.227.76.33]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 05 Jan 2016 15:46:57 +0100 Date: Tue, 5 Jan 2016 15:46:46 +0100 (CET) From: Julia Lawall X-X-Sender: jll@hadrien To: Jammy Zhou Subject: [PATCH] drm/amd/powerplay: fix compare_const_fl.cocci warnings Message-ID: User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Cc: linux-kernel@vger.kernel.orge, dri-devel@lists.freedesktop.org, kbuild-all@01.org, Alex Deucher , Rex Zhu X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP X != NULL, or even !X is more normmal in the kernel. Generated by: scripts/coccinelle/misc/compare_const_fl.cocci CC: Jammy Zhou Signed-off-by: Fengguang Wu Signed-off-by: Julia Lawall --- 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;