diff mbox

[1/4] stk1160: Make kill/free urb debug message more verbose

Message ID 1345425826-13429-1-git-send-email-elezegarcia@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ezequiel Garcia Aug. 20, 2012, 1:23 a.m. UTC
This is just a cleaning patch to produce more useful
debug messages.

Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
---
 drivers/media/usb/stk1160/stk1160-video.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

Comments

Ezequiel Garcia Sept. 23, 2012, 10:25 p.m. UTC | #1
Mauro,

On Sun, Aug 19, 2012 at 10:23 PM, Ezequiel Garcia <elezegarcia@gmail.com> wrote:
> This is just a cleaning patch to produce more useful
> debug messages.
>
> Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
> ---
>  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) {
> --
> 1.7.8.6
>

Please don't forget these patches for your v3.7 pull request.
Unless you don't want to add them yet.

Thanks,
Ezequiel.
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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) {