Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2237621iof; Wed, 8 Jun 2022 00:06:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzoswuCUu8wCqPFluPWEClSwCJIYbU6s66wboM/lZ8ZdD28XtYaqo/36r2QisgwavsEax43 X-Received: by 2002:a17:90a:e601:b0:1e8:ad01:1eaa with SMTP id j1-20020a17090ae60100b001e8ad011eaamr6227070pjy.81.1654671998275; Wed, 08 Jun 2022 00:06:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654671998; cv=none; d=google.com; s=arc-20160816; b=Kg/nbew/BD2q15Y1XzMhQQImkp9+rXzGF6Zw5NMnNxobHpL1bh2jFxN9zDltE9kbtF 7n4i0/vm1ipjijynPxRbg2zGLTsH9FYSi3YVtThn/qV90w8XGvcxMEBCwgviezQJfRIL KqKkW9xccka2rtdM3Yvmj2tbL7DdVEqQF+w61/krpJhinHoQBCwah3RMEri6oLSAnCUn qij463ca/KNT0/I62EUP+VCdhVDAmzE1Jy6H8CejojmfRZOq5Rq5Bc8guCLE/Vkbyp5J z2R8JZLdQYxphXa2YPs6mfOR5se4qjNLkvkd3L0Nxwz2GBawxCcn8IBwgYjpmeg+aEl5 +WIQ== 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=3vCWF5vErMb5U8KA3RU0cCnbnWUZ1fca63rS5ulCBaA=; b=EJqEmpPPVnfx+bRNZ8dQACRAz/C274riHbo5bMIq/krk1J/Fm4ql4CNWYlv2iOnkan 2IeaqtNLOTcawjI2RpS9X3k63NGd1xt2ssS+XHO314mhiICHqOP46dRRHsEGH99qp86H f45DpnKkaXrKJbSU3LBZ1YFihGqV4Qgt+QtXTnoN/6/6WeCGjM9ulHW2pQxbyaEFBgmI 86PsfHn7fmSYXFXwujKAPG2lPnPKP8ljkYz36HJz+7cdO354+KK4P/mjbrc1NZ8vgBJ0 V2eA/Siq+R0EuK371iozKvYVKucL2k9vsSHY6rEuukBK4IixHJGoS+4FquBSIAxWTP4T adOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=cfHVAN2C; 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 z14-20020a170903018e00b00163e4c8ddebsi16989642plg.21.2022.06.08.00.06.24; Wed, 08 Jun 2022 00:06:38 -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=cfHVAN2C; 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 S1346203AbiFGRXP (ORCPT + 99 others); Tue, 7 Jun 2022 13:23:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237273AbiFGRUh (ORCPT ); Tue, 7 Jun 2022 13:20:37 -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 9B6C21053DA; Tue, 7 Jun 2022 10:20:36 -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 404AAB8220C; Tue, 7 Jun 2022 17:20:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A19B7C385A5; Tue, 7 Jun 2022 17:20:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654622434; bh=1vh6uLlXuKPeXSt+PFMmKOp5dM+g4UIJejgmIJewkbU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cfHVAN2CP30J5Ku4xww0LCYF6GuKoxHeY0eWimRxzhDMq2lhkTaLsge2x+uzJpBpc tPW3YGsUnDD786sNoAKjcqe03ntn510oegfxTkRJV9DiQ3fmyXj2YJnkZn3LQRhORi eXw+tlnyykQmImGEq58zyOc56AGpSfvc6ilRiOE8= 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.10 056/452] drm/amd/pm: fix the compile warning Date: Tue, 7 Jun 2022 18:58:33 +0200 Message-Id: <20220607164910.217125268@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607164908.521895282@linuxfoundation.org> References: <20220607164908.521895282@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/pm/powerplay/kv_dpm.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/powerplay/kv_dpm.c b/drivers/gpu/drm/amd/pm/powerplay/kv_dpm.c index 4b3faaccecb9..c8a5a5698edd 100644 --- a/drivers/gpu/drm/amd/pm/powerplay/kv_dpm.c +++ b/drivers/gpu/drm/amd/pm/powerplay/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