Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp768133pxb; Tue, 5 Apr 2022 22:30:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJybw43FuHT6E4r65Mio+VHdikMs9hSg0fxEyEVXvzJ1hpTGB3AvjyktOtTF1vC2jev1jdS0 X-Received: by 2002:a63:5fcb:0:b0:382:162c:5176 with SMTP id t194-20020a635fcb000000b00382162c5176mr5844155pgb.257.1649223007964; Tue, 05 Apr 2022 22:30:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649223007; cv=none; d=google.com; s=arc-20160816; b=v4rilk0RQC4jV/MQ6LOBn0qZ5GUDPdOpiNRQ2sjqFn8OGClLQSL9C389YyFlx/wBI0 ldJLLJXjJsh0X3wVFpwAYt7BDWZdZowPEV/65rwooE4JiZrLlbvY2oC19k0zE+RKqAut nUtDv/E0F113NUjs6XlBRoEb/jbD/7WuyySq7q8l3b81J2oJJceUNdgr2oslM3SQjKDG KkVklWy43DEMOvYv6IT7EeocR2XCRpBvdMfg8qQ9Op9l55h4Z3BCu6ZbL9rLWEXLJKWC 8BgtFiM8aY7MtR21w5VtpscdswHmVar9AMcJ//lxjnm7yqS/Fbu+jqNXRCjaOjTL7pm4 L5AQ== 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=LEZyE28z+ynwwYDrEAY5OReIJMTve1d9Sipsu9ery/s=; b=XWqCKV90c6Iu6a+rkVt9RyczAuTglbYgKWT47f1kBJpSeJ0kNUkd8ajDulwbhutCbQ recAfhz+cP+tY9dC53iuGCA+37b9ywA4tcnvBlP2gCZ7iYzKXMuZ6Kg0QP7J3R/4sNIM 7/cH+SfbPgch6RbhloYjtK7NER/jdD5nlcuLbfSN3XKTK20+48XUG4CYek8AK8yb8/4D YNJCt4CwJDmwISOVhkjjFBOTGBcNyWe5ZlUCWJ3C4Z/JI2UoG481xbzjG3hUOhQ5SRxc 1xRFvV7DXkNUlSRxtaftBCumH3JbnWztxW8y2B8cS02mq11cHNhqdz2ty4UOO1KMqHkD C00g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=SEY+2zDl; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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. [23.128.96.19]) by mx.google.com with ESMTPS id l19-20020a170902f69300b001569ad93732si9004925plg.352.2022.04.05.22.30.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 22:30:07 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=SEY+2zDl; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 A7EC54BFCF; Tue, 5 Apr 2022 20:58:00 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1842880AbiDFBfO (ORCPT + 99 others); Tue, 5 Apr 2022 21:35:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348870AbiDEJsm (ORCPT ); Tue, 5 Apr 2022 05:48:42 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D252AB8232; Tue, 5 Apr 2022 02:36:45 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 6C0DD61368; Tue, 5 Apr 2022 09:36:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7EBA1C385A2; Tue, 5 Apr 2022 09:36:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649151404; bh=Lz+RnShiOWqhr9VZ2Hk0RmfdNwsgPLj1BY8SZvVpN7E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SEY+2zDl0pLMAPjzjIR14nvtC18XzCuHAKzgfa+6NOrw43x126tbxp28cbqWIc5de 6+zHEQzN7v7tXanjN0e1tIQ2FrhpChRfRMuQ2PYSYuOmPnvNA9dsTbq4ZIeuAzFo8z wqkMlsjZmPebQH08KAGnei//iuznHeQj5psqe8FU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tom Rix , Alex Deucher , Sasha Levin Subject: [PATCH 5.15 402/913] drm/amd/pm: return -ENOTSUPP if there is no get_dpm_ultimate_freq function Date: Tue, 5 Apr 2022 09:24:24 +0200 Message-Id: <20220405070351.897150038@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070339.801210740@linuxfoundation.org> References: <20220405070339.801210740@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=-2.0 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=no 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: Tom Rix [ Upstream commit 430e6a0212b2a0eb1de5e9d47a016fa79edf3978 ] clang static analysis reports this represenative problem amdgpu_smu.c:144:18: warning: The left operand of '*' is a garbage value return clk_freq * 100; ~~~~~~~~ ^ If there is no get_dpm_ultimate_freq function, smu_get_dpm_freq_range returns success without setting the output min,max parameters. So return an -ENOTSUPP error. Fixes: e5ef784b1e17 ("drm/amd/powerplay: revise calling chain on retrieving frequency range") Signed-off-by: Tom Rix Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c index 6dc83cfad9d8..8acdb244b99f 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c @@ -138,7 +138,7 @@ int smu_get_dpm_freq_range(struct smu_context *smu, uint32_t *min, uint32_t *max) { - int ret = 0; + int ret = -ENOTSUPP; if (!min && !max) return -EINVAL; -- 2.34.1