Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp2663152pxb; Mon, 6 Sep 2021 02:26:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxa6XpiT/60PhPET64ssBN1BmwgYLlETaJuIJfpC+FZIjJ1fzrSDvlrw6UyDtSyU10mo2bb X-Received: by 2002:a05:6402:3d8:: with SMTP id t24mr12401053edw.214.1630920376393; Mon, 06 Sep 2021 02:26:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630920376; cv=none; d=google.com; s=arc-20160816; b=dfTLSYZisA2y0L7tKmANHsXyKOUZimtYTDzWxa9Ea0LWPIRhLzLqxeGNOgJY7VSl1D YXcEcuvVdE5Xe/YJCnHw366Kk7mtetTfSfkew9nl4VSNhEW6STJiNUgmx4N9RrBu614k DO52IEDAGbROQoSL8mi6QvTDmxhwyS3VuZ0YJ0U1TEhrnd+958HT9wb7WY2KbKKsRxyz Xy+cocxjnqPG4YiMq9pGbji7xp3qZM21ZeAO33yytuiXH5p2oHwzYHNbchcFTwf0PHYo ki7tXqtOIej19KisUWdQsajn0PjUUigsqc1hEU/yC9ODIqaIVRSeNF6H9upBWxXSLpOv m6Hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=3Fj4ixvQqHNF9UcJxFeTxUiODoteIZXfSGsyBZVqy8s=; b=xEu2ihjW7dJOtVeDCtR13KXEk7bzqELYq7iXdd6HriKBVbCqVuDYQjvYOkrYMS7hFE w6Joz63oPd8eM7sRmtiGVdDppz4T1BG9Qk8edq6q2lmBRfrYfy87jkkrEUHXY6vzOYYF +RCfHqnEBt0Kky++X7afWaau3VTqO+cyZ1wvDrkaxsUa9qjmg2sGnY+JjlxMQS+7Liv+ /UVfdb3FEK2DrF1C3DwNhgOY2votcF5Z5nGnfEBuDKQ12kwqpVlKbvPFzkriM7KQexAE eKg/wH2v1HEwaLiJ9TwkGgx3OM5tUs+bOYjd7yR+R1qSOVy+J2ZD5varG+ikbDjBdiQU ErjA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b67si7698187edf.129.2021.09.06.02.25.50; Mon, 06 Sep 2021 02:26:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240750AbhIFJYu (ORCPT + 99 others); Mon, 6 Sep 2021 05:24:50 -0400 Received: from out30-43.freemail.mail.aliyun.com ([115.124.30.43]:52411 "EHLO out30-43.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239548AbhIFJYt (ORCPT ); Mon, 6 Sep 2021 05:24:49 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R841e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04394;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=11;SR=0;TI=SMTPD_---0UnOy4Ha_1630920219; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0UnOy4Ha_1630920219) by smtp.aliyun-inc.com(127.0.0.1); Mon, 06 Sep 2021 17:23:43 +0800 From: Jiapeng Chong To: harry.wentland@amd.com Cc: sunpeng.li@amd.com, alexander.deucher@amd.com, christian.koenig@amd.com, Xinhui.Pan@amd.com, airlied@linux.ie, daniel@ffwll.ch, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, chongjiapeng Subject: [PATCH] drm/amd/display: Fix warning comparing pointer to 0 Date: Mon, 6 Sep 2021 17:23:28 +0800 Message-Id: <1630920208-37789-1-git-send-email-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: chongjiapeng Fix the following coccicheck warning: ./drivers/gpu/drm/amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c:643:35-36: WARNING comparing pointer to 0. Reported-by: Abaci Robot Signed-off-by: chongjiapeng --- drivers/gpu/drm/amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c index 4a4894e..15491e3 100644 --- a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c +++ b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c @@ -640,7 +640,7 @@ void dcn31_clk_mgr_construct( sizeof(struct dcn31_watermarks), &clk_mgr->smu_wm_set.mc_address.quad_part); - if (clk_mgr->smu_wm_set.wm_set == 0) { + if (!clk_mgr->smu_wm_set.wm_set) { clk_mgr->smu_wm_set.wm_set = &dummy_wms; clk_mgr->smu_wm_set.mc_address.quad_part = 0; } -- 1.8.3.1