From: Jiri Slaby <jirislaby@gmail.com>
To: Rolf Eike Beer <eike-kernel@sf-tec.de>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
rth@twiddle.net, dhowells@redhat.com, kumar.gala@freescale.com,
davem@davemloft.net, mhw@wittsend.com,
Rogier Wolff <R.E.Wolff@bitwizard.nl>,
nils@kernelconcepts.de, Lionel.Bouton@inet6.fr,
benh@kernel.crashing.org, mchehab@brturbo.com.br, laredo@gnu.org,
rbultje@ronald.bitfreak.net, middelin@polyware.nl, philb@gnu.org,
tim@cyberelk.net, campbell@torque.net, andrea@suse.de,
mulix@mulix.org
Subject: Re: [PATCH] pci_find_device --> pci_get_device
Date: Wed, 20 Jul 2005 14:05:23 +0200 [thread overview]
Message-ID: <42DE3E03.1070401@gmail.com> (raw)
In-Reply-To: <200507201319.42050@bilbo.math.uni-mannheim.de>
Rolf Eike Beer napsal(a):
>Am Mittwoch, 20. Juli 2005 12:40 schrieb Jiri Slaby:
>
>
>>Rolf Eike Beer napsal(a):
>>
>>
>>>Your patch to arch/sparc64/kernel/ebus.c is broken, the removed and added
>>>parts do not match in behaviour.
>>>
>>>
>>I can't still see the difference.
>>
>>
>
>diff --git a/arch/sparc64/kernel/ebus.c b/arch/sparc64/kernel/ebus.c
>--- a/arch/sparc64/kernel/ebus.c
>+++ b/arch/sparc64/kernel/ebus.c
>@@ -527,8 +527,15 @@ static struct pci_dev *find_next_ebus(st
> {
> struct pci_dev *pdev = start;
>
>- do {
>- pdev = pci_find_device(PCI_VENDOR_ID_SUN, PCI_ANY_ID, pdev);
>+ while (pdev = pci_get_device(PCI_VENDOR_ID_SUN, PCI_ANY_ID, pdev))
>+ if (pdev->device == PCI_DEVICE_ID_SUN_EBUS ||
>+ pdev->device == PCI_DEVICE_ID_SUN_RIO_EBUS)
>+ break;
>+
>+ *is_rio_p = !!(pdev && (pdev->device == PCI_DEVICE_ID_SUN_RIO_EBUS));
>+
>+/* do { // BEFORE \/ AFTER ^
>+ * pdev = pci_find_device(PCI_VENDOR_ID_SUN, PCI_ANY_ID, pdev);
> if (pdev &&
> (pdev->device == PCI_DEVICE_ID_SUN_EBUS ||
> pdev->device == PCI_DEVICE_ID_SUN_RIO_EBUS))
>
>
The code was:
do {
pdev = pci_find_device(PCI_VENDOR_ID_SUN, PCI_ANY_ID, pdev);
if (pdev &&
(pdev->device == PCI_DEVICE_ID_SUN_EBUS ||
pdev->device == PCI_DEVICE_ID_SUN_RIO_EBUS))
break;
} while (pdev != NULL);
if (pdev && (pdev->device == PCI_DEVICE_ID_SUN_RIO_EBUS))
*is_rio_p = 1;
else
*is_rio_p = 0;
and I changed to:
while (pdev = pci_get_device(PCI_VENDOR_ID_SUN, PCI_ANY_ID, pdev))
if (pdev->device == PCI_DEVICE_ID_SUN_EBUS ||
pdev->device == PCI_DEVICE_ID_SUN_RIO_EBUS)
break;
*is_rio_p = !!(pdev && (pdev->device == PCI_DEVICE_ID_SUN_RIO_EBUS));
Is there any difference? I don't see any, but... The reading of diff
file in this case is not the best, maybe...
--
Jiri Slaby www.fi.muni.cz/~xslaby
~\-/~ jirislaby@gmail.com ~\-/~
241B347EC88228DE51EE A49C4A73A25004CB2A10
next prev parent reply other threads:[~2005-07-20 12:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-19 0:25 [PATCH] pci_find_device --> pci_get_device Jiri Slaby
2005-07-19 4:36 ` Rogier Wolff
2005-07-19 10:53 ` Jiri Slaby
2005-07-19 11:15 ` Rogier Wolff
2005-07-19 11:27 ` Rolf Eike Beer
2005-07-19 15:44 ` Jiri Slaby
2005-07-19 16:20 ` Rolf Eike Beer
2005-07-20 10:40 ` Jiri Slaby
2005-07-20 11:19 ` Rolf Eike Beer
2005-07-20 12:05 ` Jiri Slaby [this message]
2005-07-20 13:56 ` Rolf Eike Beer
2005-07-20 14:40 ` 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=42DE3E03.1070401@gmail.com \
--to=jirislaby@gmail.com \
--cc=Lionel.Bouton@inet6.fr \
--cc=R.E.Wolff@bitwizard.nl \
--cc=andrea@suse.de \
--cc=benh@kernel.crashing.org \
--cc=campbell@torque.net \
--cc=davem@davemloft.net \
--cc=dhowells@redhat.com \
--cc=eike-kernel@sf-tec.de \
--cc=kumar.gala@freescale.com \
--cc=laredo@gnu.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@brturbo.com.br \
--cc=mhw@wittsend.com \
--cc=middelin@polyware.nl \
--cc=mulix@mulix.org \
--cc=nils@kernelconcepts.de \
--cc=philb@gnu.org \
--cc=rbultje@ronald.bitfreak.net \
--cc=rth@twiddle.net \
--cc=tim@cyberelk.net \
/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