* [PATCH net-next] netdevice hdlc: Convert directly reference of netdev->priv
@ 2008-11-21 9:02 Wang Chen
2008-11-22 0:12 ` Krzysztof Halasa
2008-11-22 0:34 ` David Miller
0 siblings, 2 replies; 5+ messages in thread
From: Wang Chen @ 2008-11-21 9:02 UTC (permalink / raw)
To: David S. Miller, Jeff Garzik, Krzysztof Halasa, NETDEV
Krzysztof said that he will take this one, but not.
I sent this to Dave again. :)
For killing directly reference of netdev->priv, use netdev->ml_priv to replace it.
Because the private pvc data comes from add_pvc() and can't be allocated in
alloc_netdev().
Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Acked-by: Krzysztof Halasa <khc@pm.waw.pl>
---
drivers/net/wan/hdlc_fr.c | 10 +++++-----
include/linux/hdlc.h | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wan/hdlc_fr.c b/drivers/net/wan/hdlc_fr.c
index d3d5055..f1ddd7c 100644
--- a/drivers/net/wan/hdlc_fr.c
+++ b/drivers/net/wan/hdlc_fr.c
@@ -342,7 +342,7 @@ static int fr_hard_header(struct sk_buff **skb_p, u16 dlci)
static int pvc_open(struct net_device *dev)
{
- pvc_device *pvc = dev->priv;
+ pvc_device *pvc = dev->ml_priv;
if ((pvc->frad->flags & IFF_UP) == 0)
return -EIO; /* Frad must be UP in order to activate PVC */
@@ -362,7 +362,7 @@ static int pvc_open(struct net_device *dev)
static int pvc_close(struct net_device *dev)
{
- pvc_device *pvc = dev->priv;
+ pvc_device *pvc = dev->ml_priv;
if (--pvc->open_count == 0) {
hdlc_device *hdlc = dev_to_hdlc(pvc->frad);
@@ -381,7 +381,7 @@ static int pvc_close(struct net_device *dev)
static int pvc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
{
- pvc_device *pvc = dev->priv;
+ pvc_device *pvc = dev->ml_priv;
fr_proto_pvc_info info;
if (ifr->ifr_settings.type == IF_GET_PROTO) {
@@ -409,7 +409,7 @@ static int pvc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
static int pvc_xmit(struct sk_buff *skb, struct net_device *dev)
{
- pvc_device *pvc = dev->priv;
+ pvc_device *pvc = dev->ml_priv;
if (pvc->state.active) {
if (dev->type == ARPHRD_ETHER) {
@@ -1111,7 +1111,7 @@ static int fr_add_pvc(struct net_device *frad, unsigned int dlci, int type)
dev->change_mtu = pvc_change_mtu;
dev->mtu = HDLC_MAX_MTU;
dev->tx_queue_len = 0;
- dev->priv = pvc;
+ dev->ml_priv = pvc;
result = dev_alloc_name(dev, dev->name);
if (result < 0) {
diff --git a/include/linux/hdlc.h b/include/linux/hdlc.h
index c597696..e960faa 100644
--- a/include/linux/hdlc.h
+++ b/include/linux/hdlc.h
@@ -80,7 +80,7 @@ struct net_device *alloc_hdlcdev(void *priv);
static inline struct hdlc_device* dev_to_hdlc(struct net_device *dev)
{
- return dev->priv;
+ return netdev_priv(dev);
}
static __inline__ void debug_frame(const struct sk_buff *skb)
--
1.5.3.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] netdevice hdlc: Convert directly reference of netdev->priv
2008-11-21 9:02 [PATCH net-next] netdevice hdlc: Convert directly reference of netdev->priv Wang Chen
@ 2008-11-22 0:12 ` Krzysztof Halasa
2008-11-22 11:08 ` Wang Chen
2008-11-22 0:34 ` David Miller
1 sibling, 1 reply; 5+ messages in thread
From: Krzysztof Halasa @ 2008-11-22 0:12 UTC (permalink / raw)
To: Wang Chen; +Cc: David S. Miller, Jeff Garzik, NETDEV
Wang Chen <wangchen@cn.fujitsu.com> writes:
> Krzysztof said that he will take this one, but not.
Actually I did. Not yet made it upstream, right :-(
--
Krzysztof Halasa
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] netdevice hdlc: Convert directly reference of netdev->priv
2008-11-21 9:02 [PATCH net-next] netdevice hdlc: Convert directly reference of netdev->priv Wang Chen
2008-11-22 0:12 ` Krzysztof Halasa
@ 2008-11-22 0:34 ` David Miller
1 sibling, 0 replies; 5+ messages in thread
From: David Miller @ 2008-11-22 0:34 UTC (permalink / raw)
To: wangchen; +Cc: jgarzik, khc, netdev
From: Wang Chen <wangchen@cn.fujitsu.com>
Date: Fri, 21 Nov 2008 17:02:49 +0800
> Krzysztof said that he will take this one, but not.
> I sent this to Dave again. :)
>
> For killing directly reference of netdev->priv, use netdev->ml_priv to replace it.
> Because the private pvc data comes from add_pvc() and can't be allocated in
> alloc_netdev().
>
> Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
> Acked-by: Krzysztof Halasa <khc@pm.waw.pl>
Applied.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] netdevice hdlc: Convert directly reference of netdev->priv
2008-11-22 0:12 ` Krzysztof Halasa
@ 2008-11-22 11:08 ` Wang Chen
2008-11-22 21:55 ` Krzysztof Halasa
0 siblings, 1 reply; 5+ messages in thread
From: Wang Chen @ 2008-11-22 11:08 UTC (permalink / raw)
To: Krzysztof Halasa; +Cc: David S. Miller, Jeff Garzik, NETDEV
Krzysztof Halasa said the following on 2008-11-22 8:12:
> Wang Chen <wangchen@cn.fujitsu.com> writes:
>
>> Krzysztof said that he will take this one, but not.
>
> Actually I did. Not yet made it upstream, right :-(
Ooh. I am too impatience to wait you do it ;)
Any way, thank you, Krzysztof.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] netdevice hdlc: Convert directly reference of netdev->priv
2008-11-22 11:08 ` Wang Chen
@ 2008-11-22 21:55 ` Krzysztof Halasa
0 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Halasa @ 2008-11-22 21:55 UTC (permalink / raw)
To: Wang Chen; +Cc: NETDEV
Wang Chen <wangchen@cn.fujitsu.com> writes:
> Any way, thank you, Krzysztof.
Really, thank YOU for your work.
--
Krzysztof Halasa
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-11-22 21:55 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-21 9:02 [PATCH net-next] netdevice hdlc: Convert directly reference of netdev->priv Wang Chen
2008-11-22 0:12 ` Krzysztof Halasa
2008-11-22 11:08 ` Wang Chen
2008-11-22 21:55 ` Krzysztof Halasa
2008-11-22 0:34 ` 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).