Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp3937734pxb; Tue, 7 Sep 2021 10:45:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz3jlX6Gc0JYuBBwgx9IiBFfN5XGDiBsBrCiuIKEkcR2lf+89OgRjYS16kTNz9n3S5/ICBc X-Received: by 2002:aa7:c514:: with SMTP id o20mr681389edq.318.1631036738079; Tue, 07 Sep 2021 10:45:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631036738; cv=none; d=google.com; s=arc-20160816; b=nuj09mZMygwbd6YrLm72LbxFeurYKTPaucuAsiD2UbExosPq5b3DK5OcvtBjE8Ig0A ftZBDFx0KilWJITmy92xXW2TUQ76ari9YAI5bQVf0up6jkWCxR5+IgeuWSkMOp/LMxXq 6j7FbNsuUx6QLgiwb4XE3gQQwDOw1LGPTjpywqTBn9hQY4VdIIbgmF1o8fSxTdFLtrhe AqlJcL81N8Xg9kyjjWxnSwrIZaoJf6CneOi1XW2Vm5m/JQEwVPgkg0PEzrrJwl8IwWFU 2yBVjMexusbTtBHq5LE+FsH/gD8vBk3EmXxPkKLHL5iMuRzFkttRol84ovkw1UEf1ldN 3duA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=j29s6jGrbvtqdrpQkBZYVbTtCf9huBsKw7LAbvekqDc=; b=nkLZ9gswFnd7iU9CuGGoDrheEjfX3IvwZ41JzanIC/ZRUCoLSgpPWPWaO9V9hFKB/2 78VlO26UkO+ol2Pr1TmMiyBSLWgSCF2H3nupt6gaC7y9f/bRwJSaeHb4cbCF2jerOv7W gC+pv2hMSofobRdFge0ENeRaLSJ4lpQqVJt84hmbt8KJ+RvZ2S/GuDVrLDLtMAF98hyj h9+26gV3VA6TIZnd+bCSFm0ZXnjU/q5rUxozx6ad6IZ7NUzDk7JdJLL3/lObCp+4+CgT 7k3J5dLLuy8oaxWdcIY+ZCX+8K+v4rdLDEAx0DoQYzfHinzKRX6tJqQJNH7OBxQ4XePY celA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=nDMbNZ9N; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l15si10635643ejg.444.2021.09.07.10.45.14; Tue, 07 Sep 2021 10:45:38 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=nDMbNZ9N; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345474AbhIGRJE (ORCPT + 99 others); Tue, 7 Sep 2021 13:09:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345260AbhIGRJE (ORCPT ); Tue, 7 Sep 2021 13:09:04 -0400 Received: from mail-oi1-x232.google.com (mail-oi1-x232.google.com [IPv6:2607:f8b0:4864:20::232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A977C061575 for ; Tue, 7 Sep 2021 10:07:57 -0700 (PDT) Received: by mail-oi1-x232.google.com with SMTP id bi4so13601809oib.9 for ; Tue, 07 Sep 2021 10:07:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=j29s6jGrbvtqdrpQkBZYVbTtCf9huBsKw7LAbvekqDc=; b=nDMbNZ9NrJI9JSLW4JBrEP3rhrTxiskApiLwhzzTBbw5bocGu3rATpSH8lOsAtCzDt W/yn8TNRiS/m2IlUqXDwnBFLGQNjqQsN0ff+91/df3BdpAD3K4X7YOdGM7jflgceOraf BFbs2tPYxzpM659Jv0vfxdHIpknDE1S70pQLxltO1wBUipwGBJ8RUjuILAfeZBqOZx7O HZHfkrp/QDtLwuztS84UXn+fNKToFEYfHNNUeKQgt9UrdFHqFT8TFBauVzEbe8hzTbCi ScEFd0qnqeBrirpapDinhjvUm9oQNA3Jk9U2mlMZyl5jHIdyjrQTwbYD+U+4OungicxA UXRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=j29s6jGrbvtqdrpQkBZYVbTtCf9huBsKw7LAbvekqDc=; b=bpZdem9NZyWRiX8Uv44gbPWgP7xYB8buoXFgbrhmevXXE21uIcepSyD+lq7qiBfuhm 4x5N/N8zM9H6Th+7rG8aNVbDAIc2oYTvyIOMYf1VHOTPzTQy6wSQrEo4wfUEr7d33ifc TXLNB9GvEjps9IaiVSqDsNlLAtkuM9jvkuPsQeaE52LRe9iMMoNMIcjKDTecJe+Cz/FW bSzMpx+vOEFqphFI2K7TCmXc2OVKpBG4zzWk1c32ZyMPpQ0cIqRUZa8yR/Fs5EzOMPeb LjxUfAan0PH5arrSCa8qx8nsY9efGA+f13Uetcl19amv5FjXPpT2YoF70BXx0aOKFGQD Y2sQ== X-Gm-Message-State: AOAM533xA6M5KDhNOFmFRTEwjiacdAzKW9pjaItcwYJTgbQLOOxxGDEU vxsJ7QrZYaIzyaBlqEfDmz0JsGJAlTAN5e3kTDw= X-Received: by 2002:a05:6808:1310:: with SMTP id y16mr3749150oiv.123.1631034476551; Tue, 07 Sep 2021 10:07:56 -0700 (PDT) MIME-Version: 1.0 References: <1630920208-37789-1-git-send-email-jiapeng.chong@linux.alibaba.com> In-Reply-To: <1630920208-37789-1-git-send-email-jiapeng.chong@linux.alibaba.com> From: Alex Deucher Date: Tue, 7 Sep 2021 13:07:45 -0400 Message-ID: Subject: Re: [PATCH] drm/amd/display: Fix warning comparing pointer to 0 To: Jiapeng Chong Cc: "Wentland, Harry" , "Leo (Sunpeng) Li" , "Deucher, Alexander" , Christian Koenig , xinhui pan , Dave Airlie , Daniel Vetter , amd-gfx list , Maling list - DRI developers , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Applied. Thanks! Alex On Mon, Sep 6, 2021 at 5:23 AM Jiapeng Chong wrote: > > 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 >