Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3022676rwb; Mon, 15 Aug 2022 16:20:08 -0700 (PDT) X-Google-Smtp-Source: AA6agR44DYliJ/N5MnMnORGD4ld4nSdCIG7m6xj5NdNUpKNumR4crNAihrmCbdK4lHmuZhfxOMNZ X-Received: by 2002:a17:907:10d1:b0:730:7c7d:3869 with SMTP id rv17-20020a17090710d100b007307c7d3869mr11332228ejb.356.1660605608782; Mon, 15 Aug 2022 16:20:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605608; cv=none; d=google.com; s=arc-20160816; b=xfSvBix9IISZWb9BPi0xtvS7I/Zz3HfjH36KNbFR+Y4N+F3/uFcKvE42rUTHH+HL+3 dbKqeZWUhm5/RHATL6Q02VvIs5FCzpZSK28USNMwohwQGXfcZuxORLvfZycMO/lfvJ+N ew4rjfdZtPkfNqznMYX+0QowdkPkJaxIWo3ptTnfVd/gMk0FXZs92SCgc+0pKwn4vkyp p/EjSD0cMT/XTzz6vu4PdnFhnVhimvDWOljCZxb2HKohcVw0+UzD5TcbC6TdHAnzl9Vx FkyDJ1WM7RwDK8JRIIwd/2CSOohuPSeeHf1T6XhnkFp1PEkCdaihpe07g/L5gNteFNKf R5gw== 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=z7X/ME6jcd1Y093xIszGC2wsLRYzMt/v8JJHaGfjM3I=; b=l1yIeRiY1Z1LQABaHA+HXCbCfYaenuSsESXgk7msVqHf4QJZinWWOXYVkFPU3TwJkT 7EdOYBe6ntmnMO8OaPi0mYUk2Jm4ANxJiz8xqryXXJbJNtU626G7NyNd6v2JeCctm5+5 XlTItfwLA8S5IXmeYGWJTJmxpkBBbgPIIrynJ3b7ECbyevvry/LKLEh2m7kgLSdfc4Jl JiNQn/6d5G1eKaL1iLudhzmgfmu4EONRjbBIsloOdcXbMYEisQ3WaacRvKRBe2LYWHeF VfMErne1Kf19QPX7Dp/KFFkOI8wA9COQ4iG5y09zmYfUHz/YBLoVbtccOK9/KJwy96z3 6aYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=aWZkQhs+; 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 cs9-20020a170906dc8900b0073157f7b820si9031480ejc.912.2022.08.15.16.19.43; Mon, 15 Aug 2022 16:20:08 -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=aWZkQhs+; 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 S1348391AbiHOVdK (ORCPT + 99 others); Mon, 15 Aug 2022 17:33:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347612AbiHOV3M (ORCPT ); Mon, 15 Aug 2022 17:29:12 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A1F3EE4B1; Mon, 15 Aug 2022 12:23:57 -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 8F58760693; Mon, 15 Aug 2022 19:23:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9A98FC433D6; Mon, 15 Aug 2022 19:23:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660591436; bh=4eqoZxTaNTamgQoJfwYtkg7G/7ZFJzTqF8mExp98g1g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aWZkQhs+XVtDoZ6G9kGJ9OZ7bfVe+ZLyZlioXQfDeXU1JdRGaoJel19Z+v3U3XWoR fWr5hZVa9CEnZvXh/jAxpCvlQltx6fk1LdSWQadCG+dH62nlHV4gVSMzwdzSHzOL71 daJB5exnRoc7UIzUzPlIDtlgwIx+g4eibgyGOZik= 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.18 0540/1095] HID: amd_sfh: Dont show client init failed as error when discovery fails Date: Mon, 15 Aug 2022 19:58:59 +0200 Message-Id: <20220815180451.887668980@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@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 e18a4efd8839..390298a6fc85 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