Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp589055iog; Mon, 13 Jun 2022 08:41:41 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tEU26x9bOh8K8txYkq11kVQNTmXjaR7cn53lS3Qrvsah+2K+ibbdCsWhqGXO+llCeJGofF X-Received: by 2002:a17:90b:4d90:b0:1e8:951b:40c8 with SMTP id oj16-20020a17090b4d9000b001e8951b40c8mr437946pjb.130.1655134901099; Mon, 13 Jun 2022 08:41:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655134901; cv=none; d=google.com; s=arc-20160816; b=hXlRyveZvrdyK1ukjMLcbaWKNST3lS3Zp09AOc366QSLVUveIfLQooT6388fPrMGAG VIxEP6WlqqUvGsuc/2PweqNw728XkeDxlYgZv1rtV9x7bAAGvZ8y7+cHStlMlBK9S3hx TxCCgUXqs6smARxz5+DAgqHM6bXUjwx3QuHkIgduiP5JHgBc9lJDJGTgOb0eNG9EJIGK uSQd3nR6lNjvRoEYKZPJSWVgUjKP1y3u5XeGU+51Go8oMX8OU9KCisWQWOt4ledFKaLd zYkSmjW1P+wWG75kzbwcVKRvwPbxP1Gc4bLGH/ukmgVSXbH09P6YwZAmrfkMTVth6x18 QXfA== 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=WDvj+lQRfNnwQK8VveRsCpw0WutJxIqDNNe9ysBBnTQ=; b=0GHKrbKNpQkujbwHBuqttS7VylLlFFzwCR4WSKi7LoddlMCrvLM8uFWW544UynpQcR l6uwIZiTNSqJjz8fya5QH0iWxd7AW4A1TA0UBNY6Gp7FdylnwW5m948ytoCrhcdIFrMl buDddZE2uQE1+JADpSduJT4SWNiDgXZzwCRnSOvkFosiMcZsyap8sIioAIAUp/GtEAqG iOo055IlhHCuZgRXe8tlWhY0+nEsNpF9AuUvS92WdHelrVwFFkvpSZIiUpu2qpIa0gCl Ng+PJq1LKnq8SW+tOJRj1eN589vpKoxkeORibtAjUtzTgCN4h0fkvYIuvYfo7nkIpH6m DFLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=RAL6yQxW; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t12-20020a056a0021cc00b0051bdeab2f54si10893070pfj.118.2022.06.13.08.41.22; Mon, 13 Jun 2022 08:41:41 -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=@linuxfoundation.org header.s=korg header.b=RAL6yQxW; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241544AbiFMKPG (ORCPT + 99 others); Mon, 13 Jun 2022 06:15:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241603AbiFMKOq (ORCPT ); Mon, 13 Jun 2022 06:14:46 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F115CFFF; Mon, 13 Jun 2022 03:14:35 -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 sin.source.kernel.org (Postfix) with ESMTPS id 2F448CE1163; Mon, 13 Jun 2022 10:14:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3476BC3411C; Mon, 13 Jun 2022 10:14:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655115272; bh=7FQ9dFAbfLF1xAX2WYU0zqhOLcJvn+BST6o5QtsQMfE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RAL6yQxWuDtoWmvwu6POUugSdjxfL4PWySNvlUGM8YwuinEgYIZRU37yzZDEKa1KT LGZVnJeI0hWW2lk6OmD48iFJ2XYiOJWoRPGVonNeNm95xvRR9Cp5kjKTHS/dAmPbLy 6n/t0DV/fb2nDjz+O/IYGck6TvAafB2kVQfl+Wtw= 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 4.9 016/167] drm/amd/pm: fix the compile warning Date: Mon, 13 Jun 2022 12:08:10 +0200 Message-Id: <20220613094844.657316571@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613094840.720778945@linuxfoundation.org> References: <20220613094840.720778945@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=-8.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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/amdgpu/kv_dpm.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/kv_dpm.c b/drivers/gpu/drm/amd/amdgpu/kv_dpm.c index f61c489e5f6d..81f1591a9be9 100644 --- a/drivers/gpu/drm/amd/amdgpu/kv_dpm.c +++ b/drivers/gpu/drm/amd/amdgpu/kv_dpm.c @@ -1617,19 +1617,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