From patchwork Mon Dec 17 12:53:54 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?John_T=C3=B6rnblom?= X-Patchwork-Id: 1887071 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 08AAD3FCA5 for ; Mon, 17 Dec 2012 12:54:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752676Ab2LQMyR (ORCPT ); Mon, 17 Dec 2012 07:54:17 -0500 Received: from mail-ee0-f46.google.com ([74.125.83.46]:44353 "EHLO mail-ee0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752631Ab2LQMyR (ORCPT ); Mon, 17 Dec 2012 07:54:17 -0500 Received: by mail-ee0-f46.google.com with SMTP id e53so3199349eek.19 for ; Mon, 17 Dec 2012 04:54:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:x-mailer:mime-version:content-type :content-transfer-encoding; bh=OYgv+3TqhPfEOjiFftGuNh+2yYlrD+J98PvxE6nXa5Y=; b=Wg30SYbzrRKRozMBaRT1riFgyYCr8S455CKcQCIU1ZBoUtsaJlyrvAjVY+GZv5s9eU XvKKcDclh3btmhUE8aJaK/4OXTALlzyuy89tIZYq4c3gJmd0wJdOaSgnRiGE1fH6pZAP OS9Z0gArY8vGIhlc/mhdnyA3EVD9tV1ppO6ZLXPOqtpgC7rI11fgsxaUTMzJcMMui5yW rDyfEdJxv1CpZrF84eQJwgmJ1VlqFyaRjowI/3AG2QwIlBmF4OH3JYMQHbTzyIASpI/B Llu8SwDaynCXEyQnU7ni8Tqzvykba2FuawIStE8rn+GsuIj5YR+dUcOIv9bApq8ix15d gTaA== Received: by 10.14.0.71 with SMTP id 47mr40674508eea.19.1355748855874; Mon, 17 Dec 2012 04:54:15 -0800 (PST) Received: from workstation.home.swe (h-63-149.a163.priv.bahnhof.se. [79.136.63.149]) by mx.google.com with ESMTPS id w3sm28857879eel.17.2012.12.17.04.54.14 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 17 Dec 2012 04:54:15 -0800 (PST) From: =?UTF-8?q?John=20T=C3=B6rnblom?= To: linux-media@vger.kernel.org, john.tornblom@gmail.com Subject: [PATCH] bttv: avoid flooding the kernel log when i2c debugging is disabled Date: Mon, 17 Dec 2012 13:53:54 +0100 Message-Id: <1355748834-9407-1-git-send-email-john.tornblom@gmail.com> X-Mailer: git-send-email 1.7.8.6 MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org When the bttv driver is running without i2c_debug being set, the kernel log is being flooded with the string ">". This string is really a part of a debug message that is logged using several substrings protected by a conditional check. This patch adds the same conditional check to the leaked substring. Signed-off-by: John Törnblom --- drivers/media/pci/bt8xx/bttv-i2c.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/media/pci/bt8xx/bttv-i2c.c b/drivers/media/pci/bt8xx/bttv-i2c.c index 580c8e6..da400db 100644 --- a/drivers/media/pci/bt8xx/bttv-i2c.c +++ b/drivers/media/pci/bt8xx/bttv-i2c.c @@ -173,7 +173,7 @@ bttv_i2c_sendbytes(struct bttv *btv, const struct i2c_msg *msg, int last) if (i2c_debug) pr_cont(" %02x", msg->buf[cnt]); } - if (!(xmit & BT878_I2C_NOSTOP)) + if (i2c_debug && !(xmit & BT878_I2C_NOSTOP)) pr_cont(">\n"); return msg->len;