Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1676609pxb; Thu, 7 Oct 2021 12:39:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzRIBjYhTa7FGP4DFIpYxGgcM2qvSOcWc93ziaj94mFc/UigCPFXxXBC2PRhsRuAq9ddPkE X-Received: by 2002:a17:90a:bd08:: with SMTP id y8mr6771879pjr.123.1633635581094; Thu, 07 Oct 2021 12:39:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633635581; cv=none; d=google.com; s=arc-20160816; b=j02NDEA0K+e5LRQOGTmwKb+PdY0zz9tZTZw53Us3QVks97wPzJnLTehmPsSkGbZwkY kktx3nqfUPlOj1M2M/1leoDDvnz8+fTbGb6GuPvghffYup03a0AMqTm6Lhpb8CHTn60w Pl/Z0sampsKDEVY075nFzazHEn/oxqKiuHvfJHHCAK177A4fpiDUUmZIRbMazQUynjb1 dUm2YvKL/JY3SH9LAE0IKlkZvVLzIGsxQrT1ypPHeVQJ8cPPSyil4YvcOxHx6LPqLSxY C3Fo5BrsVwSGYeFP6iYBD4sQOzxiRYcWrHFv0nDrQq7gJmmapESDh8KrLeVgtixgXLgx H0Wg== 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=RarZC0DyhhLg13GOrYFDr8NcXK9FIufYOOLFZU9wHfQ=; b=dKaLxOF6QdQApY0bFHRdZ7uGZGbF0IbKHYuC7Gi/hxOopIKSXSmbKgI5E6XV8AN5HJ CQdeOYMvu8Hy42l+C6NEoxCAj2V6WR8eP9nU5nTYb2MIKoJFvV1cKDCJAtarojw+PWff 34PZHg1AuGi/qvQvJ8FXMX2jaLi5qlFJN+7b7jpDGg34gVOdVd5CPxg2ntyVmiQCqFxk ja6CGRJlmfNEXk7naa3h89BgbtKQm6Q8WAcZOGtCkrmg1D/8diPKisiF5ebzT0w7r2Bw 1/uJnhEsTfo3CVIPsUJJykjelzOUvqy0AfH3MhU15r1Hd++ImJAlY5aWxpBg3Ot5f7r2 D6Gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ZJ2AS0ZV; 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 z1si277992pla.440.2021.10.07.12.39.25; Thu, 07 Oct 2021 12:39:41 -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=ZJ2AS0ZV; 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 S241520AbhJGPhR (ORCPT + 99 others); Thu, 7 Oct 2021 11:37:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240520AbhJGPhQ (ORCPT ); Thu, 7 Oct 2021 11:37:16 -0400 Received: from mail-oi1-x22c.google.com (mail-oi1-x22c.google.com [IPv6:2607:f8b0:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83AFCC061570; Thu, 7 Oct 2021 08:35:22 -0700 (PDT) Received: by mail-oi1-x22c.google.com with SMTP id v10so9463571oic.12; Thu, 07 Oct 2021 08:35:22 -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=RarZC0DyhhLg13GOrYFDr8NcXK9FIufYOOLFZU9wHfQ=; b=ZJ2AS0ZVbS9jA+Hqwj82ytWYWsaLS1Ns4HObbEH4BVgIpMa8Kwlefv3KZCRKKzZwR7 MylpjwRAC1Td5bO19GNTMwBAzaoDNWIOWCCUhpVTwMCLU6etTo1UdZt5oJn60YhF1J7m kKfTdESIEWTIVwtYcTa47J3ZwXkaTcH1upbAIwkCytGR111jwfC5Pp6U6A2mRdWZZTz2 g+xDHiRWtHFT3y4v5sCIslqZC12fMQsZFdjfPdispfmg5XP7NwzFk99iJtcr6g4WIkMN gyau5vmetfTUpR2IWyMuwdqK8nScwXIA8tmesfF4Q53s7G+8Q+Tyk1BgqWWSeo1QWbyG Dwrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=RarZC0DyhhLg13GOrYFDr8NcXK9FIufYOOLFZU9wHfQ=; b=klzZXRoM2vito8rJoU/3xGZaAfJTnAAWtLH0t+rBCDjpWFtLxRRu7QDzDeysbIiFHO 81AT2OReLbI6Q8izeyX461+Z4o7Ij6+V+huY6Qi00C9V4sbYr0q19MCaYjkz1IwZRYCq dpe7HgDPxQqsvoCqxBO3uqnuK4VUx2wqq0a8gqcnLUBg3eY8lpkRUKeDYQUr31w9Itlx CO0WvIIrPHpbValtqJut+Q1Yfx7rZi2mIRy8Cfi26qPvC19C/gvQFjqkUH+wQwd1XFEu Vv/o9Top1Y19PQMvWdYv+86x/H4uGLrGQqvBnck/7PDK66EVarGyW1dTPrvvKwxarEkT 38Jg== X-Gm-Message-State: AOAM531x5oVmt9VeNK+W9nFLAg1/Tqe7lcCK+rozjH8Wqo2eBUB6tGt7 vUGkDbKZibvIqZFhlQPsYZM8TJPmsBFvnmkJUwo= X-Received: by 2002:a05:6808:1141:: with SMTP id u1mr3640714oiu.123.1633620921765; Thu, 07 Oct 2021 08:35:21 -0700 (PDT) MIME-Version: 1.0 References: <20211007120637.14459-1-colin.king@canonical.com> In-Reply-To: <20211007120637.14459-1-colin.king@canonical.com> From: Alex Deucher Date: Thu, 7 Oct 2021 11:35:10 -0400 Message-ID: Subject: Re: [PATCH][next] drm/amd/display: Remove redundant initialization of variable result 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, Oct 7, 2021 at 8:06 AM Colin King wrote: > > 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 >