public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jaco Kroon <jaco@kroon.co.za>
To: Pedram M <pmessri@gmail.com>
Cc: kernel-janitors@lists.osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [KJ] my first janitorial
Date: Sun, 01 Apr 2007 08:16:21 +0200	[thread overview]
Message-ID: <460F4E35.10109@kroon.co.za> (raw)
In-Reply-To: <9c9aa5d00703312224t1948b24bhe34199f19cbda4fb@mail.gmail.com>

Pedram M wrote:
> How about this one? Am I doing it right now?
> If not, please try to explain more to me what I am
> doing wrong.

You need a changelog entry (or explanation of what you're doing). You 
need a signed-off-by line and your patch needs to apply to the root of 
the kernel tree with -p1, something like:

-------------
Replace deprecated pci_find_device call with pci_get_device.

Signed-Off-By: Pedram M <pmessri@gmail.com>

--- linux-2.6.20.3.orig/path/to/file.c     2006-06-24 09:41:08.000000000 
+0200
+++ linux-2.6.20.3/path/to/file.c       2006-07-15 21:01:57.000000000 +0200
@@ -4760,7 +4760,7 @@
  	for (i = 0; i < NR_CARDS; i++) {
  		/* look for a Cyclades card by vendor and device id */
  		while ((device_id = cy_pci_dev_id[dev_index]) != 0) {
-			if ((pdev = pci_find_device(PCI_VENDOR_ID_CYCLADES,
+			if ((pdev = pci_get_device(PCI_VENDOR_ID_CYCLADES,
  						   device_id, pdev)) == NULL) {
  				dev_index++;	/* try next device id */
  			} else {
-------------

And your subject needs to please include the string "[PATCH]", something 
like:  [PATCH] path/to/file.c: pci_find_device cleanup

However, as pointed out, the code itself is incorrect, for every 
pci_get_device there also needs to be a call to pci_put_device in order 
to maintain reference counts.

Your client does not seem to be clobbering the patch itself and 
maintains tabs and line wrapping (unlike my client).

Jaco

  reply	other threads:[~2007-04-01  6:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <9c9aa5d00703310639q68fa5d19k4d8e3bfb56b1fa6@mail.gmail.com>
2007-04-01  5:24 ` my first janitorial Pedram M
2007-04-01  6:16   ` Jaco Kroon [this message]
2007-04-01  6:17   ` Willy Tarreau
2007-04-01 19:04     ` Jan Engelhardt
2007-04-01 16:00   ` Alan Cox
2007-04-01 18:28     ` Jiri Slaby

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=460F4E35.10109@kroon.co.za \
    --to=jaco@kroon.co.za \
    --cc=kernel-janitors@lists.osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmessri@gmail.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