Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2157042iof; Tue, 7 Jun 2022 21:39:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzTt/ecjL7O9tXGF8IKhwA2oUuBBd5R2VsCHssgqNBBvk3DW43kg6zQvcoBHvkfpJFXjOvr X-Received: by 2002:a17:90b:3b4e:b0:1e8:743a:735c with SMTP id ot14-20020a17090b3b4e00b001e8743a735cmr17541674pjb.189.1654663197982; Tue, 07 Jun 2022 21:39:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654663197; cv=none; d=google.com; s=arc-20160816; b=iPEQhucyRKBYslSkOktiY/Pnusu85F22FB4ii3+OuQHf6Xq4GsFuRmn9Dk+5RTaFCG 3XXiOrLTN9g/i0gUnsFIjLFlOpHHlDGTTnVtby40eFBEW0TE1epV68PwqRtsvjjUXRJU jr3/mH4XREcyOp3qORxCehzK4w8wYT/gehXpGbhWNVqO9lq2axkAxvC13uM/qzcwKcwQ +cEedYWqNCd02iboMZpAr4ieMWOFZZJc1prUf9cUIoZymvdwlGeF4BzinZ+mcuUdG0oI QBlEE3gffKJl+LvhpfyvS4fJZovgHR3dA7nxAShxE1nNnEQHbbJfHdCz5Yg7vPKI1oUc CffQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=gJBxpU+FoyG+t6dAIiniYWaQzb/avSYyzG9tNyUNVbc=; b=EuZUwj9SlJU7BU0KHBIKX8VOhcHaRpEY6PJy67mZyxL5T8SdZCUabIVVs5GxKCPFsE wG4eue+oorRVSQy4dP0QyeYx+lt0z/t359VK+hhl0GdLuObj+bHlFp+JAhpyfFubb531 p5foAU+nYxBdgp+xWHJ5nvZuyXZH/beWO3raKrPawabnga256Sgwtgkew3NfPfEL1CMG 2Nr0t644ZdIxXiQdRL0BlQ1dq4IJe6dyBJsh4nWHc5beeQ9QFyRNlvG/uXCGoFIgl6Bu 3GMBg1nHFPBWwWtqlNKIDaBm0Mgylt6h1t1aVulby5tpxuBpCSPizeNIXaiJR+XxGwI1 fIig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zXrWOx3y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id o9-20020a656a49000000b003fb92ed82aasi37107517pgu.862.2022.06.07.21.39.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 21:39:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zXrWOx3y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9A695212288; Tue, 7 Jun 2022 21:06:53 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1384275AbiFGWKo (ORCPT + 99 others); Tue, 7 Jun 2022 18:10:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378969AbiFGVIC (ORCPT ); Tue, 7 Jun 2022 17:08:02 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0BFBC212CBE; Tue, 7 Jun 2022 11:50:55 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 81D00B82018; Tue, 7 Jun 2022 18:50:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D0423C385A5; Tue, 7 Jun 2022 18:50:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654627852; bh=4Ka0zqH5BPXKlynHTbbm9h1V2CMI319SCy/R6j+8HWI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zXrWOx3yXpuCpFb4wwKbHEHRevCsW72Bf2uMq6wwKFxp4o3TPlNGbsb/m8KWFxX5A o2XBcmLqacBwxVte5O09eyvrDBi1+XOnFdWecwc1rqV50J8ZPr0cWEQlcYh1t3omdh LkEoier+KGwRZWIneZtUtYIdJjR2sPcn09nP8ftk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, kernel test robot , Alex Deucher , Evan Quan , Sasha Levin Subject: [PATCH 5.18 117/879] drm/amd/pm: fix the compile warning Date: Tue, 7 Jun 2022 18:53:55 +0200 Message-Id: <20220607165006.097552034@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE 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 From: Evan Quan [ Upstream commit 555238d92ac32dbad2d77ad2bafc48d17391990c ] Fix the compile warning below: drivers/gpu/drm/amd/amdgpu/../pm/legacy-dpm/kv_dpm.c:1641 kv_get_acp_boot_level() warn: always true condition '(table->entries[i]->clk >= 0) => (0-u32max >= 0)' Reported-by: kernel test robot CC: Alex Deucher Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c b/drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c index 8b23cc9f098a..8fd0782a2b20 100644 --- a/drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c +++ b/drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c @@ -1623,19 +1623,7 @@ static int kv_update_samu_dpm(struct amdgpu_device *adev, bool gate) static u8 kv_get_acp_boot_level(struct amdgpu_device *adev) { - u8 i; - struct amdgpu_clock_voltage_dependency_table *table = - &adev->pm.dpm.dyn_state.acp_clock_voltage_dependency_table; - - for (i = 0; i < table->count; i++) { - if (table->entries[i].clk >= 0) /* XXX */ - break; - } - - if (i >= table->count) - i = table->count - 1; - - return i; + return 0; } static void kv_update_acp_boot_level(struct amdgpu_device *adev) -- 2.35.1