Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp3616438rwl; Mon, 27 Mar 2023 17:18:09 -0700 (PDT) X-Google-Smtp-Source: AKy350aoS8GS2GkBtb7mOaQTc02SKp4kToFF2C+zegQkG1yhl/X5zDvxMl7dpT5lb8EvQwyeJqiy X-Received: by 2002:a17:902:f552:b0:1a1:7899:f009 with SMTP id h18-20020a170902f55200b001a17899f009mr18905257plf.17.1679962688908; Mon, 27 Mar 2023 17:18:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679962688; cv=none; d=google.com; s=arc-20160816; b=Djpf7gulkjog06EFcywIZaqvOjlmeY1K8dyf8ss3i+JmYdFdjaujviONwoeyz9Bjbd FRtyDDUhwtH8qGBjJPsHL3H391C1fmPTIRqU2iL8qYhBCdkfMUEuGfjaD+Thk/jLJB7u oEN0/iJ2d3o/WfbKnmw+bBPseEh/zrGCVJ3+3fneGUBY6ODQL9iTv6kKMa0cHeKAfe/s JAtaS8jaUIq0aClxemPB7RYZ4A+B93RUTp3cFdh1Srlu8iUjFTp8Q8+nqcgnTiGyZ2uO rcHUU7mYUEpt1WBIOj2anTRABMT5S3f5aZEbJZxf0oqNV8LTTW3QmIz5Mns4K2HiMNSN Fggg== 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=pvfG/sJDNh6x3AiUliOCMknfI21NvjU25RdQJEzyP8A=; b=h0KbwXLJatxLk8bSzSeIYC/RvL87LyWUXfrW54ZV2osqeArFU/Btwa8AoMj36hZkwR pfI5dkq9Q6rP1AiNsZlX0LQk6pOuEgq1skiBA4oMDiDsVdFEfZvkqzaf9eBf+cl1hAiJ CqhoyMzuXst5efLNPifdUfa1xmVXouE8MrF4yPjHLyizF/rt7vLTGAZ/05W+iFkj8Y/+ D0/RhGKumrh3zTGM3pi9F1O9J/ZOYuYJSior4D5EKSgj1LeqYiJsdLtOd4c18smLFo2t WbbdreDRzH6ephv+kiHNqvxS6lHuWwU6Xlt6H782ptMPh60OyI2z94P1GdYFJNcPGHJP hYJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=MYPGNBP4; 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 n8-20020a170902d2c800b0019a95ab6b4esi30495832plc.407.2023.03.27.17.17.56; Mon, 27 Mar 2023 17:18:08 -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=MYPGNBP4; 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 S231510AbjC0Xu4 (ORCPT + 99 others); Mon, 27 Mar 2023 19:50:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229464AbjC0Xuz (ORCPT ); Mon, 27 Mar 2023 19:50:55 -0400 Received: from mail-ot1-x32c.google.com (mail-ot1-x32c.google.com [IPv6:2607:f8b0:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C12F7A4 for ; Mon, 27 Mar 2023 16:50:54 -0700 (PDT) Received: by mail-ot1-x32c.google.com with SMTP id f4-20020a9d0384000000b0069fab3f4cafso5484489otf.9 for ; Mon, 27 Mar 2023 16:50:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679961054; 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=pvfG/sJDNh6x3AiUliOCMknfI21NvjU25RdQJEzyP8A=; b=MYPGNBP4nTAo5fxXA952/OQc20MLsrdRQS+oVbKlpL8MXIzT//V+W+PQti/X4qdkRU L55z4DuS3jfvnLK5B2bMk6Mrp0MlImpXNpi4ChvyPUpjv4cpqvrhkollkk3ikFIuiGCp 5hh3w+dJnAPmnN6clXxs8qqZQvMOisaQhBBl36MgWkiVPUvP7Hyq8a29C5V9UwbzpaR/ kOfHQf2ZhghR8VnQxFzeGtgofd5U/Hl0k4GE6WcVm3iN0k1KhqrkUc/iqj1ogOxsmeh6 IHnSsjUijQOEY6B2Kk9tKpWYh9CFHLJ/TNA5eUW6JD918eZ7wV3YtPBr0VSWbIoUwBC1 gWbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679961054; 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=pvfG/sJDNh6x3AiUliOCMknfI21NvjU25RdQJEzyP8A=; b=HcI7ArC0TUh2CdCGW/+SUds+gVPYp9obatcl9OtyI9wg98BAafSjbD8pFciJhoKz3v cePDASRGT7tRrz68xlg9oq1nT0w9xHUEtlq2i71eRCd38Hb++iSyf5fnVdyPA2VN6kZI DRMicSFkq8ssJAV4ZIcVFTvTgiOVIMStyMinFJGR/+yMwVcBz85zfUfZ4ORPS+2TsLBk M5S9E2Rm2CCMI9gPGeGbtj0wnWL1poXGUTyNQw+zIi+FxhrYkBah9hVHpWW2aaVktSln ABXHh+MQd2Nmzu7llI6+X2CIUdI75UZKK1tdM5VR/5HfFLKz5zBDjrRuD2kr9Yn453ZS VTFg== X-Gm-Message-State: AO0yUKVOYcTQdIPyQbguxJEKQRX9aJceE3PGhgJUwpDnL8X8FieiUEff KKWFA9WYqpWHhSCsxEG8zJwpKOlBXaBg0TMr36U= X-Received: by 2002:a9d:65d1:0:b0:68b:d3f1:aa1b with SMTP id z17-20020a9d65d1000000b0068bd3f1aa1bmr4636093oth.3.1679961054024; Mon, 27 Mar 2023 16:50:54 -0700 (PDT) MIME-Version: 1.0 References: <20230327233353.64081-1-caionovais@usp.br> <20230327233353.64081-10-caionovais@usp.br> In-Reply-To: <20230327233353.64081-10-caionovais@usp.br> From: Alex Deucher Date: Mon, 27 Mar 2023 19:50:42 -0400 Message-ID: Subject: Re: [PATCH 09/12] drm/amd/display: Remove two unused variables 'is_pipe_split_expected' and 'state' 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:35=E2=80=AFPM Caio Novais wro= te: > > Compiling AMD GPU drivers displays two warnings: > > drivers/gpu/drm/amd/amdgpu/../display/dc/dcn32/dcn32_resource.c: In funct= ion =E2=80=98dcn32_acquire_post_bldn_3dlut=E2=80=99: > drivers/gpu/drm/amd/amdgpu/../display/dc/dcn32/dcn32_resource.c:1614:31: = warning: variable =E2=80=98state=E2=80=99 set but not used [-Wunused-but-se= t-variable] > and > drivers/gpu/drm/amd/amdgpu/../display/dc/dcn32/dcn32_resource.c: In funct= ion =E2=80=98dcn32_populate_dml_pipes_from_context=E2=80=99: > drivers/gpu/drm/amd/amdgpu/../display/dc/dcn32/dcn32_resource.c:1916:17: = warning: variable =E2=80=98is_pipe_split_expected=E2=80=99 set but not used= [-Wunused-but-set-variable] > > Get rid of them by removing the variables. > > Signed-off-by: Caio Novais > --- > drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 4 ---- > 1 file changed, 4 deletions(-) > > diff --git a/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c b/driv= ers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c > index 74e50c09bb62..3435d3294e0b 100644 > --- a/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c > +++ b/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c > @@ -1611,7 +1611,6 @@ bool dcn32_acquire_post_bldn_3dlut( > struct dc_transfer_func **shaper) > { > bool ret =3D false; > - union dc_3dlut_state *state; > > ASSERT(*lut =3D=3D NULL && *shaper =3D=3D NULL); > *lut =3D NULL; > @@ -1620,7 +1619,6 @@ bool dcn32_acquire_post_bldn_3dlut( > if (!res_ctx->is_mpc_3dlut_acquired[mpcc_id]) { > *lut =3D pool->mpc_lut[mpcc_id]; > *shaper =3D pool->mpc_shaper[mpcc_id]; > - state =3D &pool->mpc_lut[mpcc_id]->state; > res_ctx->is_mpc_3dlut_acquired[mpcc_id] =3D true; > ret =3D true; > } > @@ -1913,7 +1911,6 @@ int dcn32_populate_dml_pipes_from_context( > struct resource_context *res_ctx =3D &context->res_ctx; > struct pipe_ctx *pipe; > bool subvp_in_use =3D false; > - uint8_t is_pipe_split_expected[MAX_PIPES] =3D {0}; > struct dc_crtc_timing *timing; > > dcn20_populate_dml_pipes_from_context(dc, context, pipes, fast_va= lidate); > @@ -2002,7 +1999,6 @@ int dcn32_populate_dml_pipes_from_context( > } > > DC_FP_START(); > - is_pipe_split_expected[i] =3D dcn32_predict_pipe_split(co= ntext, &pipes[pipe_cnt]); > DC_FP_END(); You can drop the DC_FP macros as well if you drop the function call. Alex > > pipe_cnt++; > -- > 2.40.0 >