Received: by 2002:ab2:4a89:0:b0:1f4:a8b6:6e69 with SMTP id w9csp97680lqj; Wed, 10 Apr 2024 05:22:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUx6cz9ffW0102eAj79nNou900v63A7RkJIolyegshasXUC7LfGJZ1oGOso4lUWT/nUmlOM3I/QNFTs+cI2dNI9KqiyTB0sILp7guNMfg== X-Google-Smtp-Source: AGHT+IEp6v0I8QGqy1/R7KrtBAbgMJm3iQhrBffqkla7AtwLrKm+bpM+TWoKGl6Ln9IuF7fmIO+f X-Received: by 2002:a17:902:cf12:b0:1e4:9d6f:593 with SMTP id i18-20020a170902cf1200b001e49d6f0593mr3803164plg.36.1712751729245; Wed, 10 Apr 2024 05:22:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712751729; cv=pass; d=google.com; s=arc-20160816; b=Py1OXenn2RyxdLzYW9zGk+O7vU/vsVsW/z11r8mQfI9Al2V9NGhtE2a71mepzPPFxo b4ba5XTzfc6szXl+JmvThTxzEwtE1zO7aJ73WLcc/5tPmOlU+x1y3jV6o9DnNBpxUq7h 8tggapUWZCWaq89VbMKU3yf/HVqiVi8P9B6cXQynTVl10E9EF71lw4ufNG2/GVtCn5qB OFjXG3ai8FTe9ktwWSrtxhR9ZacHPG5LHkNSaLb2u4V3HcVViPhQn93wbcBNnpPIHVTl UlB3WVDQ4HkCkaYfxL78etVuIZccvTEsAHqflB9r3LSn58ao2elawbZJo/oIjSIBH3ma 4bbg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=qO9cJiUvB/iLC0juCUOkfpnw/zDGXiuWQbbvh2Rb3zE=; fh=0WCz/vxxWjuQe5c06FFIZfUAH/XhZrlMbZhJfDCN6No=; b=pmweozMYCM/NqJjBNDMNOIEYWeIQSMfrfNte1/UNeAsD4XvEPh/uK2cA11gS/io0xX rWw+JBc6GdnWC730KlBWjQZVWhu1x/SzmPTXzPcSBUXS25iujMXjS8PT2aFgqye+HsVh s4R3u2qkFLlzZn3ZlGmjoW1F0Yb7AEVecnSEUIaggjIT2sNH7XJvwFAjuqMIUI/H55Gh DTZvRBObXf23JPnlF9XOIyn+oVoLD3FTWMu+9kajI9YMG0EmjuVXNe7OtqIDtB1EocrT x4bpuHeLr1YX4JFGEDJcDvbMMWUjLSyQEMHHId5LHinwvDFL4yL0mKFkubmJS2EqbK8a 50BQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EcSuHPiZ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-138479-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-138479-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id t15-20020a170902e84f00b001e3c6c51673si10002736plg.307.2024.04.10.05.22.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 05:22:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-138479-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EcSuHPiZ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-138479-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-138479-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id E7328281D98 for ; Wed, 10 Apr 2024 12:22:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B6FF615B142; Wed, 10 Apr 2024 12:22:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="EcSuHPiZ" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DD7234501D; Wed, 10 Apr 2024 12:22:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712751723; cv=none; b=XCELeRQPmS3hXpVXNNNimvW5I8zD33Yn0kaKAj2Qqt24YhDPq3dYIA4r9nmIHqZ/J9DCfiCtygpElBNp7PoIet9KJLrOCYQE198Whi0YA58gyGxVwEjw5M9GuaUlqUHOq7rnHosWU8MHiC8Pqc3NOCOdijpvfBcqYr4FshI0wd8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712751723; c=relaxed/simple; bh=fhCS1XykDjhuWUw28ZSsJwT4DsrmC4F3xhQAUnzXjjk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=KZRR4+7k/7sGKHEOfyjMw8/bdTNr2GC1Vy8cIiX9UNNTVj+SBBJ9ABC+FJ8LpvAgKyKphXZEWvDEiFSpl7X0DQopHht+Vk62YD5ctXyTqhz/YWF9bxXH8C8HQ8rfiDYWsg9ZQgdZq1/sceznLPJVTWBzjppFp0vZKM0wEpwvpYc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=EcSuHPiZ; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id DAF14C433C7; Wed, 10 Apr 2024 12:22:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712751722; bh=fhCS1XykDjhuWUw28ZSsJwT4DsrmC4F3xhQAUnzXjjk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=EcSuHPiZOHBuNUmt1rR8ndwr/eCwbc3+2nDisVYpPu97NHt+i3fkdSVrhZPTL8Dpu nuHQJcbzhLTReWBGJpLUMn8eymab9QKBcKRKNqdK9XcY5d058yanCg7mkvlGT+ApXB jXCYvCUtW3JSvJj0ZPWbPE9SszsQ50qgIQATaa/JxdPcNEHzglGLkZ5t5l9oTzTpYZ NpQbZRePDV2LuDAwAlcOnngz44Ps8PKxXwi6B1w3DODBBXaEwfgPIdXIkWS7NqZbfi E3l4UlAAhgAj267kZQKmGfT8j4IiHA91xsPiqmybr8KrOtsKnIqimQYCRJ7m+uGxru CkTbAoozlfgzA== Date: Wed, 10 Apr 2024 14:21:58 +0200 From: Andi Shyti To: Wolfram Sang Cc: linux-i2c@vger.kernel.org, Jean Delvare , linux-kernel@vger.kernel.org Subject: Re: [PATCH 06/18] i2c: i801: remove printout on handled timeouts Message-ID: <242ogjpole3ltk5nu53knbfsxmmwcqfrbcivjh7fnkngvrroq5@cwspwdrtepwh> References: <20240410112418.6400-20-wsa+renesas@sang-engineering.com> <20240410112418.6400-26-wsa+renesas@sang-engineering.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240410112418.6400-26-wsa+renesas@sang-engineering.com> Hi Wolfram, On Wed, Apr 10, 2024 at 01:24:20PM +0200, Wolfram Sang wrote: > I2C and SMBus timeouts are not something the user needs to be informed > about on controller level. The client driver may know if that really is > a problem and give more detailed information to the user. The controller > should just pass this information upwards. Turn all timeout related > printouts to debug level. > > Signed-off-by: Wolfram Sang > --- > > Here, I did not delete the printout to support checking the termination > process. The other drivers in this series do not have this SMBus > specific termination step. > > drivers/i2c/busses/i2c-i801.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c > index 4294c0c63cef..a42b5152f9bd 100644 > --- a/drivers/i2c/busses/i2c-i801.c > +++ b/drivers/i2c/busses/i2c-i801.c > @@ -400,7 +400,7 @@ static int i801_check_post(struct i801_priv *priv, int status) > * If the SMBus is still busy, we give up > */ > if (unlikely(status < 0)) { > - dev_err(&priv->pci_dev->dev, "Transaction timeout\n"); > + dev_dbg(&priv->pci_dev->dev, "Transaction timeout\n"); why after 5 patches of removing dev_err's, here you are changing them to dev_dbg? It's still good, but if we want to be strict, errors should print errors: as we are returning -ETIMEDOUT, then we are treating the case as an error and we should print error. Upwards, then, we can put some more logic and decide whether -ETIMEDOUT is a real error or not and consequently print a debug or an error message. As you did before, I would just remove the printout here. I will wait a bit for more comments and take patches 1 to 5 so that I can unburden you a little from them. Thanks, Andi > /* try to stop the current command */ > dev_dbg(&priv->pci_dev->dev, "Terminating the current operation\n"); > outb_p(SMBHSTCNT_KILL, SMBHSTCNT(priv)); > @@ -411,7 +411,7 @@ static int i801_check_post(struct i801_priv *priv, int status) > status = inb_p(SMBHSTSTS(priv)); > if ((status & SMBHSTSTS_HOST_BUSY) || > !(status & SMBHSTSTS_FAILED)) > - dev_err(&priv->pci_dev->dev, > + dev_dbg(&priv->pci_dev->dev, > "Failed terminating the transaction\n"); > return -ETIMEDOUT; > } > -- > 2.43.0 >