netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wei Yongjun <yjwei@cn.fujitsu.com>
To: Jianjun Kong <jianjun@zeuux.org>
Cc: David Miller <davem@davemloft.net>, netdev@vger.kernel.org
Subject: Re: [PATCH] net: Kill directly reference of netdev->priv
Date: Tue, 09 Dec 2008 10:53:22 +0800	[thread overview]
Message-ID: <493DDDA2.9080100@cn.fujitsu.com> (raw)
In-Reply-To: <20081209013241.GA15483@ubuntu>

Jianjun Kong wrote:
> another new patch for net-next-2.6
> ---
>
> >From fbd6be20695810f32aa58a5cd889f959d87a019f Mon Sep 17 00:00:00 2001
> From: Jianjun Kong <jianjun@zeuux.org>
> Date: Tue, 9 Dec 2008 09:23:54 +0800
> Subject: [PATCH] net: Kill directly reference of netdev->priv
>
> drivers/net/wireless/ray_cs.c:
> Replace "(struct net_device *)link->priv" with "netdev_priv((struct net_device *)link)"
>   

You had tested this patch? Do you think your patch is correct? Stop do 
stupid things like this. This only make youself unbelievable.

> Signed-off-by: Jianjun Kong <jianjun@zeuux.org>
> ---
>  drivers/net/wireless/ray_cs.c |   12 ++++++------
>  1 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c
> index 81b71f0..828aa47 100644
> --- a/drivers/net/wireless/ray_cs.c
> +++ b/drivers/net/wireless/ray_cs.c
> @@ -412,7 +412,7 @@ static int ray_config(struct pcmcia_device *link)
>      int i;
>      win_req_t req;
>      memreq_t mem;
> -    struct net_device *dev = (struct net_device *)link->priv;
> +    struct net_device *dev = netdev_priv((struct net_device *)link);
>      ray_dev_t *local = netdev_priv(dev);
>  
>      DEBUG(1, "ray_config(0x%p)\n", link);
> @@ -784,7 +784,7 @@ static void join_net(u_long data)
>  =============================================================================*/
>  static void ray_release(struct pcmcia_device *link)
>  {
> -    struct net_device *dev = link->priv; 
> +    struct net_device *dev = netdev_priv((struct net_device *)link);
>      ray_dev_t *local = netdev_priv(dev);
>      int i;
>      
> @@ -807,7 +807,7 @@ static void ray_release(struct pcmcia_device *link)
>  
>  static int ray_suspend(struct pcmcia_device *link)
>  {
> -	struct net_device *dev = link->priv;
> +	struct net_device *dev = netdev_priv((struct net_device *)link);
>  
>  	if (link->open)
>  		netif_device_detach(dev);
> @@ -817,7 +817,7 @@ static int ray_suspend(struct pcmcia_device *link)
>  
>  static int ray_resume(struct pcmcia_device *link)
>  {
> -	struct net_device *dev = link->priv;
> +	struct net_device *dev = netdev_priv((struct net_device *)link);
>  
>  	if (link->open) {
>  		ray_reset(dev);
> @@ -2505,7 +2505,7 @@ static void associate(ray_dev_t *local)
>  {
>      struct ccs __iomem *pccs;
>      struct pcmcia_device *link = local->finder;
> -    struct net_device *dev = link->priv;
> +    struct net_device *dev = netdev_priv((struct net_device *)link);
>      int ccsindex;
>      if (!(pcmcia_dev_present(link))) {
>          DEBUG(2,"ray_cs associate - device not present\n");
> @@ -2597,7 +2597,7 @@ static int ray_cs_proc_show(struct seq_file *m, void *v)
>      link = this_device;
>      if (!link)
>      	return 0;
> -    dev = (struct net_device *)link->priv;
> +    dev = netdev_priv((struct net_device *)link);
>      if (!dev)
>      	return 0;
>      local = netdev_priv(dev);
>   


  reply	other threads:[~2008-12-09  2:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-08 14:53 [PATCH] net: Kill directly reference of netdev->priv Jianjun Kong
2008-12-08 20:27 ` David Miller
2008-12-09  1:32   ` Jianjun Kong
2008-12-09  2:53     ` Wei Yongjun [this message]
2008-12-09  7:34     ` David Miller

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=493DDDA2.9080100@cn.fujitsu.com \
    --to=yjwei@cn.fujitsu.com \
    --cc=davem@davemloft.net \
    --cc=jianjun@zeuux.org \
    --cc=netdev@vger.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 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).