From patchwork Tue Jun 6 15:18:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Pearson X-Patchwork-Id: 103953 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp3489368vqr; Tue, 6 Jun 2023 08:43:55 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7FPbaaiNPJfjX7brJWlUfMqWKW/SLnH99DMrxrnCaDWG2XFS2/KfFIaowg/Kermw0ojnMi X-Received: by 2002:ac8:5989:0:b0:3f8:14:58e9 with SMTP id e9-20020ac85989000000b003f8001458e9mr84952qte.13.1686066235086; Tue, 06 Jun 2023 08:43:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686066235; cv=none; d=google.com; s=arc-20160816; b=vCKlLsUmwfLYJZWpqdt1Dn7s92vOVbli77Rje+QA1f/lxAVFi+i2aaiiHb+koGcHfR QGtSu+QukTrfUc4Y3swHpLyMv42MWhbkAbpp8RbTfDixvBqyLqx0QMLzXyfZzK9c0IKs qqL2jBj2afK4gi1XmdLHT8zNULnunlX+9LRYqKHzpiUkQvm7/ima1DPJ63Y7LZhDCdFn PvhwJ7yIZXm65Yg2EhUp/Pnh5wV/6kUDxsubXuKVPImz2NQByCE2qWL1GB/LFyquSSJu OgF5L0dOmjApWNzgHvZzrjY6pEAoAl2yQqBDMINbC05n/x352asvfrQ8YmkXSlzY7QR0 B00w== 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 :feedback-id:dkim-signature:dkim-signature; bh=XUEmBDCReC+iW6QvdzWSDKkyTa4N1Kwt8dfbbxuqV5I=; b=Kl/HrDvmifqR+qZOr6DoBb9J2quKMWLVOp4UFUUN+rqIK54kqcftmp3zbE1f+YCcXf KxWeElcL9VVLUcCkxbdQisuHwWWOlpnnxoqvZABSG3sp1taWZq8qYqLCbCHmSYgnLMOc WqiTmrJoFK00elvSU5+9og647LCC2GJyreSgXNjOTi77/SuJ+N1jiSAqWPLY+3rcVuGb umOkCjDIRfoM2HwbcGr2nSR9vao7uIpR994T4txXdn0wHEoDulBHMgNhYr5Ue8nMTFNe tLxC1okmwJGBrWjEksVcXDHJ7CmpK/FBiavQp8YFszEWLtqQlPwxDgtNtkiYl7x84CHF fh1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@squebb.ca header.s=fm2 header.b=yCOfpzqA; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=xsMvMhy1; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m15-20020a05622a054f00b003f4e6c38525si6340429qtx.590.2023.06.06.08.43.40; Tue, 06 Jun 2023 08:43:55 -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=@squebb.ca header.s=fm2 header.b=yCOfpzqA; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=xsMvMhy1; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234857AbjFFPSO (ORCPT + 99 others); Tue, 6 Jun 2023 11:18:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233032AbjFFPSN (ORCPT ); Tue, 6 Jun 2023 11:18:13 -0400 Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5071212D; Tue, 6 Jun 2023 08:18:11 -0700 (PDT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id D4E5B5C00FC; Tue, 6 Jun 2023 11:18:09 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Tue, 06 Jun 2023 11:18:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=squebb.ca; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1686064689; x= 1686151089; bh=XUEmBDCReC+iW6QvdzWSDKkyTa4N1Kwt8dfbbxuqV5I=; b=y COfpzqAi1T3NWAepSCnPrAgkbySq/QQsWMngR0K9TRd334ymeGL/lWSlBnUG25yf t4KBcbXz6MChAl0QfPpE1xyKxR2AKgCQcWwDab4ab5y9f7ujimB0RWbJ0fjwJqon o73RHYfaIXvhuubMImfaIFWsZpHV6cLJAWj6qjmPif6hJxJBiyYV3A0od4w6AETB gLwvSpvbgWK1Pi11ZEOr3xpdo+kWC4lta1bjmkRgu0x3AIFfCHIblHp8aYhctj3L 4bE+LNK42pF6Xj2H5tRKnHqh/JGRBfr3XC62COi0IqErY21riM2Cbmn8nQ78K6MF /57kq/uVHtVh62NHWMR4Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1686064689; x= 1686151089; bh=XUEmBDCReC+iW6QvdzWSDKkyTa4N1Kwt8dfbbxuqV5I=; b=x sMvMhy1c87L9tCq2Y0wKd8xvw1CKHR9WVC2ZrlTUZKvIizYc/+x0NYfHLCTzWNl/ mQE8ZTF3egQnFuwydDUhUbhheRsCHOFeAo1hj3bAcQisbFGD3fSFfHJB4DeJOsxG J+hIe9TxCR8nPYhLZ4WUn3XH70H/4jPPUwGXVJLZtikJzRilS4faHUPaevXw6YEd NWgn02kp8114P9dj9EiiUhgNxgsAQ7c1rmpJMsZYuN4WY0hYwRKpYtG5djeZw3gi mBqP3IZadidkudGzmcc5XxbVwyKW1XYn12/YT3rG6LkVyElFAnhM28NGZy63m7PD ctWD61hohCV7dB5W0eP7Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrgedtuddgkeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgoteeftdduqddtudculdduhedmnecujfgurhephf fvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepofgrrhhkucfrvggrrhhs ohhnuceomhhpvggrrhhsohhnqdhlvghnohhvohesshhquhgvsggsrdgtrgeqnecuggftrf grthhtvghrnhepvedtlefggefgjeettddvgfekhfeugfeutdekfeefudeuuddvieeutdel jedvhfdvnecuffhomhgrihhnpehkvghrnhgvlhdrohhrghenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmphgvrghrshhonhdqlhgvnhhovhho sehsqhhuvggssgdrtggr X-ME-Proxy: Feedback-ID: ibe194615:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 6 Jun 2023 11:18:08 -0400 (EDT) From: Mark Pearson To: mpearson-lenovo@squebb.ca Cc: hdegoede@redhat.com, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, dan.carpenter@linaro.org, mario.limonciello@amd.com, lkp@intel.com, oe-kbuild-all@lists.linux.dev, Dan Carpenter Subject: [PATCH] platform/x86: thinkpad_acpi: Fix lkp-tests warnings for platform profiles Date: Tue, 6 Jun 2023 11:18:04 -0400 Message-Id: <20230606151804.8819-1-mpearson-lenovo@squebb.ca> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767968588368650432?= X-GMAIL-MSGID: =?utf-8?q?1767968588368650432?= Fix issues identified in dytc_profile_refresh identified by lkp-tests. drivers/platform/x86/thinkpad_acpi.c:10538 dytc_profile_refresh() error: uninitialized symbol 'funcmode'. drivers/platform/x86/thinkpad_acpi.c:10531 dytc_profile_refresh() error: uninitialized symbol 'output'. drivers/platform/x86/thinkpad_acpi.c:10537 dytc_profile_refresh() error: uninitialized symbol 'output'. These issues should not lead to real problems in the field as the refresh function should only be called if MMC or PSC mode enabled. But good to fix. Thanks to Dan Carpenter and the lkp-tests project for flagging these. Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202306011202.1hbgLRD4-lkp@intel.com/ Fixes: 1bc5d819f0b9 ("platform/x86: thinkpad_acpi: Fix profile modes on Intel platforms") Signed-off-by: Mark Pearson --- drivers/platform/x86/thinkpad_acpi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index b3808ad77278..4b89f42de723 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c @@ -10524,7 +10524,7 @@ static int dytc_profile_set(struct platform_profile_handler *pprof, static void dytc_profile_refresh(void) { enum platform_profile_option profile; - int output, err = 0; + int output = 0, err = 0; int perfmode, funcmode; mutex_lock(&dytc_mutex); @@ -10538,6 +10538,8 @@ static void dytc_profile_refresh(void) err = dytc_command(DYTC_CMD_GET, &output); /* Check if we are PSC mode, or have AMT enabled */ funcmode = (output >> DYTC_GET_FUNCTION_BIT) & 0xF; + } else { /* Unknown profile mode */ + err = -ENODEV; } mutex_unlock(&dytc_mutex); if (err)