[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191101.101421.100734709965388023.davem@davemloft.net>
Date: Fri, 01 Nov 2019 10:14:21 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: irusskikh@...vell.com
Cc: netdev@...r.kernel.org, ndanilov@...vell.com
Subject: Re: [PATCH net-next 03/12] net: atlantic: refactoring pm logic
From: Igor Russkikh <irusskikh@...vell.com>
Date: Fri, 1 Nov 2019 12:17:16 +0000
> -static int aq_pci_suspend(struct pci_dev *pdev, pm_message_t pm_msg)
> +static int aq_suspend_common(struct device *dev, bool deep)
> {
> - struct aq_nic_s *self = pci_get_drvdata(pdev);
> + struct pci_dev *pdev = to_pci_dev(dev);
> + struct aq_nic_s *nic = pci_get_drvdata(pdev);
Reverse christmas-tree here please, you don't use pdev other than here
in the declarations so you can just go:
> + struct aq_nic_s *nic = pci_get_drvdata(to_pci_dev(dev));
> -static int aq_pci_resume(struct pci_dev *pdev)
> +static int atl_resume_common(struct device *dev, bool deep)
> {
> - struct aq_nic_s *self = pci_get_drvdata(pdev);
> - pm_message_t pm_msg = PMSG_RESTORE;
> + struct pci_dev *pdev = to_pci_dev(dev);
> + struct aq_nic_s *nic = pci_get_drvdata(pdev);
> + int ret;
Likewise.
Powered by blists - more mailing lists