Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp3615483rwl; Mon, 27 Mar 2023 17:17:10 -0700 (PDT) X-Google-Smtp-Source: AKy350a2EskRgFDY19nCvNZqR1Kv2iS1oa2Vm9rnEDsiqmCfC+h30cv++kht2u0v3bpTTCfDif2T X-Received: by 2002:a17:902:f90e:b0:1a1:d949:a54a with SMTP id kw14-20020a170902f90e00b001a1d949a54amr10322029plb.58.1679962630353; Mon, 27 Mar 2023 17:17:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679962630; cv=none; d=google.com; s=arc-20160816; b=kyCnsogLpacvzYFTxCL+HayDd+0JwhcYRWspe905h9fhQJlx872DwCmo6BAeCszARH YWq7vbv895bznl0cCzLRrJXso2qTIKeMk+zrDz2eG0vjGrxAQi5luXQ2mJJrkOoFj1Rs noLs5tM/OX/pDNQOps6sOn6rWKT2xvi75Vl0HdJeRl33D4vRAgZJpYBR6CmnQtfb5ZX3 cutHpzdG/8qOoxvEcbHybdcngWB6SRsI3tTDqIlzF65tHZFiA+SP2I18BQ0vvkFfZVoj 5iio1PFwVRPTmNo20odfbAT5SnT6wh+KBGB8qwZRUnT+ruvGcLjdKcj8ZSA7muzyUFVT jtBQ== 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=TEINlP1HTf0KiWQiW/MMP3STi+t5LIT7u9Uiqkj5UJc=; b=Zeg0N9OVQjvleFaDwXbt1jnS9r35QntkHOlBpfQyMpYDDUAveoJ+QiqfNqOJtdIoVe 6MvFXuRXXunIe9bkBpfEwjfbqO6aPqt/MeNC0RN7/VKzwN78lTwP4nP4iu5Bl4862W75 pR1FVYdxygeMKleN6Oy6fNPlDTot+alEt+RaMwVTrT+dUNNYBpeFzXp2oDjyavezodgk vJLIxVCrVsN1qoGHUrrYh6jgVzlE1XQu6xupmAUix/3AGsh1j+ZKH2yxtngxZkTPpUld 8vBxDIQv0ODx4DQJ12PEd6u4tpdK3WUg0XHzBt3PtWx+nHQyo8xXKNACVMMcuGkie/e/ /XaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=K2dxzzZs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l6-20020a170903244600b001a045125bfbsi29319682pls.317.2023.03.27.17.16.57; Mon, 27 Mar 2023 17:17:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=K2dxzzZs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S231892AbjC0Xxv (ORCPT + 99 others); Mon, 27 Mar 2023 19:53:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229464AbjC0Xxt (ORCPT ); Mon, 27 Mar 2023 19:53:49 -0400 Received: from mail-oi1-x230.google.com (mail-oi1-x230.google.com [IPv6:2607:f8b0:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD64E1732 for ; Mon, 27 Mar 2023 16:53:48 -0700 (PDT) Received: by mail-oi1-x230.google.com with SMTP id b19so7720859oib.7 for ; Mon, 27 Mar 2023 16:53:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679961228; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=TEINlP1HTf0KiWQiW/MMP3STi+t5LIT7u9Uiqkj5UJc=; b=K2dxzzZsJDLZD3ld0NfxIEYLnm3YZT2Su7+tRCOuZnSZt3j5r6RFHXIy1P3ksfrLma oxL9uvMxqRbsLL098604bLhslDNARwyyii/RCDP2lbUAo5+/phe2w2zTSP0nNuha6XRa dVfbfGkNM5CL/bFJoxRcGGf3eoj5oPRsoWUIC95N9wVloK2an/UXxh7lqZX6fNIDUja6 lC4+c1+vfT4reBg2GEDww8nbWIFjDT8CXSXKjeUOrgmxjv5gj/kW7LzQoiXkBFaKQ5WA an9tiQUDxD2YDKY3RMq65R6G/n0d2eYuJA+gHTWgvfx2v2/y1/Wtaz/4iXJY75cREBsy FPWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679961228; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TEINlP1HTf0KiWQiW/MMP3STi+t5LIT7u9Uiqkj5UJc=; b=bs8xDfCl3NLVPKOO8YDfddAokKJpPhCdGfijtgsBbqHZ8jtlc+3ZIwPXetXPuaIO7b UybIxSUQCsH8NXXH+aHBi7BKl4yvl9TVlcSZ+sa2pheOl6+ngBXXuKJcNdgRiJjN8QiK D6CSrxiEEuUSZgIdquwTbpeLU8YP+MOSEuAJOBFrHwhsi1wqB5NQKZbH2cYwc/nS8QWe o17VHtdd8jfA/h5whn9ze3xWDfna8fAjwjuE5e44/SrrXjD4XGnfIThwXuy1lmRAJQwy MYSBbGeVoFnGX4eRVdlxQDEflmDpAuyVbP7CSSQPvEUJNLI2teklNYlbMkoW3Er+s+cK ZSzw== X-Gm-Message-State: AO0yUKV8V7yQLgXjaKb+11KpXrNr/qTiJrV1GBaZFR04xp/1pIw4VpjC UnsuPoLoJ9Oh9WNRkfPQFBqQrtAHYvMwKzJPTAg= X-Received: by 2002:a05:6808:1981:b0:384:253:642d with SMTP id bj1-20020a056808198100b003840253642dmr3959709oib.3.1679961227991; Mon, 27 Mar 2023 16:53:47 -0700 (PDT) MIME-Version: 1.0 References: <20230327233353.64081-1-caionovais@usp.br> <20230327233353.64081-13-caionovais@usp.br> In-Reply-To: <20230327233353.64081-13-caionovais@usp.br> From: Alex Deucher Date: Mon, 27 Mar 2023 19:53:36 -0400 Message-ID: Subject: Re: [PATCH 12/12] drm/amd/display: Remove two unused variables 'result_write_min_hblank' and 'hblank_size' To: Caio Novais Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Felipe Clark , Wenjing Liu , =?UTF-8?B?TWHDrXJhIENhbmFs?= , Mario Limonciello , Jun Lei , David Airlie , Charlene Liu , Gabe Teeger , Rodrigo Siqueira , Taimur Hassan , Aurabindo Pillai , Alvin Lee , George Shen , Hamza Mahfooz , Chaitanya Dhere , Harry Wentland , Alan Liu , Mukul Joshi , =?UTF-8?Q?Andr=C3=A9_Almeida?= , Jingwen Zhu , Guo Zhengkui , Leo Li , Melissa Wen , Le Ma , Jiapeng Chong , Martin Leung , Ryan Lin , Brian Chang , Sung Joon Kim , Yifan Zhang , Jack Xiao , Dillon Varone , Tom Chung , Wesley Chalmers , Qingqing Zhuo , "Pan, Xinhui" , Zhan Liu , Roman Li , =?UTF-8?Q?Christian_K=C3=B6nig?= , Daniel Vetter , Wayne Lin , Alex Deucher , Ethan Wellenreiter , Nicholas Kazlauskas , Joshua Ashton , Hawking Zhang Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 27, 2023 at 7:36=E2=80=AFPM Caio Novais wro= te: > > Compiling AMD GPU drivers displays a warning: > > drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_dp_capabilit= y.c: In function =E2=80=98dpcd_set_source_specific_data=E2=80=99: > drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_dp_capabilit= y.c:1290:32: warning: variable =E2=80=98result_write_min_hblank=E2=80=99 se= t but not used [-Wunused-but-set-variable] > > Get rid of it by removing the variable 'result_write_min_hblank' and 'hbl= ank_size'. > > Signed-off-by: Caio Novais > --- > .../drm/amd/display/dc/link/protocols/link_dp_capability.c | 7 ------- > 1 file changed, 7 deletions(-) > > diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capabi= lity.c b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c > index d4370856f164..7392fcf17653 100644 > --- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c > +++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c > @@ -1287,7 +1287,6 @@ void dc_link_overwrite_extended_receiver_cap( > void dpcd_set_source_specific_data(struct dc_link *link) > { > if (!link->dc->vendor_signature.is_valid) { > - enum dc_status result_write_min_hblank =3D DC_NOT_SUPPORT= ED; > struct dpcd_amd_signature amd_signature =3D {0}; > struct dpcd_amd_device_id amd_device_id =3D {0}; > > @@ -1324,16 +1323,10 @@ void dpcd_set_source_specific_data(struct dc_link= *link) > if (link->ctx->dce_version >=3D DCN_VERSION_2_0 && > link->dc->caps.min_horizontal_blanking_period != =3D 0) { > > - uint8_t hblank_size =3D (uint8_t)link->dc->caps.m= in_horizontal_blanking_period; > - > - result_write_min_hblank =3D core_link_write_dpcd(= link, > - DP_SOURCE_MINIMUM_HBLANK_SUPPORTED, (uint= 8_t *)(&hblank_size), > - sizeof(hblank_size)); This writes to the monitor. We shouldn't remove this. > } > DC_TRACE_LEVEL_MESSAGE(DAL_TRACE_LEVEL_INFORMATION, > WPP_BIT_FLAG_DC_D= ETECTION_DP_CAPS, > "result=3D%u link= _index=3D%u enum dce_version=3D%d DPCD=3D0x%04X min_hblank=3D%u branch_dev_= id=3D0x%x branch_dev_name=3D'%c%c%c%c%c%c'", > - result_write_min_= hblank, You are dropping information from the debug logging. Maybe it would be better to just flag this as maybe unused. Also, I'd suggest rebasing on the latest amdgpu -next branch, as I think a lot of these were already fixed last week or the week before. Alex > link->link_index, > link->ctx->dce_ve= rsion, > DP_SOURCE_MINIMUM= _HBLANK_SUPPORTED, > -- > 2.40.0 >