All of lore.kernel.org
 help / color / mirror / Atom feed
From: Casey Leedom <leedom@chelsio.com>
To: Jingoo Han <jg1.han@samsung.com>
Cc: "'David S. Miller'" <davem@davemloft.net>, netdev@vger.kernel.org
Subject: Re: [PATCH 14/52] net: cxgb4vf: remove unnecessary pci_set_drvdata()
Date: Wed, 11 Sep 2013 10:24:16 -0700	[thread overview]
Message-ID: <5230A740.4020503@chelsio.com> (raw)
In-Reply-To: <005801ceaec1$6b8d3320$42a79960$%han@samsung.com>

   I agree that the redundant pci_set_drvdata(pdev, NULL) in 
cxgb4vf_pci_probe() under the err_release_regions: label is unneeded, 
but don't we need to NULL out the PCI Driver Data under the 
err_free_adapter: label and also in cxgb4vf_pci_remove()?  Or is that 
handled automatically in the PCI infrastructure code which calls the 
Device Probe and Remove routines?  Mostly I was just being an 
obsessively clean housewife assuming that we'd want to clean up these 
references ...

Casey

On 09/11/13 00:34, Jingoo Han wrote:
> The driver core clears the driver data to NULL after device_release
> or on probe failure. Thus, it is not needed to manually clear the
> device driver data to NULL.
>
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>
> ---
>   drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c |    3 ---
>   1 file changed, 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
> index 40c22e7..43bb012 100644
> --- a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
> +++ b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
> @@ -2782,11 +2782,9 @@ err_unmap_bar:
>   
>   err_free_adapter:
>   	kfree(adapter);
> -	pci_set_drvdata(pdev, NULL);
>   
>   err_release_regions:
>   	pci_release_regions(pdev);
> -	pci_set_drvdata(pdev, NULL);
>   	pci_clear_master(pdev);
>   
>   err_disable_device:
> @@ -2851,7 +2849,6 @@ static void cxgb4vf_pci_remove(struct pci_dev *pdev)
>   		}
>   		iounmap(adapter->regs);
>   		kfree(adapter);
> -		pci_set_drvdata(pdev, NULL);
>   	}
>   
>   	/*

  reply	other threads:[~2013-09-11 17:24 UTC|newest]

Thread overview: 72+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-11  7:19 [PATCH 00/52] net: ethernet: remove unnecessary pci_set_drvdata() Jingoo Han
2013-09-11  7:21 ` [PATCH 01/52] net: typhoon: " Jingoo Han
2013-09-11 22:18   ` David Dillow
2013-09-11  7:23 ` [PATCH 02/52] net: 8390: " Jingoo Han
2013-09-11  7:24 ` [PATCH 03/52] net: starfire: " Jingoo Han
2013-09-11  7:25 ` [PATCH 04/52] net: pcnet32: " Jingoo Han
2013-09-17  3:14   ` Don Fry
2013-09-11  7:26 ` [PATCH 05/52] net: amd8111e: " Jingoo Han
2013-09-11  7:27 ` [PATCH 06/52] net: alx: " Jingoo Han
2013-09-11  7:28 ` [PATCH 07/52] net: bnx2: " Jingoo Han
2013-09-11  7:29 ` [PATCH 08/52] net: bnx2x: " Jingoo Han
2013-09-11  7:30 ` [PATCH 09/52] net: tg3: " Jingoo Han
2013-09-11  7:31 ` [PATCH 10/52] net: bna: " Jingoo Han
2013-09-11  7:32 ` [PATCH 11/52] net: cxgb4: " Jingoo Han
2013-09-11  7:33 ` [PATCH 12/52] net: cxgb3: " Jingoo Han
2013-09-11  7:34 ` [PATCH 13/52] net: cxgb2: " Jingoo Han
2013-09-11  7:34 ` [PATCH 14/52] net: cxgb4vf: " Jingoo Han
2013-09-11 17:24   ` Casey Leedom [this message]
2013-09-12  1:19     ` Jingoo Han
2013-09-12 15:59       ` Casey Leedom
2013-09-11  7:36 ` [PATCH 15/52] net: enic: " Jingoo Han
2013-09-11  7:37 ` [PATCH 16/52] net: tulip: " Jingoo Han
2013-09-11  7:37 ` [PATCH 17/52] net: sundance: " Jingoo Han
2013-09-11  7:38 ` [PATCH 18/52] net: dl2k: " Jingoo Han
2013-09-11  7:39 ` [PATCH 19/52] net: be2net: " Jingoo Han
2013-09-11  7:40 ` [PATCH 20/52] net: fealnx: " Jingoo Han
2013-09-11 18:19   ` Sergei Shtylyov
2013-09-12  0:11     ` Jingoo Han
2013-09-12  5:24       ` David Miller
2013-09-12  5:49         ` Jingoo Han
2013-09-12  7:36           ` David Miller
2013-09-12  7:54             ` Jingoo Han
2013-09-12  8:19               ` David Miller
2013-09-12  8:40                 ` Jingoo Han
2013-09-12 13:16             ` Ben Hutchings
2013-09-12 17:11       ` Sergei Shtylyov
2013-09-12  5:57   ` [PATCH V2 " Jingoo Han
2013-09-11  7:41 ` [PATCH 21/52] net: icplus: " Jingoo Han
2013-09-11  7:45 ` [PATCH 22/52] net: e100: " Jingoo Han
2013-09-11  8:39   ` Jeff Kirsher
2013-09-11  8:52     ` Jingoo Han
2013-09-11  7:46 ` [PATCH 23/52] net: jme: " Jingoo Han
2013-09-11  7:48 ` [PATCH 24/52] net: skge: " Jingoo Han
2013-09-11  7:49 ` [PATCH 25/52] net: sky2: " Jingoo Han
2013-09-11  7:49 ` [PATCH 26/52] net: ksz884x: " Jingoo Han
2013-09-11  7:50 ` [PATCH 27/52] net: myri10ge: " Jingoo Han
2013-09-11  7:51 ` [PATCH 28/52] net: natsemi: " Jingoo Han
2013-09-11  7:52 ` [PATCH 29/52] net: neterion: " Jingoo Han
2013-09-11 18:05   ` Jon Mason
2013-09-11  7:53 ` [PATCH 30/52] net: packetengines: " Jingoo Han
2013-09-11  7:53 ` [PATCH 31/52] net: pasemi: " Jingoo Han
2013-09-11  7:55 ` [PATCH 32/52] net: netxen: " Jingoo Han
2013-09-11  7:56 ` [PATCH 33/52] net: qlge: " Jingoo Han
2013-09-11  7:57 ` [PATCH 34/52] net: qlcnic: " Jingoo Han
2013-09-11  7:58 ` [PATCH 35/52] net: qla3xxx: " Jingoo Han
2013-09-11  7:59 ` [PATCH 36/52] net: r6040: " Jingoo Han
2013-09-11  7:59 ` [PATCH 37/52] net: 8139cp: " Jingoo Han
2013-09-11  8:00 ` [PATCH 38/52] net: 8139too: " Jingoo Han
2013-09-11  8:01 ` [PATCH 39/52] net: r8169: " Jingoo Han
2013-09-11  8:02 ` [PATCH 40/52] net: sis190: " Jingoo Han
2013-09-11  8:02 ` [PATCH 41/52] net: epic100: " Jingoo Han
2013-09-11  8:03 ` [PATCH 42/52] net: smsc9420: " Jingoo Han
2013-09-11  8:05 ` [PATCH 43/52] net: stmmac: " Jingoo Han
2013-09-11  8:06 ` [PATCH 44/52] net: sunhme: " Jingoo Han
2013-09-11  8:07 ` [PATCH 45/52] net: cassini: " Jingoo Han
2013-09-11  8:07 ` [PATCH 46/52] net: sungem: " Jingoo Han
2013-09-11  8:08 ` [PATCH 47/52] net: niu: " Jingoo Han
2013-09-11  8:08 ` [PATCH 48/52] net: tehuti: " Jingoo Han
2013-09-11  8:09 ` [PATCH 49/52] net: tlan: " Jingoo Han
2013-09-11  8:10 ` [PATCH 50/52] net: spider_net: " Jingoo Han
2013-09-11  8:10 ` [PATCH 51/52] net: tc35815: " Jingoo Han
2013-09-11  8:11 ` [PATCH 52/52] net: via-rhine: " Jingoo Han

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=5230A740.4020503@chelsio.com \
    --to=leedom@chelsio.com \
    --cc=davem@davemloft.net \
    --cc=jg1.han@samsung.com \
    --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 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.