public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Carl Karsten <carl@personnelware.com>
To: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: video4linux-list@redhat.com
Subject: Re: [patch] vivi: registered as /dev/video%d
Date: Wed, 28 May 2008 17:03:22 -0500	[thread overview]
Message-ID: <483DD6AA.1070203@personnelware.com> (raw)
In-Reply-To: <20080528173755.594ea08b@gaivota>

Mauro Carvalho Chehab wrote:
> On Wed, 28 May 2008 15:15:35 -0500
> Carl Karsten <carl@personnelware.com> wrote:
> 
>> I posted a week ago and haven't heard anything.
> 
> I was on vacations last week.
> 
>>  How long should I wait before 
>> posting this? :)
> 
> There are a few issues on your patch:
> 
>> -		else
>> +            printk(KERN_INFO "%s: /dev/video%d unregistered.\n", MODULE_NAME,
>> dev->vfd->minor);
> 
> Your patch got word wrapped. So, it didn't apply.
> 
>> +        }
>> +		else {
> 
> CodingStyle is wrong. It should be:
> 	} else {
> 
> (at the same line)
> 
> Also, on some places, you used space, instead of tabs.
> 
> Please, check your patch with checkpatch.pl (or, inside Mercurial, make
> checkpatch) before sending it.
> 
> Also, be sure that your emailer won't add line breaks at the wrong places.
>>   	} else
>>   		printk(KERN_INFO "Video Technology Magazine Virtual Video "
>> -				 "Capture Board successfully loaded.\n");
>> +                 "Capture Board ver %u.%u.%u successfully loaded.\n",
>> +        (VIVI_VERSION >> 16) & 0xFF, (VIVI_VERSION >> 8) & 0xFF, VIVI_VERSION &
>> 0xFF);

Fixed what you mentioned, make checkpatch doesn't report anything now.  It was 
reporting "warning: line over 80 characters" so now that those are fixed maybe 
t-bird won't wrap them.

 >
 > The indentation is very weird here.


Either the original code was weird ("quoted strings" were lined up) or a side 
effect of me using 4 space tabs.

If it still looks odd, I'll be happy to adjust.

------------------------------------------------------
Patch 1:
diff -r 9d04bba82511 linux/drivers/media/video/vivi.c
--- a/linux/drivers/media/video/vivi.c	Wed May 14 23:14:04 2008 +0000
+++ b/linux/drivers/media/video/vivi.c	Wed May 28 16:51:51 2008 -0500
@@ -48,6 +48,8 @@
  #include <linux/freezer.h>
  #endif

+#define MODULE_NAME "vivi"
+
  /* Wake up at about 30 fps */
  #define WAKE_NUMERATOR 30
  #define WAKE_DENOMINATOR 1001
@@ -56,7 +58,7 @@
  #include "font.h"

  #define VIVI_MAJOR_VERSION 0
-#define VIVI_MINOR_VERSION 4
+#define VIVI_MINOR_VERSION 5
  #define VIVI_RELEASE 0
  #define VIVI_VERSION \
  	KERNEL_VERSION(VIVI_MAJOR_VERSION, VIVI_MINOR_VERSION, VIVI_RELEASE)
@@ -1086,10 +1088,15 @@ static int vivi_release(void)
  		list_del(list);
  		dev = list_entry(list, struct vivi_dev, vivi_devlist);

-		if (-1 != dev->vfd->minor)
+		if (-1 != dev->vfd->minor) {
  			video_unregister_device(dev->vfd);
-		else
+			printk(KERN_INFO "%s: /dev/video%d unregistered.\n",
+				MODULE_NAME, dev->vfd->minor);
+		} else {
  			video_device_release(dev->vfd);
+			printk(KERN_INFO "%s: /dev/video%d released.\n",
+				MODULE_NAME, dev->vfd->minor);
+		}

  		kfree(dev);
  	}
@@ -1202,6 +1209,8 @@ static int __init vivi_init(void)
  			video_nr++;

  		dev->vfd = vfd;
+		printk(KERN_INFO "%s: V4L2 device registered as /dev/video%d\n",
+			MODULE_NAME, vfd->minor);
  	}

  	if (ret < 0) {
@@ -1209,7 +1218,9 @@ static int __init vivi_init(void)
  		printk(KERN_INFO "Error %d while loading vivi driver\n", ret);
  	} else
  		printk(KERN_INFO "Video Technology Magazine Virtual Video "
-				 "Capture Board successfully loaded.\n");
+			"Capture Board ver %u.%u.%u successfully loaded.\n",
+			(VIVI_VERSION >> 16) & 0xFF, (VIVI_VERSION >> 8) & 0xFF,
+			VIVI_VERSION & 0xFF);
  	return ret;
  }

------------------------------------------------------
Signed-off-by: Carl Karsten  <carl@personnelware.com>

Carl K

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

  reply	other threads:[~2008-05-28 22:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-01  0:18 [patch] vivi: registered as /dev/video%d Carl Karsten
2008-03-02  6:34 ` Carl Karsten
2008-03-04 14:25 ` Mauro Carvalho Chehab
2008-05-28 20:15   ` Carl Karsten
2008-05-28 20:37     ` Mauro Carvalho Chehab
2008-05-28 22:03       ` Carl Karsten [this message]
2008-05-28 22:59         ` hermann pitton
     [not found]           ` <483DEB53.40604@personnelware.com>
     [not found]             ` <1212021382.5745.13.camel@pc10.localdom.local>
2008-05-31  3:59               ` Carl Karsten
2008-05-31  6:37               ` Carl Karsten
2008-06-01  4:38                 ` hermann pitton
2008-06-10  0:02               ` Carl Karsten

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=483DD6AA.1070203@personnelware.com \
    --to=carl@personnelware.com \
    --cc=mchehab@infradead.org \
    --cc=video4linux-list@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox