Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp5874609ybv; Wed, 12 Feb 2020 01:46:51 -0800 (PST) X-Google-Smtp-Source: APXvYqxN5ywKlOueVJ7JJi0NfrAxkBijUfYtDynkVzh4d49lJRybXu+HwtYcw6pvLedJX+j8Wz9c X-Received: by 2002:a9d:6398:: with SMTP id w24mr8260204otk.15.1581500811497; Wed, 12 Feb 2020 01:46:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581500811; cv=none; d=google.com; s=arc-20160816; b=hsrZDKorm0ZWVDz+LexsipIPT58qapqt2OKD0F+YcNYpDXABKhT7b1MZPPaT+JfEnp 7a5DBWhrYdmx7uBUBIDwHYNrrlxVapOOAQHtzUSwOx2CuuIikJlJMfud5pmNjXKwg/Q9 G76fza4ar1mpxb3GOk9jw2NRYcNH2MAqgoAP4zOHQirPWlOoOcb1TEgKs5gIKaXQmUlj Mx8ZfhdoXJe8r71GGbJ76tXFxzaLimsJQxXOm7J7r1R6uqfI4tIKcREHIJ5iP3CK45bl QwdgTq+i43tgB0n9C16fOm6Yt2BoItxEkYTNltBbjk6IVXF2xZFsP2+c2r5zMU3gjDR2 Y/+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=hyacBhv2hiGcpLdp8b8/6ZKRu2/yM9R1oT2Wgnj5OU8=; b=PRNVtnt6nzKNtgrI8KP5kkbRKlojei16jBCKF68Vl/PSvXPfd6ig9kDgeXzB6jOlSf 6gwHvrJJknm9s9dVMIYdtVdVXdI1HsGMvTPbFQDN4hDzM0YU4FkKJCZTYkh0rZoI8lsL XpBHKJN6/sGhFOMVAdqh63sBl7q0ekHoNFG5Fzmj3SG1KPMwNBSaoSAWPQQEtXfhQCaM JMVCCX4bm3IK49q1QNmZNfQ3RoVx2XwaSsQ8SKWF7m3aoV3k2TiHNxn0CgE/sgLigYYD /Gksj6OJlDFU6QU8SzNOwQVwImiK9vjNHKkuZ/AjKB55YAO9l3rbWD5Y6xrVEfxIVPgZ lW/g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m24si3443578otn.67.2020.02.12.01.46.37; Wed, 12 Feb 2020 01:46:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728912AbgBLJqd (ORCPT + 99 others); Wed, 12 Feb 2020 04:46:33 -0500 Received: from sauhun.de ([88.99.104.3]:33658 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728605AbgBLJqc (ORCPT ); Wed, 12 Feb 2020 04:46:32 -0500 Received: from localhost (p54B335A7.dip0.t-ipconnect.de [84.179.53.167]) by pokefinder.org (Postfix) with ESMTPSA id 1A98E2C07EB; Wed, 12 Feb 2020 10:46:29 +0100 (CET) Date: Wed, 12 Feb 2020 10:46:28 +0100 From: Wolfram Sang To: "H. Nikolaus Schaller" Cc: Paul Cercueil , Paul Boddie , Alex Smith , Rob Herring , Mark Rutland , Ralf Baechle , Paul Burton , James Hogan , David Airlie , Daniel Vetter , "David S. Miller" , Linus Walleij , Andi Kleen , Krzysztof Kozlowski , Geert Uytterhoeven , Miquel Raynal , Petr =?utf-8?Q?=C5=A0tetiar?= , Richard Fontana , Allison Randal , Stephen Boyd , devicetree@vger.kernel.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-i2c@vger.kernel.org, netdev@vger.kernel.org, linux-gpio@vger.kernel.org, letux-kernel@openphoenux.org, kernel@pyra-handheld.com Subject: i2c: jz4780: silence log flood on txabrt Message-ID: <20200212094628.GB1143@ninjato> References: <7facef52af9cff6ebe26ff321a7fd4f1ac640f74.1581457290.git.hns@goldelico.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="i9LlY+UWpKt15+FH" Content-Disposition: inline In-Reply-To: <7facef52af9cff6ebe26ff321a7fd4f1ac640f74.1581457290.git.hns@goldelico.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --i9LlY+UWpKt15+FH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable The printout for txabrt is way too talkative. Reduce it to the minimum, the rest can be gained by I2C core debugging and datasheet information. Also, make it a debug printout, it won't help the regular user. Reported-by: H. Nikolaus Schaller Signed-off-by: Wolfram Sang --- Sorry, normally I don't do counter patches. Yet, this time I realized that it would be faster to actually do what I envisioned than to describe it in words. I hope you don't feel offended. This driver has way too many dev_err anyhow, so this may be a start. Obviously, I can't test, does it work for you? drivers/i2c/busses/i2c-jz4780.c | 36 ++------------------------------- 1 file changed, 2 insertions(+), 34 deletions(-) diff --git a/drivers/i2c/busses/i2c-jz4780.c b/drivers/i2c/busses/i2c-jz478= 0.c index 16a67a64284a..b426fc956938 100644 --- a/drivers/i2c/busses/i2c-jz4780.c +++ b/drivers/i2c/busses/i2c-jz4780.c @@ -78,25 +78,6 @@ =20 #define X1000_I2C_DC_STOP BIT(9) =20 -static const char * const jz4780_i2c_abrt_src[] =3D { - "ABRT_7B_ADDR_NOACK", - "ABRT_10ADDR1_NOACK", - "ABRT_10ADDR2_NOACK", - "ABRT_XDATA_NOACK", - "ABRT_GCALL_NOACK", - "ABRT_GCALL_READ", - "ABRT_HS_ACKD", - "SBYTE_ACKDET", - "ABRT_HS_NORSTRT", - "SBYTE_NORSTRT", - "ABRT_10B_RD_NORSTRT", - "ABRT_MASTER_DIS", - "ARB_LOST", - "SLVFLUSH_TXFIFO", - "SLV_ARBLOST", - "SLVRD_INTX", -}; - #define JZ4780_I2C_INTST_IGC BIT(11) #define JZ4780_I2C_INTST_ISTT BIT(10) #define JZ4780_I2C_INTST_ISTP BIT(9) @@ -576,21 +557,8 @@ static irqreturn_t jz4780_i2c_irq(int irqno, void *dev= _id) =20 static void jz4780_i2c_txabrt(struct jz4780_i2c *i2c, int src) { - int i; - - dev_err(&i2c->adap.dev, "txabrt: 0x%08x\n", src); - dev_err(&i2c->adap.dev, "device addr=3D%x\n", - jz4780_i2c_readw(i2c, JZ4780_I2C_TAR)); - dev_err(&i2c->adap.dev, "send cmd count:%d %d\n", - i2c->cmd, i2c->cmd_buf[i2c->cmd]); - dev_err(&i2c->adap.dev, "receive data count:%d %d\n", - i2c->cmd, i2c->data_buf[i2c->cmd]); - - for (i =3D 0; i < 16; i++) { - if (src & BIT(i)) - dev_dbg(&i2c->adap.dev, "I2C TXABRT[%d]=3D%s\n", - i, jz4780_i2c_abrt_src[i]); - } + dev_dbg(&i2c->adap.dev, "txabrt: 0x%08x, cmd: %d, send: %d, recv: %d\n", + src, i2c->cmd, i2c->cmd_buf[i2c->cmd], i2c->data_buf[i2c->cmd]); } =20 static inline int jz4780_i2c_xfer_read(struct jz4780_i2c *i2c, --=20 2.20.1 --i9LlY+UWpKt15+FH Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAl5DyXAACgkQFA3kzBSg KbYoahAAtIAAtnnBgAg6FGqt5JLhVswxcJnxfAzMxAk708tbDSluUzpyiEXWCa52 d60BlamWi8++aJOMQ/iZ4k8wdvJX+9AN9JSyLtECMSFGhJVqDygeJGCA7N3qY33S XBcvEIf2/OjfaWiTH22XXH9Pt6Hyo7ykrfv0LCD9OQwI5B+OvTfaM4WjXiPMP+dT 89R9yTKvQPIpV8G6hhj5BKF4TAbkmn2MKMNG+Z6vWlPToTQAGs732p470xXjSX+t Oc5fNIt6NchL2pySrVsqDY84+GTRJ6J8by4lKAK3jQUxB3fzYqgri2z+BPBsXUkQ IuaqB/a1gvmkAFl8JwfHvvgueeisXevGW5RdpPnWhvNPBDNg5BXgeSSjZDRLJCdA rRO+2IUDoRyCLAnu7hV43GtIqiKQSidH8t9WfjLbspxici/1MISwfJPivPvbTBx3 AVFXKutTSBgR4r3Obtyb5cUZvQbYP+IvKArUHPTcFeVGZPFLhNF1OjgMAd6W/Q05 uZqYud9prhC71Hk9t3jW6rsXvKUfZkMESrMGsCnH0NUayvBkGv89r+B/HqqurLLn 5Hx1cO1AZpIxnO9QYaiQya6mCysTJZE7x3lpHznLBt6skM2JonKiqOUeTN8f3m86 oDJgVd4tkF2kIOweXNSxBWP7K3Xh5tCVqCdeEPz5fG7WlkGdKoI= =LWAJ -----END PGP SIGNATURE----- --i9LlY+UWpKt15+FH--