Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1090071pxb; Thu, 4 Mar 2021 03:03:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJwey2Wi9M4Ab6Qp22Z0d8PcZH75vyNQ7V5S1yQMUYM1flxoJbFTBSKAfoNUemcxzoY8x4f6 X-Received: by 2002:a17:906:a94b:: with SMTP id hh11mr3577805ejb.459.1614855788583; Thu, 04 Mar 2021 03:03:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614855788; cv=none; d=google.com; s=arc-20160816; b=pmhM2K2sDe++tU/Wfrr3z17qRPkmwEzIvoIBs+m1P4+oT5aF1ITYQp7j484XpXeM6K hb/Pz8RIJ91fgjOzg0a0O2d/B8MRq7TcJtd8nPcP7NxeWAZFKr4DUdxxJvZ28FTJqM0v yDi7ETJDGnXCCJcRspl8qvXf75N0K+9yqBI3kI4s7C74pDdWCDXCZ+bqQzhyQlk7sATI nMkskDEh4eY1E79k9K1B5yHD3NO2E8udrv4dAWPy16s4fWCMRfakG6lqDZmVB5oQ7qTm iItOOFSPE61MbSVsSHzhptrG8gcRhcFQRBrAUG1OPhIlAqa2GA6/f4VYs64Tugk51uiM 15/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=phNNMXnIbdkmGtzXiiqpAfgOxAbUgBnrTC2Q3yUwZkY=; b=PclhlFPIRtEvedjbcEDYzYRPFFLTw0mkU0NEY53lP1dQox5pTtFh0C5+HXhHmWnw7f C1/Qi+1qXICNumS3d1izTL0/qtgtSzhLz5dVSdw92CJN70FUnHIJZuBFeivdAoR1ZiF3 CZKULbHqLtGxjIwpLt3sYcTMBtJIT64ngl4NfO6NIPnPZ7sUOwdJ5A1t9+mXjXHILlZa hvGaj843ZFYVHIAnw65R7lfTi+DM/5cXgR4+DCWNibXZmi03U5S/0dNO5Bs5WxOfTjJ+ m/mbyP29XD0eyK35Z99yF1ZUysVAbp2DVFFljDgp86ZATTfZdqf9muEgu9shXVciWqR3 41Aw== 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=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l13si17283831edb.410.2021.03.04.03.02.39; Thu, 04 Mar 2021 03:03:08 -0800 (PST) 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=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1575081AbhCCRed (ORCPT + 99 others); Wed, 3 Mar 2021 12:34:33 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:36491 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241562AbhCCOI5 (ORCPT ); Wed, 3 Mar 2021 09:08:57 -0500 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lHS9O-0001sJ-Qq; Wed, 03 Mar 2021 14:06:54 +0000 From: Colin King To: Harry Wentland , Leo Li , Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , David Airlie , Daniel Vetter , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH][next] drm/amd/display: remove redundant initialization of variable status Date: Wed, 3 Mar 2021 14:06:54 +0000 Message-Id: <20210303140654.67950-1-colin.king@canonical.com> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Colin Ian King The variable status is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c b/drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c index 03741e170b61..15ed09b7a452 100644 --- a/drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c +++ b/drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c @@ -81,7 +81,7 @@ static void dmub_psr_get_state(struct dmub_psr *dmub, enum dc_psr_state *state) { struct dmub_srv *srv = dmub->ctx->dmub_srv->dmub; uint32_t raw_state; - enum dmub_status status = DMUB_STATUS_INVALID; + enum dmub_status status; // Send gpint command and wait for ack status = dmub_srv_send_gpint_command(srv, DMUB_GPINT__GET_PSR_STATE, 0, 30); -- 2.30.0