Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp515855pxj; Thu, 3 Jun 2021 12:16:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyc9qzIUtQ/0Suir1yK4muypEPkjZIeJ9wB2IEkcfoVhqH8o2g7WsQnlIDXIb/F4NyVnhwp X-Received: by 2002:a17:906:76d2:: with SMTP id q18mr784548ejn.294.1622747774840; Thu, 03 Jun 2021 12:16:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622747774; cv=none; d=google.com; s=arc-20160816; b=wkT0E2O9MauwyA4HfodisB3M9iMnR9rdnCopVMoGS5Pz/iGP0IqSAMyFAFOtLmBkWw 5RNIkxKg26hU61ycGft6QibNcT3+93L2KPrDSvTG5pYcaDD/g6ZXFS01N1M1oWWlMy/d VkncvuMz2vQE3hH9LV7mvSK0obV1EoA6KOtXIfsUz4xw0c8hvPjJjo9RWr3rYdtTC6yN anTzPict4J/sG5PYz9GF9SvV4UGjEwHpRBTkbA2yjBC7hhRQlH9wdilBtJ2sShcDlQc6 7P9aQRqmtprZ50q6E7ijFjgF6MKuxiZ6xHiSs0bY4aIszRQV2l0nRdwIlSXhTBe6ifuD om1Q== 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=yTcdojc8mwwtA9K2NJaczioq6lgh4tCtax6VLDoB3+8=; b=wc40UjyIo5CDCc8qOQMzqoWub3hhNLJxvYzw45KzHO2/9oAZ81axtt3C5UZkNAu9h4 16Sw0Z/sswCplwTt68HRC4fZ3PpCo7Tp/3OpenWe/9bWKCIZ2MIegCX7k3SrzhTAP1Vz U9xtQLut5L86xEAHfp+cK96UAOUnXO7k+p5J8FqJm3nNyZbajn+kqxK3x5eFq/lwWh5A bBj1AJhFynWmbq5v0c42Ehz1L8ffMVgh+dr8K5Mu32uyKshyy+IcaByO5olHRZygxfbB FKxF4/oI9jNRdKvZkRHPM2ia/Flz+TSh6VD9idAwWTNsKepaB4OnhDwrrwOvIu1ssTpd FXnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=N1b8Xb6J; 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 o7si2864669edq.367.2021.06.03.12.15.49; Thu, 03 Jun 2021 12:16:14 -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=20161025 header.b=N1b8Xb6J; 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 S229695AbhFCTQh (ORCPT + 99 others); Thu, 3 Jun 2021 15:16:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229576AbhFCTQg (ORCPT ); Thu, 3 Jun 2021 15:16:36 -0400 Received: from mail-oi1-x231.google.com (mail-oi1-x231.google.com [IPv6:2607:f8b0:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2BDBC061756; Thu, 3 Jun 2021 12:14:51 -0700 (PDT) Received: by mail-oi1-x231.google.com with SMTP id v22so7383698oic.2; Thu, 03 Jun 2021 12:14:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=yTcdojc8mwwtA9K2NJaczioq6lgh4tCtax6VLDoB3+8=; b=N1b8Xb6JaD/REB3WoovSCN50+jBsEIUw/t0OZgaPSIKlWS16XgazPhYR+e8T3vIIKb mGjKhYltbPgSyDrPi2qXpjrpNDsrXi58HUBcgrTnhpOOIT0bWt9DZKcYgHJEDeyHjXV6 cfq6PqOILEN1tukJd7DKWDW4xcEvAlNI6pyOFEQdx4miovIeAFARR0FpctDoJJZmWVeC 9R0oE8g3zYmpxmqJSs3xdHwZJ0e6P2Ku+AisTA9Sh9LmPzDAKZS6y7X0Jp+KIvxcnqJw kLBfpdS3Gh0utaUCTUhRUkT4Z41XOdep7AYj/Ht00C8YHJ9RgowpWHMZ5vNYrI9aQgKT L1VA== 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=yTcdojc8mwwtA9K2NJaczioq6lgh4tCtax6VLDoB3+8=; b=XnrKDij4nAyzIMb58e3ZVVI3S2MeqDQMJPAXR9H4safxi14uycQYrIde+BI+CT5IZP HqkwFExcOrpz5Bdjv9+/SqUB9wrNfmgUcXPBNDF5DuLnOpdT13txUbqv6pu1jI+aJJTO llxENmI9dER7YyePHc49Rui/h6P7Kp2STEWR1KVplAmaqFTZSQ959tDUsVFzBrSzxrPM Anj8n8LYeYAGYVfBcjsxGfk/W2rFuNeEAE8uQHYDpM80zuBjtQw9YvXj2+iVArN+Dd+O qUufZ9UPofx8ruphZsXJIF+5eQi5uTpGJhxnpDkGiTAwsJMdCcULQtMZozJmBExROjnZ LjUQ== X-Gm-Message-State: AOAM531kkAnGL+WO/HMk4S05heqQR3WgoyHoUzkZVlkwKK/F8zlgaUpj AvD9eBrswJJyn50860QVX7QOofx8wcvde5rYR1E= X-Received: by 2002:a05:6808:1592:: with SMTP id t18mr476649oiw.123.1622747691117; Thu, 03 Jun 2021 12:14:51 -0700 (PDT) MIME-Version: 1.0 References: <20210603124231.84230-1-colin.king@canonical.com> In-Reply-To: <20210603124231.84230-1-colin.king@canonical.com> From: Alex Deucher Date: Thu, 3 Jun 2021 15:14:40 -0400 Message-ID: Subject: Re: [PATCH] drm/amd/display: remove variable active_disp To: Colin King Cc: Harry Wentland , Leo Li , Alex Deucher , =?UTF-8?Q?Christian_K=C3=B6nig?= , xinhui pan , David Airlie , Daniel Vetter , amd-gfx list , Maling list - DRI developers , kernel-janitors@vger.kernel.org, LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Applied. Thanks! Alex On Thu, Jun 3, 2021 at 8:42 AM Colin King wrote: > > 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 >