Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2914034rwb; Mon, 15 Aug 2022 13:58:13 -0700 (PDT) X-Google-Smtp-Source: AA6agR57g5uZ/oT5vo/EMkjCyPM6e/uLN6nskZ4iiD9hfgrf7Cb65OY42u0TsG1b6Bev1Fmaoa1Y X-Received: by 2002:a65:6692:0:b0:41d:5001:f0d4 with SMTP id b18-20020a656692000000b0041d5001f0d4mr14758083pgw.28.1660597093372; Mon, 15 Aug 2022 13:58:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660597093; cv=none; d=google.com; s=arc-20160816; b=rdboULdIO+aZfsGiMksznHIgxWASMn0/YtFW/H5BwsfTK/J7lJEyNnaQBzvwZ/Q1Hb zjlnK7kX4aV4z0DoyiOuVQgpPnLIZziJkthaACgOgLmnfdmb+mUzq0Zr1Jlu+2nUl0k0 BGp0bpv0XlkMq6XA1X5KEXjsaGtwt3qnlNinzkRAN1UmgyHBj8ks/hPQ/GlhOddRcEMQ tzAjRLUeiLyo38LbxAhymE1sGzkP9JVA+yn/k+BMQ3kMh5cO1lLdCldVrtdf5Zyz+lSj KVHEei4vwr8qpgD9OSEUtFDSFhdFGaeCnQH+NkDLrk0i4J+yYaSS8ZOY6/6JqHnMHr2Y o8OA== 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=9Tc8l3BowDdo9LfhA04j0GkDjgwGhsE+Y23qP+0Y5eA=; b=t6lIBWaSpqfXJjxNSb4nnSck91cnU5RrxkRKadHUkII7FGCYwpXoq/6hCnafGUspXm p23zT0T3BPJwamJP6NrXEJRw9slYtKPTfodF4P6867XONMp2swH7nRiAYuOuDLAs4zE6 sMvDVaQuLQaIh1bi8wo38eokqDN75mWFhfcjtnvFmZFtldxBnho3/N3htjowLq4sJ/9/ J5i3Y7x9pT4aCgx2+7Oyh8TAFZpzvzQRJ7pU5Yzvz5s6CzxNND1QMd9BksDcOFXJnop6 4F53klv4vPgWLwxwdEPTHk+tJuYJiCzzrUwP0a4uAZDMLnvxJDhkbKojYwhtvwUxNBxx JDwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vD4zXs8q; 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 r1-20020a639b01000000b0041b72fda9b5si11699164pgd.311.2022.08.15.13.57.56; Mon, 15 Aug 2022 13:58:13 -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=vD4zXs8q; 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 S245442AbiHOTFX (ORCPT + 99 others); Mon, 15 Aug 2022 15:05:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245434AbiHOTCA (ORCPT ); Mon, 15 Aug 2022 15:02:00 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B19064BD3E; Mon, 15 Aug 2022 11:33:16 -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 4494E61029; Mon, 15 Aug 2022 18:33:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 47559C433D6; Mon, 15 Aug 2022 18:33:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660588395; bh=SQUrOBXqf5/aHpf7ZBuGXQqIx9y/uHaCHkNS/jJXmJE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vD4zXs8quGPRvjTLMk+QlU06gX0HHGQT+kOAjTRdbiH+dYZVCS9OIeZSIl0yZXfLL PfezLyKheExbwfjxMSKg14Y/iUiu3i0hFjPPl8DRk2R9TpcGC/NAqe/1hUMe04c84P nauhkBTxTFKFup82saz5R/N1gReT/CYWimso/Z6U= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, David Chang , Mario Limonciello , Basavaraj Natikar , Jiri Kosina , Sasha Levin Subject: [PATCH 5.15 388/779] HID: amd_sfh: Dont show client init failed as error when discovery fails Date: Mon, 15 Aug 2022 20:00:32 +0200 Message-Id: <20220815180353.880699617@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 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: Mario Limonciello [ Upstream commit e51d8d3ea3d773334d2c047c8d1623dba66f592a ] When sensor discovery fails, this means that the system doesn't have any sensors connected and a user should only be notified at most one time. A message is already displayed at WARN level of "failed to discover, sensors not enabled". It's pointless to show that the client init failed at ERR level for the same condition. Check the return code and don't display this message in those conditions. Fixes: b5d7f43e97da ("HID: amd_sfh: Add support for sensor discovery") Reported-by: David Chang Signed-off-by: Mario Limonciello Acked-by: Basavaraj Natikar Signed-off-by: Jiri Kosina Signed-off-by: Sasha Levin --- drivers/hid/amd-sfh-hid/amd_sfh_pcie.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c index ae8f1f2536e9..13a4db42cd7a 100644 --- a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c +++ b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c @@ -323,7 +323,8 @@ static int amd_mp2_pci_probe(struct pci_dev *pdev, const struct pci_device_id *i rc = amd_sfh_hid_client_init(privdata); if (rc) { amd_sfh_clear_intr(privdata); - dev_err(&pdev->dev, "amd_sfh_hid_client_init failed\n"); + if (rc != -EOPNOTSUPP) + dev_err(&pdev->dev, "amd_sfh_hid_client_init failed\n"); return rc; } -- 2.35.1