Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp3611644rwl; Mon, 27 Mar 2023 17:13:29 -0700 (PDT) X-Google-Smtp-Source: AKy350Z4qOGU6M9v14grCjkw7Fhnrwuyhr0/3gIymZYEyBGMYJy/jPutsFiFppMaK7DP9ILJdA9X X-Received: by 2002:a17:906:4d8b:b0:92b:f8ce:4e75 with SMTP id s11-20020a1709064d8b00b0092bf8ce4e75mr13219499eju.72.1679962409295; Mon, 27 Mar 2023 17:13:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679962409; cv=none; d=google.com; s=arc-20160816; b=0yb+foAIT5s6SSzpVUXS7u7A6OUtSOJy5lGadkvBOT2k5TdeUZa7ScOKGJPyYZxGdE hm5lnZ5naFOJPpvODJ9IjXI2HAMU2JOx6JYP7hX754KTloAORDItG43ukWoAmaChQdSd a+sspC6RUXK/Ib3gsw2fudvEMa4I2oasM/C5aKINgl/YL9lklIZ00aX4Y1bc2Fb1QnZh KSPBGgK2+z4CzYF4+YXrxwBXDQKgWseE8QbgJfODXL9A/Hcc9H8dHJPeRsI7yVTHpUPW n/T02pc9xF/YL685LS4Dt+g5etYUSDKQ9iNGMS9VBeQmr1BAh3G0CYZ6snynoXlvOlCA 6eLg== 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=6uOJzLF5++wuNkGYdTRIM5Imo+cCIkOUu91mcxK3VoM=; b=svqQJQH+BUfQfXcVr5wObsl6cQO6Yu0kpRVjiNFVmN83bwCeUDQ9wwLgscV9t+A4ZA HsDB/5NYVjCr16rrNQZIV1pR4UbM7dy7sS7s4cipEkFyr9W+C9v+RlCA0EQM0+38SfAk 2XzqR7bUtEsn+LvVnGddpFHz37U/HQapV1/mcXCk5v8Y5fg4I9l7yMSR1yq0q6gq6Jys XlXZNlhRhbUlLWesJb7pAmFZxoL1f2ACxVHTodf84xxxwAcJu73Pa3BHAjbVI9aJ8QYd ZW3gRtKGtlSW6h9WeHx5LR+IksrX2yxAAkW6YTSiBa0iN6K3oj/ghBWM32SfWuiiMCk+ l4Wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=BEXIiX+2; 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 fy19-20020a1709069f1300b0093b854a4922si14747953ejc.486.2023.03.27.17.13.03; Mon, 27 Mar 2023 17:13:29 -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=BEXIiX+2; 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 S229985AbjC0XsW (ORCPT + 99 others); Mon, 27 Mar 2023 19:48:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229464AbjC0XsT (ORCPT ); Mon, 27 Mar 2023 19:48:19 -0400 Received: from mail-ot1-x32d.google.com (mail-ot1-x32d.google.com [IPv6:2607:f8b0:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2F35C3 for ; Mon, 27 Mar 2023 16:48:17 -0700 (PDT) Received: by mail-ot1-x32d.google.com with SMTP id r40-20020a05683044a800b006a14270bc7eso2152094otv.6 for ; Mon, 27 Mar 2023 16:48:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679960897; 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=6uOJzLF5++wuNkGYdTRIM5Imo+cCIkOUu91mcxK3VoM=; b=BEXIiX+2N7jyn0zT6SrIbqb3pyq9kKoUg0pavRgLNSD2dNuJP0SnsvDojBtp9m4nga n7buh4tfRiFKpjX3AUMrJMlPdV5kTiTXG+WT1XYIDbls/IPVeZhYgyoa5h6iCSlSDFxo jenQcOfc/sHV1+0oTgeK6lHYkvyvmb30b0vlwXYOtBybKY+NluOMxPG9WAOYtzqAVy7W u1JM0nhEng/1nn1y1MyVcl1gqXBPCVkZQYJlqSdVzzMREJiWNdItKvmW/Ljw06fdzUH4 vD1rgzKaRyDYElynqN41T1Bhebs9x8qUTJIfpiD1D9bW4VVIIzjmFuAxtar2qOoFHdhZ m62Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679960897; 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=6uOJzLF5++wuNkGYdTRIM5Imo+cCIkOUu91mcxK3VoM=; b=3NAe4b8TE4NgjhUrcLcJFZWSnnu0jyLHOOIK6FntohJEeozGAjeAnHDb8bsZKL9Zrg UOum7Ax9zDuvQHr6WPyebArWfkg9Uhyksqc7Nae8EuOQ2nxtc7e4xPbZrO6zcNJqH/gX QE8BApk1Yk4yseTmosnVcXXCXtzwNcQ4DsdmBD5eTibftzLy8tzFCp21aBH7qC0VJFKy YmKGSC/HbikdhSNjokLUkMRDgAApUcZQpitpSehKTk8Zmw9M3FlYM+y8lH1xDn1AwBOl ltuXh4Tr5ya+EnZuFT5XIlQYM3/Xx3hKAajjF/g0LhjdH69uMczLYYDEJpYozuvHSkDG ULwA== X-Gm-Message-State: AO0yUKWoiSK6UxLeikVYPucD/NccKY56d8BzqMi+3D+L6LQnlyTqtdd1 fYXbPyvg0+kWDZyTxznMjAIbAa0r7tudVXtZX44= X-Received: by 2002:a05:6830:1bed:b0:69f:882:cdb2 with SMTP id k13-20020a0568301bed00b0069f0882cdb2mr4519086otb.3.1679960897109; Mon, 27 Mar 2023 16:48:17 -0700 (PDT) MIME-Version: 1.0 References: <20230327233353.64081-1-caionovais@usp.br> <20230327233353.64081-3-caionovais@usp.br> In-Reply-To: <20230327233353.64081-3-caionovais@usp.br> From: Alex Deucher Date: Mon, 27 Mar 2023 19:48:06 -0400 Message-ID: Subject: Re: [PATCH 02/12] drm/amd: Remove unused variable 'value0' 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 , Charlene Liu , Gabe Teeger , Rodrigo Siqueira , Taimur Hassan , Aurabindo Pillai , Alvin Lee , George Shen , Hamza Mahfooz , Chaitanya Dhere , 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?= , 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:34=E2=80=AFPM Caio Novais wro= te: > > Compiling AMD GPU drivers displays a warning: > > drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_link_encoder.c: In f= unction =E2=80=98dcn10_link_encoder_update_mst_stream_allocation_table=E2= =80=99: > drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_link_encoder.c:1222:= 18: warning: variable =E2=80=98value0=E2=80=99 set but not used [-Wunused-b= ut-set-variable] > > Get rid of it by removing the variable. > > Signed-off-by: Caio Novais > --- > drivers/gpu/drm/amd/display/dc/dcn10/dcn10_link_encoder.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_link_encoder.c b/= drivers/gpu/drm/amd/display/dc/dcn10/dcn10_link_encoder.c > index c4287147b853..81aa1631945a 100644 > --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_link_encoder.c > +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_link_encoder.c > @@ -1219,7 +1219,6 @@ void dcn10_link_encoder_update_mst_stream_allocatio= n_table( > const struct link_mst_stream_allocation_table *table) > { > struct dcn10_link_encoder *enc10 =3D TO_DCN10_LINK_ENC(enc); > - uint32_t value0 =3D 0; > uint32_t value1 =3D 0; > uint32_t value2 =3D 0; > uint32_t slots =3D 0; > @@ -1321,8 +1320,6 @@ void dcn10_link_encoder_update_mst_stream_allocatio= n_table( > do { > udelay(10); > > - value0 =3D REG_READ(DP_MSE_SAT_UPDATE); This reads a register. Removing it may adversely affect the programming sequence. If you want to avoid the set but unused warning, just drop the assignment, but leave the REG_READ. Alex > - > REG_GET(DP_MSE_SAT_UPDATE, > DP_MSE_SAT_UPDATE, &value1); > > -- > 2.40.0 >