All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] net: neterion: use for_each_pci_dev to simplify the code
@ 2012-12-04  5:05 Wei Yongjun
  2012-12-04 18:20 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2012-12-04  5:05 UTC (permalink / raw)
  To: jdmason, davem; +Cc: yongjun_wei, netdev

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Use for_each_pci_dev to simplify the code.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 drivers/net/ethernet/neterion/s2io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/neterion/s2io.c b/drivers/net/ethernet/neterion/s2io.c
index c98decb..3b63504 100644
--- a/drivers/net/ethernet/neterion/s2io.c
+++ b/drivers/net/ethernet/neterion/s2io.c
@@ -1040,7 +1040,7 @@ static int s2io_verify_pci_mode(struct s2io_nic *nic)
 static int s2io_on_nec_bridge(struct pci_dev *s2io_pdev)
 {
 	struct pci_dev *tdev = NULL;
-	while ((tdev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, tdev)) != NULL) {
+	for_each_pci_dev(tdev) {
 		if (tdev->vendor == NEC_VENID && tdev->device == NEC_DEVID) {
 			if (tdev->bus == s2io_pdev->bus->parent) {
 				pci_dev_put(tdev);

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH -next] net: neterion: use for_each_pci_dev to simplify the code
  2012-12-04  5:05 [PATCH -next] net: neterion: use for_each_pci_dev to simplify the code Wei Yongjun
@ 2012-12-04 18:20 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2012-12-04 18:20 UTC (permalink / raw)
  To: weiyj.lk; +Cc: jdmason, yongjun_wei, netdev

From: Wei Yongjun <weiyj.lk@gmail.com>
Date: Tue, 4 Dec 2012 00:05:13 -0500

> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> Use for_each_pci_dev to simplify the code.
> 
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-12-04 18:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-04  5:05 [PATCH -next] net: neterion: use for_each_pci_dev to simplify the code Wei Yongjun
2012-12-04 18:20 ` David Miller

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.