Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp243921pxj; Thu, 3 Jun 2021 05:45:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwF+vdA0gOJqTw7SpDN+l5qaGIl2GLLQQ4eRKEpOgOVlPH9R/lm/7t18o+lpSBFCcvEbLFz X-Received: by 2002:a05:6402:1216:: with SMTP id c22mr22841505edw.36.1622724315708; Thu, 03 Jun 2021 05:45:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622724315; cv=none; d=google.com; s=arc-20160816; b=aEJslTy4upWx1YWoZ4/HczoMeC5DCa5kzhm17rPemQpQ3eMs7YIMzV6Pe0LZMVDGmG LYX9VhncBJI6uLMzGlu6hNvAk+bFOc0MlprZFpun/V7wH5vQylQYFo0JscxXIRUKTrxW RUwWsnxVWavmYog0ubWLrD8n1SAUnYXAIS6W3nxDSorWq/LWcDkmiySL8kUXnlwvMo/b iB3sPZOMoZf+p4P0nYKbh9KBsvJ2mPw3O6ChSQDhzPWqQsTkrnFJ60gEpmDx1MMKH6K2 hGvvxZF4untQ6IkBz6s/VFTtvjyCXy5cU/0VVnJHVldQnRSkQIuRMO6yRbiWXGPvn7Q9 iYNQ== 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=JtWyMhiHG7+laeN7prX/sh4BQRVYSkBE/Nxo2vELt5k=; b=PkeepkYS7fl00FHbx3rCDH5WsFM9muNJ7DqX9AvzGZZybhaHTnnwIp5suFZP/nyznj AlWCT6IsTxX+LhIrsFkGsEkY40f47BUZBdTJfYkYLMMSnCjk6vrH/1fQDO1hOjJ7YKIm nwCfSYLJyNHa6Il0mH0+nzSzflOhII274GNicqQlX4ednsNnDbZUv6HsF1mR3ccDBoDd Zpmfcq3N4nJ7dd6iUlSpiNe22GEBdk7MQfI4LaDfXWQvZkV19uKbunT+nHRzeff0dmd0 n5k2sBZ4YbrnBY4AS2Y9wH5BDcyv4H6LcNq3S7r5XO+uEU8wKyhGEDh2BgwqXU+rtai5 UhMg== 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 cm2si2182626edb.457.2021.06.03.05.44.52; Thu, 03 Jun 2021 05:45:15 -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=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230425AbhFCMoT (ORCPT + 99 others); Thu, 3 Jun 2021 08:44:19 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:37279 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229966AbhFCMoT (ORCPT ); Thu, 3 Jun 2021 08:44:19 -0400 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1lomgB-00036e-GX; Thu, 03 Jun 2021 12:42:31 +0000 From: Colin King To: Harry Wentland , Leo Li , Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , Xinhui.Pan@amd.com, 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] drm/amd/display: remove variable active_disp Date: Thu, 3 Jun 2021 13:42:31 +0100 Message-Id: <20210603124231.84230-1-colin.king@canonical.com> X-Mailer: git-send-email 2.31.1 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 active_disp is being initialized with a value that is never read, it is being re-assigned immediately afterwards. Clean up the code by removing the need for variable active_disp. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- drivers/gpu/drm/amd/display/dc/bios/bios_parser_helper.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser_helper.c b/drivers/gpu/drm/amd/display/dc/bios/bios_parser_helper.c index 53d7513b5083..adc710fe4a45 100644 --- a/drivers/gpu/drm/amd/display/dc/bios/bios_parser_helper.c +++ b/drivers/gpu/drm/amd/display/dc/bios/bios_parser_helper.c @@ -82,9 +82,6 @@ void bios_set_scratch_critical_state( uint32_t bios_get_vga_enabled_displays( struct dc_bios *bios) { - uint32_t active_disp = 1; - - active_disp = REG_READ(BIOS_SCRATCH_3) & 0XFFFF; - return active_disp; + return REG_READ(BIOS_SCRATCH_3) & 0XFFFF; } -- 2.31.1