All of lore.kernel.org
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@amd64.org>
To: Kulikov Vasiliy <segooon@gmail.com>
Cc: Kernel Janitors <kernel-janitors@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	"x86@kernel.org" <x86@kernel.org>, Tejun Heo <tj@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 07/19] arch/x86/kernel: use for_each_pci_dev()
Date: Sun, 04 Jul 2010 07:51:10 +0000	[thread overview]
Message-ID: <20100704075110.GA5356@aftab> (raw)
In-Reply-To: <1278173040-11643-1-git-send-email-segooon@gmail.com>

From: Kulikov Vasiliy <segooon@gmail.com>
Date: Sat, Jul 03, 2010 at 12:03:59PM -0400

> Use for_each_pci_dev() to simplify the code.
> 
> Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>

Acked-by: Borislav Petkov <borislav.petkov@amd.com>

> ---
>  arch/x86/kernel/k8.c |    7 +++----
>  1 files changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/x86/kernel/k8.c b/arch/x86/kernel/k8.c
> index 0f7bc20..0ea4b35 100644
> --- a/arch/x86/kernel/k8.c
> +++ b/arch/x86/kernel/k8.c
> @@ -27,11 +27,10 @@ EXPORT_SYMBOL(k8_northbridges);
>  
>  static struct pci_dev *next_k8_northbridge(struct pci_dev *dev)
>  {
> -	do {
> -		dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev);
> -		if (!dev)
> +	for_each_pci_dev(dev) {
> +		if (pci_match_id(&k8_nb_ids[0], dev))
>  			break;
> -	} while (!pci_match_id(&k8_nb_ids[0], dev));
> +	}
>  	return dev;
>  }
>  
> -- 
> 1.7.0.4
> 
> 

-- 
Regards/Gruss,
Boris.

Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach
General Managers: Alberto Bozzo, Andrew Bowd
Registration: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632

WARNING: multiple messages have this Message-ID (diff)
From: Borislav Petkov <bp@amd64.org>
To: Kulikov Vasiliy <segooon@gmail.com>
Cc: Kernel Janitors <kernel-janitors@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	"x86@kernel.org" <x86@kernel.org>, Tejun Heo <tj@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 07/19] arch/x86/kernel: use for_each_pci_dev()
Date: Sun, 4 Jul 2010 09:51:10 +0200	[thread overview]
Message-ID: <20100704075110.GA5356@aftab> (raw)
In-Reply-To: <1278173040-11643-1-git-send-email-segooon@gmail.com>

From: Kulikov Vasiliy <segooon@gmail.com>
Date: Sat, Jul 03, 2010 at 12:03:59PM -0400

> Use for_each_pci_dev() to simplify the code.
> 
> Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>

Acked-by: Borislav Petkov <borislav.petkov@amd.com>

> ---
>  arch/x86/kernel/k8.c |    7 +++----
>  1 files changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/x86/kernel/k8.c b/arch/x86/kernel/k8.c
> index 0f7bc20..0ea4b35 100644
> --- a/arch/x86/kernel/k8.c
> +++ b/arch/x86/kernel/k8.c
> @@ -27,11 +27,10 @@ EXPORT_SYMBOL(k8_northbridges);
>  
>  static struct pci_dev *next_k8_northbridge(struct pci_dev *dev)
>  {
> -	do {
> -		dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev);
> -		if (!dev)
> +	for_each_pci_dev(dev) {
> +		if (pci_match_id(&k8_nb_ids[0], dev))
>  			break;
> -	} while (!pci_match_id(&k8_nb_ids[0], dev));
> +	}
>  	return dev;
>  }
>  
> -- 
> 1.7.0.4
> 
> 

-- 
Regards/Gruss,
Boris.

Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach
General Managers: Alberto Bozzo, Andrew Bowd
Registration: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632

  reply	other threads:[~2010-07-04  7:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-03 16:03 [PATCH 07/19] arch/x86/kernel: use for_each_pci_dev() Kulikov Vasiliy
2010-07-03 16:03 ` Kulikov Vasiliy
2010-07-04  7:51 ` Borislav Petkov [this message]
2010-07-04  7:51   ` Borislav Petkov

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=20100704075110.GA5356@aftab \
    --to=bp@amd64.org \
    --cc=hpa@zytor.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=segooon@gmail.com \
    --cc=tglx@linutronix.de \
    --cc=tj@kernel.org \
    --cc=x86@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.