Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3086362rwb; Mon, 15 Aug 2022 17:47:49 -0700 (PDT) X-Google-Smtp-Source: AA6agR5K8JeyixUiMi7AlrCJ72TXWWMxABZ9/lfQab+jldLF5kdptzuKuueLZ4o+FHjIWMeZTTkf X-Received: by 2002:a17:903:2003:b0:171:238e:2a69 with SMTP id s3-20020a170903200300b00171238e2a69mr13885865pla.86.1660610868881; Mon, 15 Aug 2022 17:47:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660610868; cv=none; d=google.com; s=arc-20160816; b=r2t6Efm0FMZjNQXK54Z0+KiWe8V6vv/5R5lfqmlGJFBz9OQwILxWaEkr8J6PAdZSHM yqM/o1yAEcjLwjZ7s3YtNSwv3TfRpIZC3uzyiwxx1QwaJFQ/JetC/8eNFwWhlPBHWS5P xb8Ejs9MaWx6uEUTIeM3IIMVwh0vH2PTavbd5EpFJq9TJXcVsvIbCGXj0K3RPWkeadrw N8qvWVdV26jP6qzfyiUqshnFp5CjgTS2S9UNcYSUTWvmaywnbqhQiGNTFg12dGt/Th/E VCQDRdqZ7mta83lUVz+SFHUL38VCTyQdi8dTX86jmo2Zv8efmTwMoL87E+V7688p3gAb iEXQ== 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=KKKZ6MKOi7Y1DJVejFHVLj3fgZM048hU6E0pIRB7xYo=; b=lMYgs381pL6mngr/ZL+0oG724gSCUOKqMnktfaSSmYqmZW3DxKV3LCghHlyDyYNLOw Bx5duOdEbf5HgR25WizT/OetwZ152zbKogfd+JfbYHG6uMLPz/cg+ANpS+HCOzGG6u4H qKfZ35nUenJ3nDapXUVT4D9msHA0IT9VOg89ZxqXMKMVhp2A/7dZ/AyvnnrIQXYcghu+ Nd621u+ZhcA26sqqodL2rs2bLPeGvvsbAcrdeLSBejtHmNAdkzKaDXlJSDRwUAyysLoZ HdXNcXK+u94J6eAx3LF0X3t2+zZ6+qjazs4DeiTSaVPPu/XfLkCHL+OTbRbrHFtb7PF5 OzGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uDxTb2jM; 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 g18-20020a056a001a1200b0052b18c4c8besi13651509pfv.217.2022.08.15.17.47.38; Mon, 15 Aug 2022 17:47:48 -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=uDxTb2jM; 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 S1352393AbiHPAJF (ORCPT + 99 others); Mon, 15 Aug 2022 20:09:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354940AbiHPAAk (ORCPT ); Mon, 15 Aug 2022 20:00:40 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55F66C743F; Mon, 15 Aug 2022 13:20:39 -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 ams.source.kernel.org (Postfix) with ESMTPS id 17BECB80EB1; Mon, 15 Aug 2022 20:20:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6380EC433D7; Mon, 15 Aug 2022 20:20:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660594836; bh=e9whEK17xKjaAzRvOp5nbn9YoNuJqN2Qv4Jjbm+eUP0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uDxTb2jMk4r9TcDOdg3/QHss2hok0StcurhdIL2FaAr/yleCJKWYB2LxB/C8gf6S6 72aafNuYzLn8FZbnvbL16fcc4gduKFAnJqBtMNpO7lt4KfYvG2EvgvubBBJB+RhbkF vgo/+qRlXLtUqjIzF5tMSOv6fn9gYUOqJAHLMVkM= 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.19 0574/1157] HID: amd_sfh: Dont show client init failed as error when discovery fails Date: Mon, 15 Aug 2022 19:58:50 +0200 Message-Id: <20220815180502.599031993@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@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 dadc491bbf6b..1441787a154a 100644 --- a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c +++ b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c @@ -327,7 +327,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