Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1924320pxj; Fri, 18 Jun 2021 20:49:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwCls0bq9fZSjGA41OmqNKdG3C/znXYxOHo03chf3hgPo5wVKjEKvblFDOGJG/opKNAhKGq X-Received: by 2002:a6b:1d3:: with SMTP id 202mr10788377iob.100.1624074586690; Fri, 18 Jun 2021 20:49:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624074586; cv=none; d=google.com; s=arc-20160816; b=Z+15cSxwuS4mBIImUIUC/aaqB2f3OplYmZfppPJQIdKsOghjkIXPOgVfScn8V8LweS CJ2dxk0enlENJlpYc7JOc58TUpFg0+vYG1QH3sAveSozSFlXbyjjjT3s1DszqBPB7QiQ jT+Ga+yqs7PPjHZmQGcYhd6Y1woP8Nm+A8VPy/zooOmjwHi2uoUiwOtDQc3O7Qj9ZJxm RhE/EUZV0Q7oVvqY0rjRAjv93pwmGLDbD4r41FB4d5bAiLPqkIxGMHsq9jGzN8x2EzGb J5dTke1m+s5IwDEIDqUy2kZeUY3bpNizzmX1OJY5yYlJNvXJ8rQHbHLFbMlh5P0e9NLe Gh/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=0lqhtlNOacqNuU9HVlYS2QY7iZE+rcKx/NRXadqAqMk=; b=WBH1HC07eA3IP9/uzuhDXsSXxeYj6Bfr0CDzTJkQs3Kb5OfI+U8efHcjduJHsMa1qd fln/k94rbfUFILa4xhgIoBRvQA9aiGwFJjtf+2jN2moe1JfN18rRyCQH+7wlfZzl85EY ysCvunJJKlOxY5ERlUlWrg87Q+pg4Dod+qc/dW8cBB278xM6mBzJcMOARFTG02mN4pom BzpzfI23DzX7FxeLGpVaLCIwE53AvvZNDh7IThlcp72DWZxS79FKak/JTnGcMG5eNbdo gFy8xdqFpfmcze9Soch7Kwz0BFWI1UuK6AzTBUePXiBY9OINq25s9nIKDdJueig+3ypY /1DA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AuSfHwDE; 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 q10si4655711ilu.60.2021.06.18.20.49.34; Fri, 18 Jun 2021 20:49:46 -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=AuSfHwDE; 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 S233693AbhFRUfs (ORCPT + 99 others); Fri, 18 Jun 2021 16:35:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232426AbhFRUfr (ORCPT ); Fri, 18 Jun 2021 16:35:47 -0400 Received: from mail-ot1-x332.google.com (mail-ot1-x332.google.com [IPv6:2607:f8b0:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3604BC061574 for ; Fri, 18 Jun 2021 13:33:37 -0700 (PDT) Received: by mail-ot1-x332.google.com with SMTP id 7-20020a9d0d070000b0290439abcef697so10950729oti.2 for ; Fri, 18 Jun 2021 13:33:37 -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:content-transfer-encoding; bh=0lqhtlNOacqNuU9HVlYS2QY7iZE+rcKx/NRXadqAqMk=; b=AuSfHwDEDhrhZndV8N8LFsf/T1gLt0SL4Kr2SNUF3Pc/mezMmFtpzDBDHqrAsZUjOm IRy03UanKoPueyLJxxyoLwi+7yWLwc1lE2fQ43tMiNmxgh+UQyYW3eDQZEGvBUoTnFoj +W3JlBI2s3t6P+TdabfSmM9EOHIXcrktMpAx6Z8ZPVkBgpCN4pW/H43hJYBKtTXrXlNc cU0YcDuTzY89LB2/chwHDZe20OZ1MOmyeksmzE80G7z+nWE7K/jmpMIHeolUcG+xslRh OdMkZqqVcKl668REH5zuplzsz+5hxYSztvpMIQWLSN9pjFs59J2hBmTmeE+tjuO2FgUP 0GAQ== 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:content-transfer-encoding; bh=0lqhtlNOacqNuU9HVlYS2QY7iZE+rcKx/NRXadqAqMk=; b=qoNvwWjtNndDZkvEttuweAXNZu1tWnTB8WSiHkruNmLhdrNvF7cSTVLfAzNJDR2slv oJQvJ4UV1mcw6YKzZCkKKYStIfUmYvDwbXyRpGWuxOr7QlMdvmxRBjkX2pJ9ZwCmTF76 uNRT4ialEAjfLmRnn+5UGWMXEjJMH2n17fHZSLo5T9DCvyKPxjWRvuPwQFAG2bYVaxQa Mah8e78xabPDPvkSImmPQC4TSaRYq6omUSCe+SVzGjgIMzBhuqja0nthrZlUPtITZ79m JGE+X5i+3swR/q3QD1FDWDeMu6trUOorYscL4BE5lCh4hsKtFXW48JgNeertFgQTdliv xtNw== X-Gm-Message-State: AOAM533WJg/sW7tQC+FwAePrJfDjwVvZ/weOPUe2cj5ATkn7AV/vXPuy DdEegwvsZJ0QFSQCUEEdQWpfHSztTeqGpqs9jq4= X-Received: by 2002:a05:6830:33ef:: with SMTP id i15mr11028481otu.311.1624048416499; Fri, 18 Jun 2021 13:33:36 -0700 (PDT) MIME-Version: 1.0 References: <20210617023109.204591-1-pulehui@huawei.com> In-Reply-To: From: Alex Deucher Date: Fri, 18 Jun 2021 16:33:25 -0400 Message-ID: Subject: Re: [PATCH -next] drm/amd/display: Fix gcc unused variable warning To: Harry Wentland Cc: Pu Lehui , "Leo (Sunpeng) Li" , "Deucher, Alexander" , Christian Koenig , xinhui pan , Dave Airlie , Daniel Vetter , Jun Lei , Wenjing Liu , Anson Jacob , Qingqing Zhuo , Wesley Chalmers , Jimmy.Kizito@amd.com, "Cyr, Aric" , Martin Tsai , jinlong zhang , zhangjinhao2@huawei.com, Maling list - DRI developers , amd-gfx list , LKML Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Applied. Thanks! Alex On Thu, Jun 17, 2021 at 2:43 PM Harry Wentland wro= te: > > On 2021-06-16 10:31 p.m., Pu Lehui wrote: > > GCC reports the following warning with W=3D1: > > > > drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_dp.c:3635:17: > > warning: > > variable =E2=80=98status=E2=80=99 set but not used [-Wunused-but-set-v= ariable] > > 3635 | enum dc_status status =3D DC_ERROR_UNEXPECTED; > > | ^~~~~~ > > > > The variable should be used for error check, let's fix it. > > > > Signed-off-by: Pu Lehui > > Reviewed-by: Harry Wentland > > Harry > > > --- > > drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c b/drivers= /gpu/drm/amd/display/dc/core/dc_link_dp.c > > index fcb635c85330..cf29265870c8 100644 > > --- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c > > +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c > > @@ -3681,6 +3681,10 @@ bool dp_retrieve_lttpr_cap(struct dc_link *link) > > DP_LT_TUNABLE_PHY_REPEATER_FIELD_DATA_STR= UCTURE_REV, > > lttpr_dpcd_data, > > sizeof(lttpr_dpcd_data)); > > + if (status !=3D DC_OK) { > > + dm_error("%s: Read LTTPR caps data failed.\n", __= func__); > > + return false; > > + } > > > > link->dpcd_caps.lttpr_caps.revision.raw =3D > > lttpr_dpcd_data[DP_LT_TUNABLE_PHY_REPEATE= R_FIELD_DATA_STRUCTURE_REV - > > > > _______________________________________________ > amd-gfx mailing list > amd-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx