netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/9] atm: solos-pci: use to_pci_dev()
@ 2015-12-27 10:45 Geliang Tang
       [not found] ` <baf4e17c993f197cc31f8a0e5736ee8a558ba44c.1451211133.git.geliangtang-9Onoh4P/yGk@public.gmane.org>
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Geliang Tang @ 2015-12-27 10:45 UTC (permalink / raw)
  To: Chas Williams; +Cc: Geliang Tang, linux-atm-general, netdev, linux-kernel

Use to_pci_dev() instead of open-coding it.

Signed-off-by: Geliang Tang <geliangtang@163.com>
---
 drivers/atm/solos-pci.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/atm/solos-pci.c b/drivers/atm/solos-pci.c
index 0c2b4ba0..6ac2b2b 100644
--- a/drivers/atm/solos-pci.c
+++ b/drivers/atm/solos-pci.c
@@ -525,7 +525,7 @@ struct geos_gpio_attr {
 static ssize_t geos_gpio_store(struct device *dev, struct device_attribute *attr,
 			       const char *buf, size_t count)
 {
-	struct pci_dev *pdev = container_of(dev, struct pci_dev, dev);
+	struct pci_dev *pdev = to_pci_dev(dev);
 	struct geos_gpio_attr *gattr = container_of(attr, struct geos_gpio_attr, attr);
 	struct solos_card *card = pci_get_drvdata(pdev);
 	uint32_t data32;
@@ -551,7 +551,7 @@ static ssize_t geos_gpio_store(struct device *dev, struct device_attribute *attr
 static ssize_t geos_gpio_show(struct device *dev, struct device_attribute *attr,
 			      char *buf)
 {
-	struct pci_dev *pdev = container_of(dev, struct pci_dev, dev);
+	struct pci_dev *pdev = to_pci_dev(dev);
 	struct geos_gpio_attr *gattr = container_of(attr, struct geos_gpio_attr, attr);
 	struct solos_card *card = pci_get_drvdata(pdev);
 	uint32_t data32;
@@ -565,7 +565,7 @@ static ssize_t geos_gpio_show(struct device *dev, struct device_attribute *attr,
 static ssize_t hardware_show(struct device *dev, struct device_attribute *attr,
 			     char *buf)
 {
-	struct pci_dev *pdev = container_of(dev, struct pci_dev, dev);
+	struct pci_dev *pdev = to_pci_dev(dev);
 	struct geos_gpio_attr *gattr = container_of(attr, struct geos_gpio_attr, attr);
 	struct solos_card *card = pci_get_drvdata(pdev);
 	uint32_t data32;
-- 
2.5.0

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

* [PATCH 5/9] ipw2x00: sdhci-pci: use to_pci_dev()
       [not found] ` <baf4e17c993f197cc31f8a0e5736ee8a558ba44c.1451211133.git.geliangtang-9Onoh4P/yGk@public.gmane.org>
@ 2015-12-27 10:46   ` Geliang Tang
       [not found]     ` <896b7d080610c5417a2f09a3bf9d0e20636fcc52.1451211133.git.geliangtang-9Onoh4P/yGk@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Geliang Tang @ 2015-12-27 10:46 UTC (permalink / raw)
  To: Stanislav Yakovlev, Kalle Valo
  Cc: Geliang Tang, linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

Use to_pci_dev() instead of open-coding it.

Signed-off-by: Geliang Tang <geliangtang-9Onoh4P/yGk@public.gmane.org>
---
 drivers/net/wireless/intel/ipw2x00/ipw2100.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2100.c b/drivers/net/wireless/intel/ipw2x00/ipw2100.c
index 36818c7..121294f 100644
--- a/drivers/net/wireless/intel/ipw2x00/ipw2100.c
+++ b/drivers/net/wireless/intel/ipw2x00/ipw2100.c
@@ -3514,7 +3514,7 @@ static void ipw2100_msg_free(struct ipw2100_priv *priv)
 static ssize_t show_pci(struct device *d, struct device_attribute *attr,
 			char *buf)
 {
-	struct pci_dev *pci_dev = container_of(d, struct pci_dev, dev);
+	struct pci_dev *pci_dev = to_pci_dev(d);
 	char *out = buf;
 	int i, j;
 	u32 val;
-- 
2.5.0


--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 6/9] ssb: use to_pci_dev()
  2015-12-27 10:45 [PATCH 1/9] atm: solos-pci: use to_pci_dev() Geliang Tang
       [not found] ` <baf4e17c993f197cc31f8a0e5736ee8a558ba44c.1451211133.git.geliangtang-9Onoh4P/yGk@public.gmane.org>
@ 2015-12-27 10:46 ` Geliang Tang
  2015-12-29 20:47 ` [PATCH 1/9] atm: solos-pci: " David Miller
  2 siblings, 0 replies; 5+ messages in thread
From: Geliang Tang @ 2015-12-27 10:46 UTC (permalink / raw)
  To: Michael Buesch; +Cc: Geliang Tang, netdev, linux-kernel

Use to_pci_dev() instead of open-coding it.

Signed-off-by: Geliang Tang <geliangtang@163.com>
---
 drivers/ssb/pci.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/ssb/pci.c b/drivers/ssb/pci.c
index 0f28c08..67428f4 100644
--- a/drivers/ssb/pci.c
+++ b/drivers/ssb/pci.c
@@ -1130,7 +1130,7 @@ static ssize_t ssb_pci_attr_sprom_show(struct device *pcidev,
 				       struct device_attribute *attr,
 				       char *buf)
 {
-	struct pci_dev *pdev = container_of(pcidev, struct pci_dev, dev);
+	struct pci_dev *pdev = to_pci_dev(pcidev);
 	struct ssb_bus *bus;
 
 	bus = ssb_pci_dev_to_bus(pdev);
@@ -1144,7 +1144,7 @@ static ssize_t ssb_pci_attr_sprom_store(struct device *pcidev,
 					struct device_attribute *attr,
 					const char *buf, size_t count)
 {
-	struct pci_dev *pdev = container_of(pcidev, struct pci_dev, dev);
+	struct pci_dev *pdev = to_pci_dev(pcidev);
 	struct ssb_bus *bus;
 
 	bus = ssb_pci_dev_to_bus(pdev);
-- 
2.5.0

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

* Re: [PATCH 1/9] atm: solos-pci: use to_pci_dev()
  2015-12-27 10:45 [PATCH 1/9] atm: solos-pci: use to_pci_dev() Geliang Tang
       [not found] ` <baf4e17c993f197cc31f8a0e5736ee8a558ba44c.1451211133.git.geliangtang-9Onoh4P/yGk@public.gmane.org>
  2015-12-27 10:46 ` [PATCH 6/9] ssb: " Geliang Tang
@ 2015-12-29 20:47 ` David Miller
  2 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2015-12-29 20:47 UTC (permalink / raw)
  To: geliangtang; +Cc: 3chas3, linux-atm-general, netdev, linux-kernel

From: Geliang Tang <geliangtang@163.com>
Date: Sun, 27 Dec 2015 18:45:57 +0800

> Use to_pci_dev() instead of open-coding it.
> 
> Signed-off-by: Geliang Tang <geliangtang@163.com>

Applied.

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

* Re: [PATCH 5/9] ipw2x00: sdhci-pci: use to_pci_dev()
       [not found]     ` <896b7d080610c5417a2f09a3bf9d0e20636fcc52.1451211133.git.geliangtang-9Onoh4P/yGk@public.gmane.org>
@ 2015-12-31  8:30       ` Kalle Valo
  0 siblings, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2015-12-31  8:30 UTC (permalink / raw)
  To: Geliang Tang
  Cc: Stanislav Yakovlev, linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

Geliang Tang <geliangtang-9Onoh4P/yGk@public.gmane.org> writes:

> Use to_pci_dev() instead of open-coding it.
>
> Signed-off-by: Geliang Tang <geliangtang-9Onoh4P/yGk@public.gmane.org>

The title is wrong, it should be just "ipw2x00: use to_pci_dev()".

And please state clearly to what tree you are planning to submit these.
I only saw this patch 5, not rest of the patches, so I have no clue
what's going to happen with this patchset. Please resend.

-- 
Kalle Valo
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2015-12-31  8:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-27 10:45 [PATCH 1/9] atm: solos-pci: use to_pci_dev() Geliang Tang
     [not found] ` <baf4e17c993f197cc31f8a0e5736ee8a558ba44c.1451211133.git.geliangtang-9Onoh4P/yGk@public.gmane.org>
2015-12-27 10:46   ` [PATCH 5/9] ipw2x00: sdhci-pci: " Geliang Tang
     [not found]     ` <896b7d080610c5417a2f09a3bf9d0e20636fcc52.1451211133.git.geliangtang-9Onoh4P/yGk@public.gmane.org>
2015-12-31  8:30       ` Kalle Valo
2015-12-27 10:46 ` [PATCH 6/9] ssb: " Geliang Tang
2015-12-29 20:47 ` [PATCH 1/9] atm: solos-pci: " David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).