Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp319325rwl; Thu, 30 Mar 2023 16:48:51 -0700 (PDT) X-Google-Smtp-Source: AKy350aPN2ejpWPHbaEiB2715O3SkL9sc06O0Ep6JGm3sb1X+fmSPWxyLR1UUGvhhMi8LlqXKOyR X-Received: by 2002:a17:906:dd:b0:93e:22e6:e7d1 with SMTP id 29-20020a17090600dd00b0093e22e6e7d1mr3568587eji.3.1680220131721; Thu, 30 Mar 2023 16:48:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680220131; cv=none; d=google.com; s=arc-20160816; b=Wwv6zCe6uPdg0xXBHzVCPGDBI6i8i9BsTncGsFDFLL2W8usDtm4QFfR9CKmaADqO+3 6DyK+a2L3/MzccEpgBNbdGmQA6WaOE8rs8pjm+XrMotDOBM7LULN/y0+w8xezaCovAX3 81VxRGjp4kUwe3vrzoEVQE1tHsE6WGPVYhfPyq1AlghBjTAr0yUfsMfXHIDj7bZdrc01 Y4Xc0ya+t0C89hIPWvT6JWc+6hvVvcyAqcBrZ8yH5PH5rFRjzd0KBd37hrVJGAGAF/5O mcb223POD+z+GvNzh4CB+3Ra/aulTL65LIJ0lDsMqmsmlLwDkAXEwnaaxBGyH7/yY+Ep UXVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=sxdUBC3+7/+FoRE3AV8lIbZMqGBJVuxDsooJhZM+Js0=; b=mJUlZTGHWPgfv9FEJI6QAKIn1JpHw8Lmfxmkl4rgzuI9NRbQb0nzCsCbSAz+STcdew PdfvxIMat9nnb30cxQ4g/glYffdnnZwJuS0wBCLUi+Z+/DaOsBpp/f057XYbQz41vXMN 1kmcn2AMoQcv8fgDaU96pfCMsc022r0LkBPsqwkca695jqGvqtTlvrU9wzc/6vnwknGk 8ERcQOfxH9ghnW2a73rbvDhChSNyGA9NSZ7+iLYyD+kr4CUtF4G/8Vtv38fkkKkUCV0W uxbIf1hRMoG4u8uIUKB+cxHtrmUJLfkNVrRsk1zepd97EIyzrTjoRYEO9yUtQYLaveat 7ipA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Xhpjhzhl; 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=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u15-20020a170906408f00b008db0f267ccbsi744865ejj.874.2023.03.30.16.48.24; Thu, 30 Mar 2023 16:48:51 -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=@redhat.com header.s=mimecast20190719 header.b=Xhpjhzhl; 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=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231304AbjC3XoI (ORCPT + 99 others); Thu, 30 Mar 2023 19:44:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231735AbjC3XoA (ORCPT ); Thu, 30 Mar 2023 19:44:00 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33048C148 for ; Thu, 30 Mar 2023 16:43:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680219789; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=sxdUBC3+7/+FoRE3AV8lIbZMqGBJVuxDsooJhZM+Js0=; b=XhpjhzhlCl9o4t9L7XPe81ywFngSnHEBhkJE4zuNr8OoXa2laHCbKCDd89ilfOlxxR2dXS k+g/d5QP1+kDKwx+/qTySSpGidJdH+eR/T+HvGQs6qNlpUGVJNebPPL1Aywc4+Fy4fLS9F Efa3/Yt1Mlb0UPcaQUpTkx1nY9tATa0= Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-619-OEfhCQ2bPuWTFdYvkcAxpw-1; Thu, 30 Mar 2023 19:43:08 -0400 X-MC-Unique: OEfhCQ2bPuWTFdYvkcAxpw-1 Received: by mail-qv1-f72.google.com with SMTP id px9-20020a056214050900b005d510cdfc41so9102983qvb.7 for ; Thu, 30 Mar 2023 16:43:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680219787; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=sxdUBC3+7/+FoRE3AV8lIbZMqGBJVuxDsooJhZM+Js0=; b=T/DH4vc2FfVrssUn1dd90AOqm3T+snPdYnnBF3OKcXPBk38o+0zxxqeRPou2MjIwVM tTjoxe6caUgWWPjYerYI12inK81+CztfP1q9nuLMfwsSnIhscBd+dZW5DNcpn2zXpJrW 6INRVFXukrYBVBHdCdMXkhRlk4AX78Bumk7d3grTWk3RJ+c31CNHYgG3YWhS5JOVvIhe x7Q/2IwEWOMoYvUzJf8FJgMTHY59GvcV5xo9h93KywNsxBF3rMYf1nRoQj3AJMfNcPsm k23mp5oURJDvIEX7eOS9ZrtQJJZyMBPIOniu2QUmPQSyeOWGorNfMHiMzH3tH0DU05yV QpiQ== X-Gm-Message-State: AO0yUKVChELPMc1+q1nTU4PvdqleWSnhzy2M28fOg22l9B2cl76v8oBd Gf+g6wcI/yDSU0Wp9sVTQasSpjYlsMy4frVqvXStLKzE/3Jy1xFxSynnc56uAZlI9VLSCzoJQZS GYRGK7BRqyhQygohuBOeRWVe/ X-Received: by 2002:a05:622a:1a98:b0:3d8:9b45:d362 with SMTP id s24-20020a05622a1a9800b003d89b45d362mr38620994qtc.28.1680219787540; Thu, 30 Mar 2023 16:43:07 -0700 (PDT) X-Received: by 2002:a05:622a:1a98:b0:3d8:9b45:d362 with SMTP id s24-20020a05622a1a9800b003d89b45d362mr38620961qtc.28.1680219787200; Thu, 30 Mar 2023 16:43:07 -0700 (PDT) Received: from dell-per740-01.7a2m.lab.eng.bos.redhat.com (nat-pool-bos-t.redhat.com. [66.187.233.206]) by smtp.gmail.com with ESMTPSA id q19-20020ac87353000000b003e387a2fbdfsm235015qtp.0.2023.03.30.16.43.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Mar 2023 16:43:06 -0700 (PDT) From: Tom Rix To: harry.wentland@amd.com, sunpeng.li@amd.com, Rodrigo.Siqueira@amd.com, alexander.deucher@amd.com, christian.koenig@amd.com, Xinhui.Pan@amd.com, airlied@gmail.com, daniel@ffwll.ch, nathan@kernel.org, ndesaulniers@google.com, HaoPing.Liu@amd.com, aric.cyr@amd.com, chiahsuan.chung@amd.com, felipe.clark@amd.com, Angus.Wang@amd.com, hanghong.ma@amd.com, lv.ruyi@zte.com.cn, Dillon.Varone@amd.com Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Tom Rix Subject: [PATCH] drm/amd/display: remove unused average_render_time_in_us and i variables Date: Thu, 30 Mar 2023 19:43:03 -0400 Message-Id: <20230330234303.1845377-1-trix@redhat.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE 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 clang with W=1 reports drivers/gpu/drm/amd/amdgpu/../display/modules/freesync/freesync.c:1132:15: error: variable 'average_render_time_in_us' set but not used [-Werror,-Wunused-but-set-variable] unsigned int average_render_time_in_us = 0; ^ This variable is not used so remove it, which caused i to be unused so remove that as well. Signed-off-by: Tom Rix --- .../drm/amd/display/modules/freesync/freesync.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c b/drivers/gpu/drm/amd/display/modules/freesync/freesync.c index 315da61ee897..5c41a4751db4 100644 --- a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c +++ b/drivers/gpu/drm/amd/display/modules/freesync/freesync.c @@ -1129,7 +1129,6 @@ void mod_freesync_handle_preflip(struct mod_freesync *mod_freesync, { struct core_freesync *core_freesync = NULL; unsigned int last_render_time_in_us = 0; - unsigned int average_render_time_in_us = 0; if (mod_freesync == NULL) return; @@ -1138,7 +1137,6 @@ void mod_freesync_handle_preflip(struct mod_freesync *mod_freesync, if (in_out_vrr->supported && in_out_vrr->state == VRR_STATE_ACTIVE_VARIABLE) { - unsigned int i = 0; unsigned int oldest_index = plane->time.index + 1; if (oldest_index >= DC_PLANE_UPDATE_TIMES_MAX) @@ -1147,18 +1145,6 @@ void mod_freesync_handle_preflip(struct mod_freesync *mod_freesync, last_render_time_in_us = curr_time_stamp_in_us - plane->time.prev_update_time_in_us; - /* Sum off all entries except oldest one */ - for (i = 0; i < DC_PLANE_UPDATE_TIMES_MAX; i++) { - average_render_time_in_us += - plane->time.time_elapsed_in_us[i]; - } - average_render_time_in_us -= - plane->time.time_elapsed_in_us[oldest_index]; - - /* Add render time for current flip */ - average_render_time_in_us += last_render_time_in_us; - average_render_time_in_us /= DC_PLANE_UPDATE_TIMES_MAX; - if (in_out_vrr->btr.btr_enabled) { apply_below_the_range(core_freesync, stream, -- 2.27.0