From patchwork Tue Apr 4 06:16:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Amit Pundir X-Patchwork-Id: 96670 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp47952qgd; Mon, 3 Apr 2017 23:17:11 -0700 (PDT) X-Received: by 10.98.212.91 with SMTP id u27mr21355186pfl.117.1491286631324; Mon, 03 Apr 2017 23:17:11 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m188si16434436pfc.145.2017.04.03.23.17.11; Mon, 03 Apr 2017 23:17:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752453AbdDDGRK (ORCPT + 6 others); Tue, 4 Apr 2017 02:17:10 -0400 Received: from mail-pg0-f45.google.com ([74.125.83.45]:32861 "EHLO mail-pg0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752416AbdDDGRK (ORCPT ); Tue, 4 Apr 2017 02:17:10 -0400 Received: by mail-pg0-f45.google.com with SMTP id x125so142534116pgb.0 for ; Mon, 03 Apr 2017 23:17:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OJiFDfsyOV1PrZSb2b5R31fUn8CXjSJkXlkTLmqQins=; b=Lo/hnJHXyCPP30f6GrLVA7DgWqHNRHEUZbDy+nIE6YVr7C2Xhm82Iqkmtv5KOg/RjN otRtH5nbp+tckyKOyHQ5q3fqDFdijSwYvgm65wOxdqUzOALBcddU869AxPbDTLTg4fC0 yoGidRZjErfe8hAKbF9zIwLozoI3E1S887bdQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OJiFDfsyOV1PrZSb2b5R31fUn8CXjSJkXlkTLmqQins=; b=N2mCzoez3XMp7XT55UIStBTzFaw3azCOuqEaYOlaVWwTpkXFAPmasdbTos8RAEkSAz akdkelxsv6OlmUsuMZf7zb6oPWVSmSbG3jct7MOBnOuDhMZ7C08DGT6XnOef+tT1VO8O 2xTjJ5v7mQi9wDxOiZuywtcBaFSvCfULWLrzQxbnp+OWjm9HrXAak1F3dhL32DQuT57X OdmchPJS7qqxb/167JPUSv6Bb7zXF7c7ReDWgkhUoB6mpzAWSuH1xACZ/sOnQVdEKyQS PSLHOX1vnppwyWFJdTmAL8RT6nzflGVYEB+wxWfIVgycGP8ZW/22L8EufXrajCLg+7Kp RVFA== X-Gm-Message-State: AFeK/H2TRk42iGmhuGd5ivjsPUqeLlByPnlf1wkBVx3NX0byJUtfptGDmSpNA90d3VMJh2D3 X-Received: by 10.99.97.147 with SMTP id v141mr22091560pgb.98.1491286629403; Mon, 03 Apr 2017 23:17:09 -0700 (PDT) Received: from localhost.localdomain ([106.51.240.246]) by smtp.gmail.com with ESMTPSA id f81sm29247068pfe.61.2017.04.03.23.17.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 03 Apr 2017 23:17:08 -0700 (PDT) From: Amit Pundir To: gregkh@linuxfoundation.org Cc: stable@vger.kernel.org, =?utf-8?q?Noralf_Tr=C3=B8nnes?= , Wolfram Sang Subject: [PATCH 08/33] i2c: bcm2835: Use dev_dbg logging on transfer errors Date: Tue, 4 Apr 2017 11:46:56 +0530 Message-Id: <1491286617-31131-5-git-send-email-amit.pundir@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1491286617-31131-1-git-send-email-amit.pundir@linaro.org> References: <1491286617-31131-1-git-send-email-amit.pundir@linaro.org> MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Noralf Trønnes Writing to an AT24C32 generates on average 2x i2c transfer errors per 32-byte page write. Which amounts to a lot for a 4k write. This is due to the fact that the chip doesn't respond during it's internal write cycle when the at24 driver tries and retries the next write. Only a handful drivers use dev_err() on transfer error, so switch to dev_dbg() instead. Signed-off-by: Noralf Trønnes Reviewed-by: Eric Anholt Signed-off-by: Wolfram Sang (cherry picked from commit 23c9540b3ad1d7473fe40df80074d0fb0bf04869) Signed-off-by: Amit Pundir --- drivers/i2c/busses/i2c-bcm2835.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 diff --git a/drivers/i2c/busses/i2c-bcm2835.c b/drivers/i2c/busses/i2c-bcm2835.c index d2ba1a4..54d510a 100644 --- a/drivers/i2c/busses/i2c-bcm2835.c +++ b/drivers/i2c/busses/i2c-bcm2835.c @@ -216,7 +216,7 @@ static int bcm2835_i2c_xfer_msg(struct bcm2835_i2c_dev *i2c_dev, (msg->flags & I2C_M_IGNORE_NAK)) return 0; - dev_err(i2c_dev->dev, "i2c transfer failed: %x\n", i2c_dev->msg_err); + dev_dbg(i2c_dev->dev, "i2c transfer failed: %x\n", i2c_dev->msg_err); if (i2c_dev->msg_err & BCM2835_I2C_S_ERR) return -EREMOTEIO;