lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c4829e63a48cee1678ee46ea864135569cb9e72c.camel@mellanox.com>
Date:   Tue, 23 Jul 2019 18:09:40 +0000
From:   Saeed Mahameed <saeedm@...lanox.com>
To:     "hslester96@...il.com" <hslester96@...il.com>
CC:     "davem@...emloft.net" <davem@...emloft.net>,
        "siva.kallam@...adcom.com" <siva.kallam@...adcom.com>,
        "prashant@...adcom.com" <prashant@...adcom.com>,
        "michael.chan@...adcom.com" <michael.chan@...adcom.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "GR-Linux-NIC-Dev@...vell.com" <GR-Linux-NIC-Dev@...vell.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "rmody@...vell.com" <rmody@...vell.com>
Subject: Re: [PATCH] net: broadcom: Use dev_get_drvdata

On Tue, 2019-07-23 at 21:19 +0800, Chuhong Yuan wrote:
> Instead of using to_pci_dev + pci_get_drvdata,
> use dev_get_drvdata to make code simpler.
> 

Hi Chuhong, i see that you have generated many stand alone patches that
belong to the same series/patchset.

A better way to do this is to generate one patchset that includes all
the patches and attach a cover letter for it:

$ git format-patch -s --cover-letter --subject-prefix="PATCH net-next"
-o ./patchset/ ${BASE_COMMIT}..${HEAD_COMMIT}

and resubmit with the edited cover-letter.

> Signed-off-by: Chuhong Yuan <hslester96@...il.com>
> ---
>  drivers/net/ethernet/broadcom/bnx2.c      | 6 ++----
>  drivers/net/ethernet/broadcom/bnxt/bnxt.c | 6 ++----
>  drivers/net/ethernet/broadcom/tg3.c       | 6 ++----
>  3 files changed, 6 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/net/ethernet/broadcom/bnx2.c
> b/drivers/net/ethernet/broadcom/bnx2.c
> index dfdd14eadd57..fbc196b480b6 100644
> --- a/drivers/net/ethernet/broadcom/bnx2.c
> +++ b/drivers/net/ethernet/broadcom/bnx2.c
> @@ -8673,8 +8673,7 @@ bnx2_remove_one(struct pci_dev *pdev)
>  static int
>  bnx2_suspend(struct device *device)
>  {
> -	struct pci_dev *pdev = to_pci_dev(device);
> -	struct net_device *dev = pci_get_drvdata(pdev);
> +	struct net_device *dev = dev_get_drvdata(device);
>  	struct bnx2 *bp = netdev_priv(dev);
>  
>  	if (netif_running(dev)) {
> @@ -8693,8 +8692,7 @@ bnx2_suspend(struct device *device)
>  static int
>  bnx2_resume(struct device *device)
>  {
> -	struct pci_dev *pdev = to_pci_dev(device);
> -	struct net_device *dev = pci_get_drvdata(pdev);
> +	struct net_device *dev = dev_get_drvdata(device);
>  	struct bnx2 *bp = netdev_priv(dev);
>  
>  	if (!netif_running(dev))
> diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> index 7134d2c3eb1c..1aad59b8a413 100644
> --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> @@ -10920,8 +10920,7 @@ static void bnxt_shutdown(struct pci_dev
> *pdev)
>  #ifdef CONFIG_PM_SLEEP
>  static int bnxt_suspend(struct device *device)
>  {
> -	struct pci_dev *pdev = to_pci_dev(device);
> -	struct net_device *dev = pci_get_drvdata(pdev);
> +	struct net_device *dev = dev_get_drvdata(device);
>  	struct bnxt *bp = netdev_priv(dev);
>  	int rc = 0;
>  
> @@ -10937,8 +10936,7 @@ static int bnxt_suspend(struct device
> *device)
>  
>  static int bnxt_resume(struct device *device)
>  {
> -	struct pci_dev *pdev = to_pci_dev(device);
> -	struct net_device *dev = pci_get_drvdata(pdev);
> +	struct net_device *dev = dev_get_drvdata(device);
>  	struct bnxt *bp = netdev_priv(dev);
>  	int rc = 0;
>  
> diff --git a/drivers/net/ethernet/broadcom/tg3.c
> b/drivers/net/ethernet/broadcom/tg3.c
> index 4c404d2213f9..77f3511b97de 100644
> --- a/drivers/net/ethernet/broadcom/tg3.c
> +++ b/drivers/net/ethernet/broadcom/tg3.c
> @@ -18041,8 +18041,7 @@ static void tg3_remove_one(struct pci_dev
> *pdev)
>  #ifdef CONFIG_PM_SLEEP
>  static int tg3_suspend(struct device *device)
>  {
> -	struct pci_dev *pdev = to_pci_dev(device);
> -	struct net_device *dev = pci_get_drvdata(pdev);
> +	struct net_device *dev = dev_get_drvdata(device);
>  	struct tg3 *tp = netdev_priv(dev);
>  	int err = 0;
>  
> @@ -18098,8 +18097,7 @@ static int tg3_suspend(struct device *device)
>  
>  static int tg3_resume(struct device *device)
>  {
> -	struct pci_dev *pdev = to_pci_dev(device);
> -	struct net_device *dev = pci_get_drvdata(pdev);
> +	struct net_device *dev = dev_get_drvdata(device);
>  	struct tg3 *tp = netdev_priv(dev);
>  	int err = 0;
>  

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ