From patchwork Wed Nov 30 18:34:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Armin Wolf X-Patchwork-Id: 27953 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp1087234wrr; Wed, 30 Nov 2022 10:35:54 -0800 (PST) X-Google-Smtp-Source: AA0mqf4Bdud2k/FYPqMjGs50phtZA9fBWA8N41pxapJYboDc2LehGNwIjIwwfxIhw6PNa+1OAxZ0 X-Received: by 2002:a17:902:ee55:b0:176:a16a:417d with SMTP id 21-20020a170902ee5500b00176a16a417dmr46197430plo.46.1669833354137; Wed, 30 Nov 2022 10:35:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669833354; cv=none; d=google.com; s=arc-20160816; b=JKSeCoUJHwjsGdZhHiyBpti0TaaxuxgMSggjJtZN0bcoGoENo1YvBPRsfhHWO+Q8DC 7sndHQuakCwKu1Pn65Rh8pa8hhTg0NYSWxfG8aaf8uqBsS/49eWfOPSALEZDNE9wtxot oeWuWqFwpdzFv7lX/mLUWsTU3wbZj3v+gv4d4gBwgPEuaXumjoWfNV0RgVTcoMc4oGz2 CW+EZajOytoc0bMs6AYP3QnsyQUEundvDDo6OesSwY8YFgD08PfH+7w9HkfVHi4Va+tM K3acLyWE///y8Mk/5alKG9Z4qwgaF7r1Mt0oCZESOl/WrjAB92ykOxQnvksCOcLwibjC wVjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:ui-outboundreport:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=fRShUMmCzjjmZXdVxVD+uUR/ocs6LGqJ9xVANfR4yp4=; b=O3Lqb2JozXzTJtTHzO2h7YpUaMZOINiBIBeGiWwfmuTQO9gxdtpprEAjmYxbJ6wiDV LiUuMUeRWilKBzYNmRw3N/k9QMCq1pXoPcnGI6dzfbsK0glX9L42dfLf4LF8sB5TLgYT +0TpmcLKnpR6Rl6Hpo2w7t1DTxO2LYEuL9AWduMbPX91QWebo8MZqO8nkmm3/YS/pHBk b0kAImoyKDlbbs7L4kHUGQr2cDbfqKXmuWPbkj3muoSW0BTg2MkGDxNP3Cqo/6x+8yDd O8w+/4hCOXFfPwt/kgHUFWFaFXy7VYlSl4RjCKtD4J7ECA1qPWqsaU2N2gns3W5gpo09 PO9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=YilvTdd6; 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=gmx.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s12-20020a62e70c000000b005718d10c3c3si2167560pfh.275.2022.11.30.10.35.40; Wed, 30 Nov 2022 10:35:54 -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=pass header.i=@gmx.de header.s=s31663417 header.b=YilvTdd6; 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=gmx.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230407AbiK3SfL (ORCPT + 99 others); Wed, 30 Nov 2022 13:35:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230242AbiK3Seu (ORCPT ); Wed, 30 Nov 2022 13:34:50 -0500 Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D717B93A74; Wed, 30 Nov 2022 10:34:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1669833268; bh=NscgIAZRMqN8AzDfYglDMPfWX6oPBec9DPODcgSPEzQ=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=YilvTdd6MPnBoZF1okZsAnOdDtlZ2xDxGftIohAFdYSH7ZJdr31o1/ZvOiNYzmnCr kuWHUmeXrLXvggi0Jxwg1G4MyALqhS8dhk/JaPxXfNxMpjePwg6eqZFo2KZx56tLcX IP7QsHsj0uCNOv/3+6IMmQnCHCAECJh/tW67ZkS8ujxo5y46gVP80lH6GUCafumfRx zG7qcjtChipGbVgnAcFmv+yyxxCdDClZwedkDmjTRF2On8MMHGblcldzgOrNl29ew3 4aMh2pAjJG6nDPiWYkfDZM8x5Ur1bLTEih7fWcQ0yGRF59P5NvgbBfhIVkgZUof/1V tSj6vntAhDYiw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from esprimo-mx.users.agdsn.de ([141.30.226.129]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Md6R1-1oQHwt3PsZ-00aGDa; Wed, 30 Nov 2022 19:34:28 +0100 From: Armin Wolf To: pali@kernel.org Cc: jdelvare@suse.com, linux@roeck-us.net, linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] hwmon: (dell-smm) Move error message to make probing silent Date: Wed, 30 Nov 2022 19:34:18 +0100 Message-Id: <20221130183418.357246-1-W_Armin@gmx.de> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Provags-ID: V03:K1:cl7FFu4dmz8bgye6pz2NXjuVh20/evlO5cStb+/Bwa9oYVDqVrM YXQuPG8DU+ayKe3fj2vQDzWCf8CKbGDGbW4FIonkW/H1FE766zTehnPllk4FAfm5rtLGxn+ Od8j+Qh9unanFH8fAYcZqxF1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ohOkhluEJW QJk3pKbFv0AtkZEiz0BwBVjUDCk= X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750947178860463710?= X-GMAIL-MSGID: =?utf-8?q?1750947178860463710?= If dell-smm-hwmon loads on unsupported hardware like the Dell XPS 17 9710, an error message is printed. This might confuse users, as drivers are expected to be silent if no supported hardware is found. Reorder the error message so its only printed when the driver is loaded with the "force" option being set. Also reword the error message slightly. Tested on a Dell Inspiron 3505. Signed-off-by: Armin Wolf --- drivers/hwmon/dell-smm-hwmon.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.30.2 diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon/dell-smm-hwmon.c index 1572b5416015..7ac778aedc68 100644 --- a/drivers/hwmon/dell-smm-hwmon.c +++ b/drivers/hwmon/dell-smm-hwmon.c @@ -1447,9 +1447,10 @@ static int __init i8k_init(void) */ if (i8k_get_dell_signature(I8K_SMM_GET_DELL_SIG1) && i8k_get_dell_signature(I8K_SMM_GET_DELL_SIG2)) { - pr_err("unable to get SMM Dell signature\n"); if (!force) return -ENODEV; + + pr_err("Unable to get Dell SMM signature\n"); } dell_smm_device = platform_create_bundle(&dell_smm_driver, dell_smm_probe, NULL, 0, NULL,