mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Julia Lawall <julia@diku.dk>
To: paulus@samba.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] arch/ppc: Remove an unnecessary pci_dev_put.
Date: Sat, 3 Nov 2007 16:14:59 +0100 (CET)	[thread overview]
Message-ID: <Pine.LNX.4.64.0711031613020.7633@ask.diku.dk> (raw)

From: Julia Lawall <julia@diku.dk>

Remove an unnecessary pci_dev_put.  pci_dev_put is called implicitly by the
subsequent call to pci_get_device.

The problem was detected using the following semantic patch, and corrected
by hand.

@@
expression dev;
expression E;
@@

- pci_dev_put(dev)
   ... when != dev = E
- pci_get_device(...,dev)


Signed-off-by: Julia Lawall <julia@diku.dk>

---

diff -up a/arch/ppc/platforms/prep_pci.c b/arch/ppc/platforms/prep_pci.c
--- a/arch/ppc/platforms/prep_pci.c	2007-11-03 15:25:45.000000000 +0100
+++ b/arch/ppc/platforms/prep_pci.c	2007-11-03 15:25:59.000000000 +0100
@@ -1099,7 +1099,6 @@ prep_pib_init(void)
  				pci_write_config_byte(dev, 0x43, reg);
  			}
  		}
-		pci_dev_put(dev);
  	}

  	if ((dev = pci_get_device(PCI_VENDOR_ID_WINBOND,

                 reply	other threads:[~2007-11-03 15:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=Pine.LNX.4.64.0711031613020.7633@ask.diku.dk \
    --to=julia@diku.dk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulus@samba.org \
    /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

all inboxes | Powered by JetHome®