Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1665674pxb; Thu, 7 Oct 2021 12:23:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxWlGO5UUiSd2rLDaCcONGzkEqP1RJJG2XiwhxRyL6/Kly/xjNP/dAw/Aj0coLr9SgALpeh X-Received: by 2002:a62:6446:0:b0:44c:6316:8740 with SMTP id y67-20020a626446000000b0044c63168740mr5835185pfb.37.1633634615980; Thu, 07 Oct 2021 12:23:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633634615; cv=none; d=google.com; s=arc-20160816; b=qMnnd1jSalEkuDt1b3iWnBg60GzHOUdLb+vB3Yjw4A4gAl58M1ifWzyVCEphbfW6Az 5wW716Ab59ntWXKR0vtVHI9ojV7ySsqIFYI/tCxPTNyOVuk5Cv7Op5pNOshajOqXA/7t tTqguYGZsSnOrc1wdFiXoPRMsxxQZzXIdsnsDBaSwzHZfbM5vNsHe3qnYeOymloIs/z7 itO+tY+EHK3Nqv8S63y9sDcXvA/6MM3PsPm/0SOnh5RyXOwiAHlSqJ7KsTUQsgKQyHVl r58yLXd85zd1786Sv+xV5pXrPEbj9/sd4fR9hhbNoUKnRlylscr1RxQomFx4z+RDobYn zVCw== 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:dkim-signature; bh=SYNiC1Bmjm6dMpjE54zivbQWUBIDEpK4EbYx3DBOl5A=; b=xc7A8fPvYRIz7YJRyoM5lzddIHvD9kvs6ohKffvgj8AbLASc+x0+COzjlWZhWhivYH 4rSvJV0nbyhvqnKauuSCHJSzA47gqKoeBTvFiKHCk1aAgTdiizgwbzD07iXoRASU1V9z PT6XxXzXIzZXFlgzyVHOAPWksDmiQnFQZzVDqDpbvkUCD57B6V6XLd8AiRoditCM3y2Z 6512/NUaBOvQMo6JTEGavM1NWwYgLYuViZSLUCwAh41hX08elSTze9s5nYirKDy3ytFK sbkstEaVnsxOlAfx97cMczDyOBZXL1oprytK5xUxCGk6lN3XCx9i3xzq8JSST3VVVzaX 3LuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b="p/aatMn3"; 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=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 g9si322651pjk.70.2021.10.07.12.23.22; Thu, 07 Oct 2021 12:23:35 -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=@canonical.com header.s=20210705 header.b="p/aatMn3"; 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=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241176AbhJGMId (ORCPT + 99 others); Thu, 7 Oct 2021 08:08:33 -0400 Received: from smtp-relay-canonical-1.canonical.com ([185.125.188.121]:37478 "EHLO smtp-relay-canonical-1.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241185AbhJGMIc (ORCPT ); Thu, 7 Oct 2021 08:08:32 -0400 Received: from localhost (1.general.cking.uk.vpn [10.172.193.212]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPSA id 2965F3FFF1; Thu, 7 Oct 2021 12:06:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1633608398; bh=SYNiC1Bmjm6dMpjE54zivbQWUBIDEpK4EbYx3DBOl5A=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Type; b=p/aatMn3SIjGyQjdVCdkZ4nhYhC4IGKSagUfPukEyC6l/0v/Y0IE2Jbl9ZoQQgUvC 58G8vzG7iCDh/5exqkMslZHdTERoFzKyO3SKf1G9SwFYUWKsApHCVpJ8PtvORUHwvO 5dglzIyZ89oTsAyD34QQLY5FcAK+IckxirfL8bXlbTwE6gdNNlkDHcKqRw5DVDCdVF xj6XJ2c/Sce+YqkevoJup5cRPjkG55trVfljqscJt0GWNt4/yq1fW+WYOHTp3A0Rtr RkoG5hvv/sDDeWbhODKRD2qGZzVPvJI+39Zf3EUtnic/FoEnk5u6geCUaRHlByUBNi P5M3G6daKGvVg== 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][next] drm/amd/display: Remove redundant initialization of variable result Date: Thu, 7 Oct 2021 13:06:37 +0100 Message-Id: <20211007120637.14459-1-colin.king@canonical.com> X-Mailer: git-send-email 2.32.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 result is being initialized with a value that is never read, it is being updated immediately afterwards in both branches of an if statement. The assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- drivers/gpu/drm/amd/display/dc/core/dc_link_dpia.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dpia.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_dpia.c index 6936b9d549e5..8387767ec1b3 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dpia.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dpia.c @@ -774,7 +774,7 @@ static enum link_training_result dpia_training_eq_phase(struct dc_link *link, struct link_training_settings *lt_settings, uint32_t hop) { - enum link_training_result result = LINK_TRAINING_EQ_FAIL_EQ; + enum link_training_result result; if (link->lttpr_mode == LTTPR_MODE_NON_TRANSPARENT) result = dpia_training_eq_non_transparent(link, lt_settings, hop); -- 2.32.0