Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp4494988ioo; Tue, 31 May 2022 05:51:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyiFQTDEBUK4GtDYRiwQW5FdAoPgm785JibxF0uOwISc1X5HEFebJvfMZ4dUeMeaGI9b5AX X-Received: by 2002:a17:907:9243:b0:6fe:976a:e117 with SMTP id kb3-20020a170907924300b006fe976ae117mr52125189ejb.398.1654001477582; Tue, 31 May 2022 05:51:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654001477; cv=none; d=google.com; s=arc-20160816; b=e+Q0UnxAVC0g44xUjzzo5X/c6Xh+/wfN9OBcjvLWx2dDj6TcLYAKysiY9N6EVEmeyG Ho6UmMpXSNul3zw/i/yphOQRnE+RS6mdTRq8c0rvM7jamTdk9Cp9MHk90eZZv48YcAs+ nAA+yi4YctDgJqVJUKwFmoWHakMqjHhJUbBKOK74w2go4wrHmo9ZMJY594mPg6vQMCvx f4o8qBWqrGCqWGtxYolenRPTZGfOBLGPlvazZ7f9TAh0N2GhwL3P/tpFxnB943t6mqJu dHPt2rpxWxRiSZHm5A5WbrcVHq+pch2GRF0WZY6kapxtpD/dtLZY2vjlCP7TnFSEHc26 NfKg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=OBXZ9VeIMWnfqm1D2qOevjQu88NqU9QTSxZQMdWkmsc=; b=esEuuwsm/nRgr6Bv9xHma1mTKb2VgdyK3IkSEusM2wQ8xyXIRloVcaWCeDRFOvLYJT +sb1oMucbWRLNS4fEIgpMk8OOEv34YoHulcaNqUJpN74110/twb0H4hKV/LlCgdnMUSH 21GS0tw0BjgeMV/bFhgBUYEs3r5sA4ZKtaC9pnM8ZerspQEF82ZtOoU9ztPW8RY0qxzO yH7apVa4T2LCvE+2x1VbV8TgVGwIbaugShnYIPzPKWXnBkgrJEVjsWxExsuLkr0SWV5M KJtxWKPJPpvx+1zzhX2kTpkfXJBC5rESihRwmyheG797Xg+cw+c7AQS2jT0a3gsno5TF ic0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=h1jmeTdQ; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f17-20020a056402161100b0042bd71081dcsi7070888edv.378.2022.05.31.05.50.52; Tue, 31 May 2022 05:51:17 -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=@kernel.org header.s=k20201202 header.b=h1jmeTdQ; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242331AbiE3Oa7 (ORCPT + 99 others); Mon, 30 May 2022 10:30:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241784AbiE3OSD (ORCPT ); Mon, 30 May 2022 10:18:03 -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 B72F78FFB2; Mon, 30 May 2022 06:48:06 -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 09AFEB80DAB; Mon, 30 May 2022 13:48:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 74601C385B8; Mon, 30 May 2022 13:48:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1653918483; bh=meTKEfhwvJQNPNSEHlua5iCIaCbkJ5tZEhnI42ZDXNY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h1jmeTdQpECdIaNrOGNAdeCjdcaD5jYnQDnJ4p0ezWbaY36V0DHI7EMtpa0fl0s6b 6IMQDXy+nMSx1ztbukR+z7kDaVTYFHfS1tTel4eGo66cqyRZBULJBxFwWkWwF4oHj+ xNFuLXU8gMMJ4ao8xV/5o+LSfPdg+qYpCx79FrtE7ufymQeHQa1IaCHAV2cFR2dKQ8 hE8y2W6BptlRGfWbD7C/HgruDhCe/H0f3ymwgyPjX01ppuZ8acy9+1WZpzFWXY3Qli 32GBCr+m4lywKUmPHxwVr5VBB1u9sM3mCa3wAfwE8D0DhOU29q3bzMqBNyr1Fni+KK 4IkACCTs0+5Bg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Evan Quan , kernel test robot , Alex Deucher , Sasha Levin , christian.koenig@amd.com, Xinhui.Pan@amd.com, airlied@linux.ie, daniel@ffwll.ch, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH AUTOSEL 5.4 24/55] drm/amd/pm: fix the compile warning Date: Mon, 30 May 2022 09:46:30 -0400 Message-Id: <20220530134701.1935933-24-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220530134701.1935933-1-sashal@kernel.org> References: <20220530134701.1935933-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 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 4b3faaccecb9..c8a5a5698edd 100644 --- a/drivers/gpu/drm/amd/amdgpu/kv_dpm.c +++ b/drivers/gpu/drm/amd/amdgpu/kv_dpm.c @@ -1609,19 +1609,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