Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp6058416rwj; Wed, 21 Dec 2022 10:10:59 -0800 (PST) X-Google-Smtp-Source: AMrXdXvNZbEiaUgHmo3Sya5upVAgV68Gx1UuvxQ3HFeSyR41NHguoY99kmT4d9Ch/eRw5K3XolOu X-Received: by 2002:aa7:cf94:0:b0:46b:6214:44c8 with SMTP id z20-20020aa7cf94000000b0046b621444c8mr2465286edx.39.1671646259623; Wed, 21 Dec 2022 10:10:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671646259; cv=none; d=google.com; s=arc-20160816; b=To0VIYL4BoFk6r/eMjSdDr05rpnN5hEuMJH5z9m+TbxHYoxL1pacbmMKJSxAekggVJ ZHC+VYZLzowbaCMqKVtqfQfAg8vtUjPd3q4OWFmd8g6d1hoXNJ8vUWsDTYQXeO6rGnWj gLq6Rx0ZkhJNkk6dRr927UBRMCjg20pck6F9gekSrZLJAHYFrEuzROLVLZsCsss/eyAE bPpfuMPlVkl+/EwPaLSzDNgbTovv1iBDoaC2cKBQJZhE0YCGF23SEgewnCCR4YLi/0qI DEcCbSfgNSETwHUp0pcB8y+gjZUFdcq4bWeLw5TxclgUtIAaklMFPT4vmhsb/JNf6gQf rwZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:dkim-signature :from; bh=RPLq6XW0wypFd0d/Hml8zjAdjx7imI5Ex9Iw2VHURi0=; b=eNcSz5PZa/norEDbdUDu+zNHoqnSfkcPKVJg0lrec1DSM3zyX3f824LxxwkOwFjdGo umE5n2W1BhnKX0uecW/2PyleqWr6S4tbBCZp0L4A/ar9mbDi68ZDPwYelycZ9cEuT48X GMxC58qjJN/Q9dWuRxnar2wRbZWCT/wfwP5P4NJ2j5Xjg/qW1sRf5EZVXy0qMUT9e2zg mTWi0m9pSiwSAd5wjS7GhhjXEK+0s1KkUVDKaCFGiNQeBmoQrBU2INmkMfH0gZGPUTb6 zshr9uaH2w7KouUICc8s50ZHaYd1man17fEpSfR1zGXEHW2sYeP3jkLf7jDDGZalLj38 iutw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@weissschuh.net header.s=mail header.b=dYAO+UHz; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d16-20020a056402517000b0046afb32bfd9si13018030ede.302.2022.12.21.10.10.43; Wed, 21 Dec 2022 10:10:59 -0800 (PST) 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=fail header.i=@weissschuh.net header.s=mail header.b=dYAO+UHz; 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 S234635AbiLUSAT (ORCPT + 67 others); Wed, 21 Dec 2022 13:00:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230057AbiLUSAC (ORCPT ); Wed, 21 Dec 2022 13:00:02 -0500 Received: from todd.t-8ch.de (todd.t-8ch.de [IPv6:2a01:4f8:c010:41de::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5412724BC3; Wed, 21 Dec 2022 10:00:00 -0800 (PST) From: Thomas =?utf-8?q?Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=weissschuh.net; s=mail; t=1671645598; bh=DHzQpmWJLFTqwBAVXLFg5D5O5N+Kl9i3nR9nIThPLww=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=dYAO+UHzW5wXut+nOIQHrC2wo6lmHyElQIRI3ngQoD1uu7CGf8qlsuU11Z4T3bNDU alABiGCHrlwhXIGV24XZjLqysz9C7LwQ0mB2zJzSZ9lEzaw/IiNkJ/QGMg8Om7bF5u MzYWEsN+/qotALjcBkMA/v+TsnGD9T4r8+LQ2AtM= Date: Wed, 21 Dec 2022 17:59:51 +0000 Subject: [PATCH 3/3] platform/x86: asus-wmi: Don't load fan curves without fan MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-Id: <20221221-asus-fan-v1-3-e07f3949725b@weissschuh.net> References: <20221221-asus-fan-v1-0-e07f3949725b@weissschuh.net> In-Reply-To: <20221221-asus-fan-v1-0-e07f3949725b@weissschuh.net> To: Corentin Chary , Hans de Goede , Mark Gross , "Luke D. Jones" Cc: acpi4asus-user@lists.sourceforge.net, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas =?utf-8?q?Wei=C3=9Fschuh?= X-Mailer: b4 0.11.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1671645591; l=968; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=DHzQpmWJLFTqwBAVXLFg5D5O5N+Kl9i3nR9nIThPLww=; b=0lNvk6oQrIRPYyinJtYvmunAkwZDHlhbE8W8EwaIJNnKGwRrg5brZHoLaHbTFN06zZU2Gr/kS68z hJdfJkugBqlv/GytiG5L3tHo39rJBGxTFp0+6Zwuxe3AG5+AOJog X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS 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 If we do not have a fan it does not make sense to load curves for it. This removes the following warnings from the kernel log: asus_wmi: fan_curve_get_factory_default (0x00110024) failed: -19 asus_wmi: fan_curve_get_factory_default (0x00110025) failed: -19 Fixes: a2bdf10ce96e ("platform/x86: asus-wmi: Increase FAN_CURVE_BUF_LEN to 32") Signed-off-by: Thomas Weißschuh --- drivers/platform/x86/asus-wmi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c index 4a289ca7e76c..104188d70988 100644 --- a/drivers/platform/x86/asus-wmi.c +++ b/drivers/platform/x86/asus-wmi.c @@ -2438,6 +2438,9 @@ static int fan_curve_check_present(struct asus_wmi *asus, bool *available, *available = false; + if (asus->fan_type == FAN_TYPE_NONE) + return 0; + err = fan_curve_get_factory_default(asus, fan_dev); if (err) { return 0; -- 2.39.0