Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2432633ioo; Sat, 28 May 2022 13:30:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJywl24IteqkxYt2Y5FtyJKXUmwGvzWVzYll7IOxwq6tA8fl30ppW52qpxtZuCMHuIozC2UQ X-Received: by 2002:a63:5a58:0:b0:3fb:b455:ed15 with SMTP id k24-20020a635a58000000b003fbb455ed15mr6774539pgm.228.1653769807142; Sat, 28 May 2022 13:30:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653769807; cv=none; d=google.com; s=arc-20160816; b=Hskm+J6TbqPe6SurP74AHZCZC3rX/CCk2Wmbu7tjFAxqf5I2nuXMGBbyTEoiBZVYXf WPYffBUw29JlG34/K4xgG7wrdF8DXNoyXxPcRRYpTWcKhSkMYyck0E0jPivnzh8bWt03 duF8IvzN9jMyeiFqMwMMYDIAzGHbG+yAzzkZtg0EOZkdOZ8iMSxY2bLoqX3JN5degC1M 2mrhBcw+s1kw6zOT3Cd8kPRYE8cmr4OIXGgwSXS3TRxBr/MEfEODPgdRJ6Z6G2KtslFs bt8eO6LWiqbMSMFz9wt+PPt9Gics7s/29itci+MOZDuvVZjb6NZ1QwrCq+kndALiSeIH viBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature; bh=eHvlAoklKgKIgQNEBlkM3JFvckvSv4O66oXIB/+DnM8=; b=s75VZveiax3tSPak/muZy4Kqwt9e41jaMj7B24sVWH/GQ6xMVu6Fj8YaCmz76JyEow TVGpVfBXXCYFXqy6mmaRckZOVDwZRhdiRr8+FDCFM7XpwpZ8AzSHt599AANVmL9dGPXs GIERXKgT7eobkRXuPv531iR5M/qPpvE0LWQltk1NzRCHi4szRTMRrefjioCTZEAMOcUy Oe3Q+xqyUdy6rEQnsGQZHe8oUumb/AofjxpS80MBWUo9Mhg1qAZs2mHeJNQm9hk63tyW 8wFzlkEeRHRl/009V+3lHfvnSGrwRQUp/i7v+9fYKjQDcaDsdwYCxHdxXHV68nKAuzhL 88NA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=u4YwSzyI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id b13-20020a170903228d00b0015baf4aee8dsi11709884plh.151.2022.05.28.13.30.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 May 2022 13:30:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=u4YwSzyI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4F63BCE5C7; Sat, 28 May 2022 12:39:33 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244964AbiE0HKp (ORCPT + 99 others); Fri, 27 May 2022 03:10:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244974AbiE0HJF (ORCPT ); Fri, 27 May 2022 03:09:05 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82CD3FC4F1; Fri, 27 May 2022 00:07:43 -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 2205B61A4E; Fri, 27 May 2022 07:07:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 227F5C385A9; Fri, 27 May 2022 07:07:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1653635262; bh=IUjHTZg8XW3nb4CgLtI/7dZRQzTsTt0OL0lA1dn38Ks=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=u4YwSzyIoiKB1al1FWHnHUO4bdYgCahbKfw4d2m+Gu3WxV8gE+a7TrCEf+qJdBb2p Wdy5nTtMgw4yQ8xJ9rlNVx4SbGJ/DDkxTgQ4PsTuvgsHJe5rG9T1qfXIeyRNEd62En H7HniVWONh1cF6KuKhgyu7EEg0BcrJLOLFKUJZX0Cu/e60Fy7NLbjU3xsmfNsVpUOm SEQQu+90NOP6EsbYoS8XPwDt/ntfN5nilJNw9fgOvdMm171I3ldjBrc+3wImODMwrP Q6gQpFmYhn0dWT8e7aQ2G5FhQkDzy6uzAHZfkfJmC9rqlZzyfP73gl1C6G39z3+c+g HtRni/NuN1ckQ== Date: Fri, 27 May 2022 09:07:38 +0200 (CEST) From: Jiri Kosina To: Mario Limonciello cc: basavaraj.natikar@amd.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, David Chang Subject: Re: [PATCH v2] HID: amd_sfh: Don't show client init failed as error when discovery fails In-Reply-To: <20220512181848.27347-1-mario.limonciello@amd.com> Message-ID: References: <20220512181848.27347-1-mario.limonciello@amd.com> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 On Thu, 12 May 2022, Mario Limonciello wrote: > 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 > --- > v1->v2: > * fix some fat finger typos in commit message > > 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; Applied, thank you. -- Jiri Kosina SUSE Labs