From patchwork Mon Aug 20 01:23:43 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezequiel Garcia X-Patchwork-Id: 1345421 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 1722FDF264 for ; Mon, 20 Aug 2012 01:24:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752733Ab2HTBYN (ORCPT ); Sun, 19 Aug 2012 21:24:13 -0400 Received: from mail-gh0-f174.google.com ([209.85.160.174]:47453 "EHLO mail-gh0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752336Ab2HTBYM (ORCPT ); Sun, 19 Aug 2012 21:24:12 -0400 Received: by ghrr11 with SMTP id r11so4807916ghr.19 for ; Sun, 19 Aug 2012 18:24:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=YGsCcrJjgUQJiRQ/wMExaBCuG7r09rsjGfLobMW/YeE=; b=VpK+rou4Dl3EOq6zovm7jxIFC5MKZDGftoQDAaKgVapaS7TAM/m5hyLvh8xILSbHUw Mv6uKhhsq+Yk5AB1tNdx/baU5VR6BeS9B2dyX1U8VfSfO8QOeOISGnsdRng+0/Vh16v8 OjAd6Ig+wdSy3uBDmed1pCUcQPdcc8AcavzkoESsu4cpbOj+xRRSddNhI44wqze9iOet 8BbAeWCfTOjRjUnCojAR2xXN4q9SOtkNpZmy5sJcRXb87nkDBnGp7eCUiz7MaFBZ8fTY 5ntiDy4VWmJB6QSV9tL7H4gxc0vFHjq1zLFh8jeNXJE3H/JYxdqkccT+gPTVE1gfoa2h RUhQ== Received: by 10.236.117.97 with SMTP id i61mr19047053yhh.73.1345425851737; Sun, 19 Aug 2012 18:24:11 -0700 (PDT) Received: from localhost.cpe.express.com.ar ([200.81.126.15]) by mx.google.com with ESMTPS id b46sm26820855yhm.3.2012.08.19.18.24.02 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 19 Aug 2012 18:24:11 -0700 (PDT) From: Ezequiel Garcia To: , Mauro Carvalho Chehab Cc: Ezequiel Garcia Subject: [PATCH 1/4] stk1160: Make kill/free urb debug message more verbose Date: Sun, 19 Aug 2012 22:23:43 -0300 Message-Id: <1345425826-13429-1-git-send-email-elezegarcia@gmail.com> X-Mailer: git-send-email 1.7.8.6 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org This is just a cleaning patch to produce more useful debug messages. Signed-off-by: Ezequiel Garcia --- drivers/media/usb/stk1160/stk1160-video.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/media/usb/stk1160/stk1160-video.c b/drivers/media/usb/stk1160/stk1160-video.c index 3785269..022092a 100644 --- a/drivers/media/usb/stk1160/stk1160-video.c +++ b/drivers/media/usb/stk1160/stk1160-video.c @@ -342,18 +342,18 @@ static void stk1160_isoc_irq(struct urb *urb) */ void stk1160_cancel_isoc(struct stk1160 *dev) { - int i; + int i, num_bufs = dev->isoc_ctl.num_bufs; /* * This check is not necessary, but we add it * to avoid a spurious debug message */ - if (!dev->isoc_ctl.num_bufs) + if (!num_bufs) return; - stk1160_dbg("killing urbs...\n"); + stk1160_dbg("killing %d urbs...\n", num_bufs); - for (i = 0; i < dev->isoc_ctl.num_bufs; i++) { + for (i = 0; i < num_bufs; i++) { /* * To kill urbs we can't be in atomic context. @@ -373,11 +373,11 @@ void stk1160_cancel_isoc(struct stk1160 *dev) void stk1160_free_isoc(struct stk1160 *dev) { struct urb *urb; - int i; + int i, num_bufs = dev->isoc_ctl.num_bufs; - stk1160_dbg("freeing urb buffers...\n"); + stk1160_dbg("freeing %d urb buffers...\n", num_bufs); - for (i = 0; i < dev->isoc_ctl.num_bufs; i++) { + for (i = 0; i < num_bufs; i++) { urb = dev->isoc_ctl.urb[i]; if (urb) {