* [PATCH v1 0/4] drivers/staging: use generic power management
@ 2020-06-29 8:28 Vaibhav Gupta
2020-06-29 8:28 ` [PATCH v1 1/4] qlge/qlge_main.c: use genric " Vaibhav Gupta
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Vaibhav Gupta @ 2020-06-29 8:28 UTC (permalink / raw)
To: Bjorn Helgaas, Bjorn Helgaas, bjorn, Vaibhav Gupta,
Manish Chopra, GR-Linux-NIC-Dev, Greg Kroah-Hartman
Cc: devel, Vaibhav Gupta, netdev, linux-kernel, skhan, linux-kernel-mentees
Linux Kernel Mentee: Remove Legacy Power Management.
The purpose of this patch series is to remove legacy power management callbacks
from amd ethernet drivers.
The callbacks performing suspend() and resume() operations are still calling
pci_save_state(), pci_set_power_state(), etc. and handling the power management
themselves, which is not recommended.
The conversion requires the removal of the those function calls and change the
callback definition accordingly and make use of dev_pm_ops structure.
All patches are compile-tested only.
Vaibhav Gupta (4):
qlge/qlge_main.c: use genric power management
staging/rtl8192e: use generic power management
rts5208/rtsx.c: use generic power management
vt6655/device_main.c: use generic power management
drivers/staging/qlge/qlge_main.c | 36 +++++---------------
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 5 +--
drivers/staging/rtl8192e/rtl8192e/rtl_pm.c | 26 ++++----------
drivers/staging/rtl8192e/rtl8192e/rtl_pm.h | 4 +--
drivers/staging/rts5208/rtsx.c | 30 +++++-----------
drivers/staging/vt6655/device_main.c | 25 ++++----------
6 files changed, 36 insertions(+), 90 deletions(-)
--
2.27.0
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v1 1/4] qlge/qlge_main.c: use genric power management
2020-06-29 8:28 [PATCH v1 0/4] drivers/staging: use generic power management Vaibhav Gupta
@ 2020-06-29 8:28 ` Vaibhav Gupta
2020-06-29 16:09 ` kernel test robot
2020-06-29 8:28 ` [PATCH v1 2/4] staging/rtl8192e: use generic " Vaibhav Gupta
` (2 subsequent siblings)
3 siblings, 1 reply; 9+ messages in thread
From: Vaibhav Gupta @ 2020-06-29 8:28 UTC (permalink / raw)
To: Bjorn Helgaas, Bjorn Helgaas, bjorn, Vaibhav Gupta,
Manish Chopra, GR-Linux-NIC-Dev, Greg Kroah-Hartman
Cc: devel, Vaibhav Gupta, netdev, linux-kernel, skhan, linux-kernel-mentees
Drivers should not use legacy power management as they have to manage power
states and related operations, for the device, themselves. This driver was
handling them with the help of PCI helper functions like
pci_save/restore_state(), pci_enable/disable_device(), etc.
With generic PM, all essentials will be handled by the PCI core. Driver
needs to do only device-specific operations.
The driver was also using pci_enable_wake(...,..., 0) to disable wake. Use
device_wakeup_disable() instead.
Compile-tested only.
Signed-off-by: Vaibhav Gupta <vaibhavgupta40@gmail.com>
---
drivers/staging/qlge/qlge_main.c | 36 ++++++++------------------------
1 file changed, 9 insertions(+), 27 deletions(-)
diff --git a/drivers/staging/qlge/qlge_main.c b/drivers/staging/qlge/qlge_main.c
index 402edaeffe12..b6f6f681c77b 100644
--- a/drivers/staging/qlge/qlge_main.c
+++ b/drivers/staging/qlge/qlge_main.c
@@ -4763,9 +4763,9 @@ static const struct pci_error_handlers qlge_err_handler = {
.resume = qlge_io_resume,
};
-static int qlge_suspend(struct pci_dev *pdev, pm_message_t state)
+static int __maybe_unused qlge_suspend(struct device *dev_d)
{
- struct net_device *ndev = pci_get_drvdata(pdev);
+ struct net_device *ndev = dev_get_drvdata(dev_d);
struct ql_adapter *qdev = netdev_priv(ndev);
int err;
@@ -4779,35 +4779,19 @@ static int qlge_suspend(struct pci_dev *pdev, pm_message_t state)
}
ql_wol(qdev);
- err = pci_save_state(pdev);
- if (err)
- return err;
-
- pci_disable_device(pdev);
-
- pci_set_power_state(pdev, pci_choose_state(pdev, state));
return 0;
}
-#ifdef CONFIG_PM
-static int qlge_resume(struct pci_dev *pdev)
+static int __maybe_unused qlge_resume(struct device *dev_d)
{
- struct net_device *ndev = pci_get_drvdata(pdev);
+ struct net_device *ndev = dev_get_drvdata(dev_d);
struct ql_adapter *qdev = netdev_priv(ndev);
int err;
- pci_set_power_state(pdev, PCI_D0);
- pci_restore_state(pdev);
- err = pci_enable_device(pdev);
- if (err) {
- netif_err(qdev, ifup, qdev->ndev, "Cannot enable PCI device from suspend\n");
- return err;
- }
pci_set_master(pdev);
- pci_enable_wake(pdev, PCI_D3hot, 0);
- pci_enable_wake(pdev, PCI_D3cold, 0);
+ device_wakeup_disable(dev_d);
if (netif_running(ndev)) {
err = ql_adapter_up(qdev);
@@ -4820,22 +4804,20 @@ static int qlge_resume(struct pci_dev *pdev)
return 0;
}
-#endif /* CONFIG_PM */
static void qlge_shutdown(struct pci_dev *pdev)
{
- qlge_suspend(pdev, PMSG_SUSPEND);
+ qlge_suspend(&pdev->dev);
}
+static SIMPLE_DEV_PM_OPS(qlge_pm_ops, qlge_suspend, qlge_resume);
+
static struct pci_driver qlge_driver = {
.name = DRV_NAME,
.id_table = qlge_pci_tbl,
.probe = qlge_probe,
.remove = qlge_remove,
-#ifdef CONFIG_PM
- .suspend = qlge_suspend,
- .resume = qlge_resume,
-#endif
+ .driver.pm = &qlge_pm_ops,
.shutdown = qlge_shutdown,
.err_handler = &qlge_err_handler
};
--
2.27.0
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v1 2/4] staging/rtl8192e: use generic power management
2020-06-29 8:28 [PATCH v1 0/4] drivers/staging: use generic power management Vaibhav Gupta
2020-06-29 8:28 ` [PATCH v1 1/4] qlge/qlge_main.c: use genric " Vaibhav Gupta
@ 2020-06-29 8:28 ` Vaibhav Gupta
2020-06-29 8:28 ` [PATCH v1 3/4] rts5208/rtsx.c: " Vaibhav Gupta
2020-06-29 8:28 ` [PATCH v1 4/4] vt6655/device_main.c: " Vaibhav Gupta
3 siblings, 0 replies; 9+ messages in thread
From: Vaibhav Gupta @ 2020-06-29 8:28 UTC (permalink / raw)
To: Bjorn Helgaas, Bjorn Helgaas, bjorn, Vaibhav Gupta,
Manish Chopra, GR-Linux-NIC-Dev, Greg Kroah-Hartman
Cc: devel, Vaibhav Gupta, netdev, linux-kernel, skhan, linux-kernel-mentees
The structure of working of PM hooks for source files is:
drivers/staging/rtl8192e/rtl8192e/rtl_pm.h : callbacks declared
drivers/staging/rtl8192e/rtl8192e/rtl_pm.c : callbacks defined
drivers/staging/rtl8192e/rtl8192e/rtl_core.c : callbacks used
Drivers should not use legacy power management as they have to manage power
states and related operations, for the device, themselves. This driver was
handling them with the help of PCI helper functions like
pci_save/restore_state(), pci_enable/disable_device(), etc.
With generic PM, all essentials will be handled by the PCI core. Driver
needs to do only device-specific operations.
The driver was also using pci_enable_wake(...,..., 0) to disable wake. Use
device_wakeup_disable() instead. Use device_set_wakeup_enable() where WOL
is decided by the value of a variable during runtime.
Compile-tested only.
Signed-off-by: Vaibhav Gupta <vaibhavgupta40@gmail.com>
---
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 5 ++--
drivers/staging/rtl8192e/rtl8192e/rtl_pm.c | 26 ++++++--------------
drivers/staging/rtl8192e/rtl8192e/rtl_pm.h | 4 +--
3 files changed, 12 insertions(+), 23 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index a7cd4de65b28..dbcb8d0d9707 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -63,13 +63,14 @@ static int _rtl92e_pci_probe(struct pci_dev *pdev,
static void _rtl92e_pci_disconnect(struct pci_dev *pdev);
static irqreturn_t _rtl92e_irq(int irq, void *netdev);
+static SIMPLE_DEV_PM_OPS(rtl92e_pm_ops, rtl92e_suspend, rtl92e_resume);
+
static struct pci_driver rtl8192_pci_driver = {
.name = DRV_NAME, /* Driver name */
.id_table = rtl8192_pci_id_tbl, /* PCI_ID table */
.probe = _rtl92e_pci_probe, /* probe fn */
.remove = _rtl92e_pci_disconnect, /* remove fn */
- .suspend = rtl92e_suspend, /* PM suspend fn */
- .resume = rtl92e_resume, /* PM resume fn */
+ .driver.pm = &rtl92e_pm_ops,
};
static short _rtl92e_is_tx_queue_empty(struct net_device *dev);
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_pm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_pm.c
index cd3e17b41d6f..5575186caebd 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_pm.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_pm.c
@@ -10,9 +10,9 @@
#include "rtl_pm.h"
-int rtl92e_suspend(struct pci_dev *pdev, pm_message_t state)
+int rtl92e_suspend(struct device *dev_d)
{
- struct net_device *dev = pci_get_drvdata(pdev);
+ struct net_device *dev = dev_get_drvdata(dev_d);
struct r8192_priv *priv = rtllib_priv(dev);
u32 ulRegRead;
@@ -46,40 +46,28 @@ int rtl92e_suspend(struct pci_dev *pdev, pm_message_t state)
out_pci_suspend:
netdev_info(dev, "WOL is %s\n", priv->rtllib->bSupportRemoteWakeUp ?
"Supported" : "Not supported");
- pci_save_state(pdev);
- pci_disable_device(pdev);
- pci_enable_wake(pdev, pci_choose_state(pdev, state),
- priv->rtllib->bSupportRemoteWakeUp ? 1 : 0);
- pci_set_power_state(pdev, pci_choose_state(pdev, state));
+ device_set_wakeup_enable(dev_d, priv->rtllib->bSupportRemoteWakeUp);
mdelay(20);
return 0;
}
-int rtl92e_resume(struct pci_dev *pdev)
+int rtl92e_resume(struct device *dev_d)
{
- struct net_device *dev = pci_get_drvdata(pdev);
+ struct pci_dev *pdev = to_pci_dev(dev_d);
+ struct net_device *dev = dev_get_drvdata(dev_d);
struct r8192_priv *priv = rtllib_priv(dev);
- int err;
u32 val;
netdev_info(dev, "================>r8192E resume call.\n");
- pci_set_power_state(pdev, PCI_D0);
-
- err = pci_enable_device(pdev);
- if (err) {
- netdev_err(dev, "pci_enable_device failed on resume\n");
- return err;
- }
- pci_restore_state(pdev);
pci_read_config_dword(pdev, 0x40, &val);
if ((val & 0x0000ff00) != 0)
pci_write_config_dword(pdev, 0x40, val & 0xffff00ff);
- pci_enable_wake(pdev, PCI_D0, 0);
+ device_wakeup_disable(dev_d);
if (priv->polling_timer_on == 0)
rtl92e_check_rfctrl_gpio_timer(&priv->gpio_polling_timer);
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_pm.h b/drivers/staging/rtl8192e/rtl8192e/rtl_pm.h
index e58f2bcdb1dd..fd8611495975 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_pm.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_pm.h
@@ -10,7 +10,7 @@
#include <linux/types.h>
#include <linux/pci.h>
-int rtl92e_suspend(struct pci_dev *dev, pm_message_t state);
-int rtl92e_resume(struct pci_dev *dev);
+int rtl92e_suspend(struct device *dev_d);
+int rtl92e_resume(struct device *dev_d);
#endif
--
2.27.0
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v1 3/4] rts5208/rtsx.c: use generic power management
2020-06-29 8:28 [PATCH v1 0/4] drivers/staging: use generic power management Vaibhav Gupta
2020-06-29 8:28 ` [PATCH v1 1/4] qlge/qlge_main.c: use genric " Vaibhav Gupta
2020-06-29 8:28 ` [PATCH v1 2/4] staging/rtl8192e: use generic " Vaibhav Gupta
@ 2020-06-29 8:28 ` Vaibhav Gupta
2020-06-29 8:28 ` [PATCH v1 4/4] vt6655/device_main.c: " Vaibhav Gupta
3 siblings, 0 replies; 9+ messages in thread
From: Vaibhav Gupta @ 2020-06-29 8:28 UTC (permalink / raw)
To: Bjorn Helgaas, Bjorn Helgaas, bjorn, Vaibhav Gupta,
Manish Chopra, GR-Linux-NIC-Dev, Greg Kroah-Hartman
Cc: devel, Vaibhav Gupta, netdev, linux-kernel, skhan, linux-kernel-mentees
Drivers should not use legacy power management as they have to manage power
states and related operations, for the device, themselves. This driver was
handling them with the help of PCI helper functions like
pci_save/restore_state(), pci_enable/disable_device(), etc.
With generic PM, all essentials will be handled by the PCI core. Driver
needs to do only device-specific operations.
The driver was also using pci_enable_wake(...,..., 0) to disable wake. Use
device_wakeup_disable() instead.
Compile-tested only.
Signed-off-by: Vaibhav Gupta <vaibhavgupta40@gmail.com>
---
drivers/staging/rts5208/rtsx.c | 30 ++++++++----------------------
1 file changed, 8 insertions(+), 22 deletions(-)
diff --git a/drivers/staging/rts5208/rtsx.c b/drivers/staging/rts5208/rtsx.c
index be0053c795b7..6ca90694db8b 100644
--- a/drivers/staging/rts5208/rtsx.c
+++ b/drivers/staging/rts5208/rtsx.c
@@ -258,12 +258,12 @@ static int rtsx_acquire_irq(struct rtsx_dev *dev)
return 0;
}
-#ifdef CONFIG_PM
/*
* power management
*/
-static int rtsx_suspend(struct pci_dev *pci, pm_message_t state)
+static int __maybe_unused rtsx_suspend(struct device *dev_d)
{
+ struct pci_dev *pci = to_pci_dev(dev_d);
struct rtsx_dev *dev = pci_get_drvdata(pci);
struct rtsx_chip *chip;
@@ -285,10 +285,7 @@ static int rtsx_suspend(struct pci_dev *pci, pm_message_t state)
if (chip->msi_en)
pci_disable_msi(pci);
- pci_save_state(pci);
- pci_enable_wake(pci, pci_choose_state(pci, state), 1);
- pci_disable_device(pci);
- pci_set_power_state(pci, pci_choose_state(pci, state));
+ device_wakeup_enable(dev_d);
/* unlock the device pointers */
mutex_unlock(&dev->dev_mutex);
@@ -296,8 +293,9 @@ static int rtsx_suspend(struct pci_dev *pci, pm_message_t state)
return 0;
}
-static int rtsx_resume(struct pci_dev *pci)
+static int __maybe_unused rtsx_resume(struct device *dev_d)
{
+ struct pci_dev *pci = to_pci_dev(dev_d);
struct rtsx_dev *dev = pci_get_drvdata(pci);
struct rtsx_chip *chip;
@@ -309,16 +307,6 @@ static int rtsx_resume(struct pci_dev *pci)
/* lock the device pointers */
mutex_lock(&dev->dev_mutex);
- pci_set_power_state(pci, PCI_D0);
- pci_restore_state(pci);
- if (pci_enable_device(pci) < 0) {
- dev_err(&dev->pci->dev,
- "%s: pci_enable_device failed, disabling device\n",
- CR_DRIVER_NAME);
- /* unlock the device pointers */
- mutex_unlock(&dev->dev_mutex);
- return -EIO;
- }
pci_set_master(pci);
if (chip->msi_en) {
@@ -340,7 +328,6 @@ static int rtsx_resume(struct pci_dev *pci)
return 0;
}
-#endif /* CONFIG_PM */
static void rtsx_shutdown(struct pci_dev *pci)
{
@@ -999,16 +986,15 @@ static const struct pci_device_id rtsx_ids[] = {
MODULE_DEVICE_TABLE(pci, rtsx_ids);
+static SIMPLE_DEV_PM_OPS(rtsx_pm_ops, rtsx_suspend, rtsx_resume);
+
/* pci_driver definition */
static struct pci_driver rtsx_driver = {
.name = CR_DRIVER_NAME,
.id_table = rtsx_ids,
.probe = rtsx_probe,
.remove = rtsx_remove,
-#ifdef CONFIG_PM
- .suspend = rtsx_suspend,
- .resume = rtsx_resume,
-#endif
+ .driver.pm = &rtsx_pm_ops,
.shutdown = rtsx_shutdown,
};
--
2.27.0
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v1 4/4] vt6655/device_main.c: use generic power management
2020-06-29 8:28 [PATCH v1 0/4] drivers/staging: use generic power management Vaibhav Gupta
` (2 preceding siblings ...)
2020-06-29 8:28 ` [PATCH v1 3/4] rts5208/rtsx.c: " Vaibhav Gupta
@ 2020-06-29 8:28 ` Vaibhav Gupta
3 siblings, 0 replies; 9+ messages in thread
From: Vaibhav Gupta @ 2020-06-29 8:28 UTC (permalink / raw)
To: Bjorn Helgaas, Bjorn Helgaas, bjorn, Vaibhav Gupta,
Manish Chopra, GR-Linux-NIC-Dev, Greg Kroah-Hartman
Cc: devel, Vaibhav Gupta, netdev, linux-kernel, skhan, linux-kernel-mentees
Drivers should not use legacy power management as they have to manage power
states and related operations, for the device, themselves. This driver was
handling them with the help of PCI helper functions like
pci_save/restore_state(), pci_enable/disable_device(), etc.
With generic PM, all essentials will be handled by the PCI core. Driver
needs to do only device-specific operations.
The driver was also using pci_enable_wake(...,..., 0) to disable wake. Use
device_wakeup_disable() instead.
Compile-tested only.
Signed-off-by: Vaibhav Gupta <vaibhavgupta40@gmail.com>
---
drivers/staging/vt6655/device_main.c | 25 +++++++------------------
1 file changed, 7 insertions(+), 18 deletions(-)
diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
index 41cbec4134b0..76de1fd568eb 100644
--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -1766,48 +1766,37 @@ vt6655_probe(struct pci_dev *pcid, const struct pci_device_id *ent)
/*------------------------------------------------------------------*/
-#ifdef CONFIG_PM
-static int vt6655_suspend(struct pci_dev *pcid, pm_message_t state)
+static int __maybe_unused vt6655_suspend(struct device *dev_d)
{
- struct vnt_private *priv = pci_get_drvdata(pcid);
+ struct vnt_private *priv = dev_get_drvdata(dev_d);
unsigned long flags;
spin_lock_irqsave(&priv->lock, flags);
- pci_save_state(pcid);
-
MACbShutdown(priv);
- pci_disable_device(pcid);
-
spin_unlock_irqrestore(&priv->lock, flags);
- pci_set_power_state(pcid, pci_choose_state(pcid, state));
-
return 0;
}
-static int vt6655_resume(struct pci_dev *pcid)
+static int __maybe_unused vt6655_resume(struct device *dev_d)
{
- pci_set_power_state(pcid, PCI_D0);
- pci_enable_wake(pcid, PCI_D0, 0);
- pci_restore_state(pcid);
+ device_wakeup_disable(dev_d);
return 0;
}
-#endif
MODULE_DEVICE_TABLE(pci, vt6655_pci_id_table);
+static SIMPLE_DEV_PM_OPS(vt6655_pm_ops, vt6655_suspend, vt6655_resume);
+
static struct pci_driver device_driver = {
.name = DEVICE_NAME,
.id_table = vt6655_pci_id_table,
.probe = vt6655_probe,
.remove = vt6655_remove,
-#ifdef CONFIG_PM
- .suspend = vt6655_suspend,
- .resume = vt6655_resume,
-#endif
+ .driver.pm = &vt6655_pm_ops,
};
module_pci_driver(device_driver);
--
2.27.0
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v1 1/4] qlge/qlge_main.c: use genric power management
2020-06-29 8:28 ` [PATCH v1 1/4] qlge/qlge_main.c: use genric " Vaibhav Gupta
@ 2020-06-29 16:09 ` kernel test robot
2020-06-29 17:06 ` Vaibhav Gupta
2020-06-29 17:31 ` Bjorn Helgaas
0 siblings, 2 replies; 9+ messages in thread
From: kernel test robot @ 2020-06-29 16:09 UTC (permalink / raw)
To: Vaibhav Gupta, Bjorn Helgaas, bjorn, Vaibhav Gupta,
Manish Chopra, GR-Linux-NIC-Dev, Greg Kroah-Hartman
Cc: devel, netdev, kbuild-all, linux-kernel, skhan
[-- Attachment #1: Type: text/plain, Size: 3757 bytes --]
Hi Vaibhav,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on staging/staging-testing]
[also build test ERROR on v5.8-rc3 next-20200629]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Vaibhav-Gupta/drivers-staging-use-generic-power-management/20200629-163141
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 347fa58ff5558075eec98725029c443c80ffbf4a
config: x86_64-rhel-7.6 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce (this is a W=1 build):
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
drivers/staging/qlge/qlge_main.c: In function 'qlge_resume':
>> drivers/staging/qlge/qlge_main.c:4793:17: error: 'pdev' undeclared (first use in this function); did you mean 'qdev'?
4793 | pci_set_master(pdev);
| ^~~~
| qdev
drivers/staging/qlge/qlge_main.c:4793:17: note: each undeclared identifier is reported only once for each function it appears in
vim +4793 drivers/staging/qlge/qlge_main.c
c4e84bde1d595d drivers/net/qlge/qlge_main.c Ron Mercer 2008-09-18 4786
1aed508211e137 drivers/staging/qlge/qlge_main.c Vaibhav Gupta 2020-06-29 4787 static int __maybe_unused qlge_resume(struct device *dev_d)
c4e84bde1d595d drivers/net/qlge/qlge_main.c Ron Mercer 2008-09-18 4788 {
1aed508211e137 drivers/staging/qlge/qlge_main.c Vaibhav Gupta 2020-06-29 4789 struct net_device *ndev = dev_get_drvdata(dev_d);
c4e84bde1d595d drivers/net/qlge/qlge_main.c Ron Mercer 2008-09-18 4790 struct ql_adapter *qdev = netdev_priv(ndev);
c4e84bde1d595d drivers/net/qlge/qlge_main.c Ron Mercer 2008-09-18 4791 int err;
c4e84bde1d595d drivers/net/qlge/qlge_main.c Ron Mercer 2008-09-18 4792
c4e84bde1d595d drivers/net/qlge/qlge_main.c Ron Mercer 2008-09-18 @4793 pci_set_master(pdev);
c4e84bde1d595d drivers/net/qlge/qlge_main.c Ron Mercer 2008-09-18 4794
1aed508211e137 drivers/staging/qlge/qlge_main.c Vaibhav Gupta 2020-06-29 4795 device_wakeup_disable(dev_d);
c4e84bde1d595d drivers/net/qlge/qlge_main.c Ron Mercer 2008-09-18 4796
c4e84bde1d595d drivers/net/qlge/qlge_main.c Ron Mercer 2008-09-18 4797 if (netif_running(ndev)) {
c4e84bde1d595d drivers/net/qlge/qlge_main.c Ron Mercer 2008-09-18 4798 err = ql_adapter_up(qdev);
c4e84bde1d595d drivers/net/qlge/qlge_main.c Ron Mercer 2008-09-18 4799 if (err)
c4e84bde1d595d drivers/net/qlge/qlge_main.c Ron Mercer 2008-09-18 4800 return err;
c4e84bde1d595d drivers/net/qlge/qlge_main.c Ron Mercer 2008-09-18 4801 }
c4e84bde1d595d drivers/net/qlge/qlge_main.c Ron Mercer 2008-09-18 4802
72046d84f0d6e3 drivers/net/qlge/qlge_main.c Breno Leitao 2010-07-01 4803 mod_timer(&qdev->timer, jiffies + (5 * HZ));
c4e84bde1d595d drivers/net/qlge/qlge_main.c Ron Mercer 2008-09-18 4804 netif_device_attach(ndev);
c4e84bde1d595d drivers/net/qlge/qlge_main.c Ron Mercer 2008-09-18 4805
c4e84bde1d595d drivers/net/qlge/qlge_main.c Ron Mercer 2008-09-18 4806 return 0;
c4e84bde1d595d drivers/net/qlge/qlge_main.c Ron Mercer 2008-09-18 4807 }
c4e84bde1d595d drivers/net/qlge/qlge_main.c Ron Mercer 2008-09-18 4808
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 49264 bytes --]
[-- Attachment #3: Type: text/plain, Size: 169 bytes --]
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v1 1/4] qlge/qlge_main.c: use genric power management
2020-06-29 16:09 ` kernel test robot
@ 2020-06-29 17:06 ` Vaibhav Gupta
2020-06-29 17:31 ` Bjorn Helgaas
1 sibling, 0 replies; 9+ messages in thread
From: Vaibhav Gupta @ 2020-06-29 17:06 UTC (permalink / raw)
To: kernel test robot
Cc: devel, GR-Linux-NIC-Dev, kbuild-all, Manish Chopra,
Vaibhav Gupta, Greg Kroah-Hartman, skhan,
Linux Kernel Mailing List, Bjorn Helgaas, netdev, bjorn
On Mon, 29 Jun 2020 at 21:39, kernel test robot <lkp@intel.com> wrote:
>
> Hi Vaibhav,
>
> Thank you for the patch! Yet something to improve:
>
> [auto build test ERROR on staging/staging-testing]
> [also build test ERROR on v5.8-rc3 next-20200629]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use as documented in
> https://git-scm.com/docs/git-format-patch]
>
> url: https://github.com/0day-ci/linux/commits/Vaibhav-Gupta/drivers-staging-use-generic-power-management/20200629-163141
> base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 347fa58ff5558075eec98725029c443c80ffbf4a
> config: x86_64-rhel-7.6 (attached as .config)
> compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
> reproduce (this is a W=1 build):
> # save the attached .config to linux build tree
> make W=1 ARCH=x86_64
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
> drivers/staging/qlge/qlge_main.c: In function 'qlge_resume':
> >> drivers/staging/qlge/qlge_main.c:4793:17: error: 'pdev' undeclared (first use in this function); did you mean 'qdev'?
> 4793 | pci_set_master(pdev);
> | ^~~~
> | qdev
> drivers/staging/qlge/qlge_main.c:4793:17: note: each undeclared identifier is reported only once for each function it appears in
>
> vim +4793 drivers/staging/qlge/qlge_main.c
>
> c4e84bde1d595d drivers/net/qlge/qlge_main.c Ron Mercer 2008-09-18 4786
> 1aed508211e137 drivers/staging/qlge/qlge_main.c Vaibhav Gupta 2020-06-29 4787 static int __maybe_unused qlge_resume(struct device *dev_d)
> c4e84bde1d595d drivers/net/qlge/qlge_main.c Ron Mercer 2008-09-18 4788 {
> 1aed508211e137 drivers/staging/qlge/qlge_main.c Vaibhav Gupta 2020-06-29 4789 struct net_device *ndev = dev_get_drvdata(dev_d);
> c4e84bde1d595d drivers/net/qlge/qlge_main.c Ron Mercer 2008-09-18 4790 struct ql_adapter *qdev = netdev_priv(ndev);
> c4e84bde1d595d drivers/net/qlge/qlge_main.c Ron Mercer 2008-09-18 4791 int err;
> c4e84bde1d595d drivers/net/qlge/qlge_main.c Ron Mercer 2008-09-18 4792
> c4e84bde1d595d drivers/net/qlge/qlge_main.c Ron Mercer 2008-09-18 @4793 pci_set_master(pdev);
> c4e84bde1d595d drivers/net/qlge/qlge_main.c Ron Mercer 2008-09-18 4794
> 1aed508211e137 drivers/staging/qlge/qlge_main.c Vaibhav Gupta 2020-06-29 4795 device_wakeup_disable(dev_d);
> c4e84bde1d595d drivers/net/qlge/qlge_main.c Ron Mercer 2008-09-18 4796
> c4e84bde1d595d drivers/net/qlge/qlge_main.c Ron Mercer 2008-09-18 4797 if (netif_running(ndev)) {
> c4e84bde1d595d drivers/net/qlge/qlge_main.c Ron Mercer 2008-09-18 4798 err = ql_adapter_up(qdev);
> c4e84bde1d595d drivers/net/qlge/qlge_main.c Ron Mercer 2008-09-18 4799 if (err)
> c4e84bde1d595d drivers/net/qlge/qlge_main.c Ron Mercer 2008-09-18 4800 return err;
> c4e84bde1d595d drivers/net/qlge/qlge_main.c Ron Mercer 2008-09-18 4801 }
> c4e84bde1d595d drivers/net/qlge/qlge_main.c Ron Mercer 2008-09-18 4802
> 72046d84f0d6e3 drivers/net/qlge/qlge_main.c Breno Leitao 2010-07-01 4803 mod_timer(&qdev->timer, jiffies + (5 * HZ));
> c4e84bde1d595d drivers/net/qlge/qlge_main.c Ron Mercer 2008-09-18 4804 netif_device_attach(ndev);
> c4e84bde1d595d drivers/net/qlge/qlge_main.c Ron Mercer 2008-09-18 4805
> c4e84bde1d595d drivers/net/qlge/qlge_main.c Ron Mercer 2008-09-18 4806 return 0;
> c4e84bde1d595d drivers/net/qlge/qlge_main.c Ron Mercer 2008-09-18 4807 }
> c4e84bde1d595d drivers/net/qlge/qlge_main.c Ron Mercer 2008-09-18 4808
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
This is a genuine error. I remember taking care of it when I upgraded
the driver.
Must have been caused by some unnoticed reverts at my side.
I will fix it and send a v2 patch-set. Thanks for reporting.
-- Vaibhav gupta
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v1 1/4] qlge/qlge_main.c: use genric power management
2020-06-29 16:09 ` kernel test robot
2020-06-29 17:06 ` Vaibhav Gupta
@ 2020-06-29 17:31 ` Bjorn Helgaas
2020-06-30 0:21 ` [kbuild-all] " Philip Li
1 sibling, 1 reply; 9+ messages in thread
From: Bjorn Helgaas @ 2020-06-29 17:31 UTC (permalink / raw)
To: kernel test robot
Cc: devel, GR-Linux-NIC-Dev, kbuild-all, Manish Chopra,
Vaibhav Gupta, Vaibhav Gupta, skhan, linux-kernel, netdev,
Greg Kroah-Hartman, bjorn
Vaibhav: s/genric/generic/ in the subject
On Tue, Jun 30, 2020 at 12:09:36AM +0800, kernel test robot wrote:
> Hi Vaibhav,
>
> Thank you for the patch! Yet something to improve:
>
> [auto build test ERROR on staging/staging-testing]
> [also build test ERROR on v5.8-rc3 next-20200629]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use as documented in
> https://git-scm.com/docs/git-format-patch]
>
> url: https://github.com/0day-ci/linux/commits/Vaibhav-Gupta/drivers-staging-use-generic-power-management/20200629-163141
> base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 347fa58ff5558075eec98725029c443c80ffbf4a
> config: x86_64-rhel-7.6 (attached as .config)
> compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
> reproduce (this is a W=1 build):
> # save the attached .config to linux build tree
> make W=1 ARCH=x86_64
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
If the patch has already been merged and we need an incremental patch
that fixes *only* the build issue, I think it's fine to add a
"Reported-by" tag.
But if this patch hasn't been merged anywhere, I think adding the
"Reported-by" tag would be pointless and distracting. This report
should result in a v2 posting of the patch with the build issue fixed.
There will be no evidence of the problem in the v2 patch. The patch
itself contains other changes unrelated to the build issue, so
"Reported-by" makes so sense for them. I would treat this as just
another review comment, and we don't usually credit those in the
commit log (though it's nice if they're mentioned in the v2 cover
letter so reviewers know what changed and why).
Is there any chance kbuild could be made smart enough to suggest the
tag only when it finds an issue in some list of published trees?
> All errors (new ones prefixed by >>):
>
> drivers/staging/qlge/qlge_main.c: In function 'qlge_resume':
> >> drivers/staging/qlge/qlge_main.c:4793:17: error: 'pdev' undeclared (first use in this function); did you mean 'qdev'?
> 4793 | pci_set_master(pdev);
> | ^~~~
> | qdev
> ...
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [kbuild-all] Re: [PATCH v1 1/4] qlge/qlge_main.c: use genric power management
2020-06-29 17:31 ` Bjorn Helgaas
@ 2020-06-30 0:21 ` Philip Li
0 siblings, 0 replies; 9+ messages in thread
From: Philip Li @ 2020-06-30 0:21 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: devel, GR-Linux-NIC-Dev, kbuild-all, Manish Chopra,
Vaibhav Gupta, Vaibhav Gupta, skhan, linux-kernel, netdev,
Greg Kroah-Hartman, bjorn
On Mon, Jun 29, 2020 at 12:31:16PM -0500, Bjorn Helgaas wrote:
> Vaibhav: s/genric/generic/ in the subject
>
> On Tue, Jun 30, 2020 at 12:09:36AM +0800, kernel test robot wrote:
> > Hi Vaibhav,
> >
> > Thank you for the patch! Yet something to improve:
> >
> > [auto build test ERROR on staging/staging-testing]
> > [also build test ERROR on v5.8-rc3 next-20200629]
> > [If your patch is applied to the wrong git tree, kindly drop us a note.
> > And when submitting patch, we suggest to use as documented in
> > https://git-scm.com/docs/git-format-patch]
> >
> > url: https://github.com/0day-ci/linux/commits/Vaibhav-Gupta/drivers-staging-use-generic-power-management/20200629-163141
> > base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 347fa58ff5558075eec98725029c443c80ffbf4a
> > config: x86_64-rhel-7.6 (attached as .config)
> > compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
> > reproduce (this is a W=1 build):
> > # save the attached .config to linux build tree
> > make W=1 ARCH=x86_64
> >
> > If you fix the issue, kindly add following tag as appropriate
> > Reported-by: kernel test robot <lkp@intel.com>
>
> If the patch has already been merged and we need an incremental patch
> that fixes *only* the build issue, I think it's fine to add a
> "Reported-by" tag.
>
> But if this patch hasn't been merged anywhere, I think adding the
> "Reported-by" tag would be pointless and distracting. This report
> should result in a v2 posting of the patch with the build issue fixed.
>
> There will be no evidence of the problem in the v2 patch. The patch
> itself contains other changes unrelated to the build issue, so
> "Reported-by" makes so sense for them. I would treat this as just
> another review comment, and we don't usually credit those in the
> commit log (though it's nice if they're mentioned in the v2 cover
> letter so reviewers know what changed and why).
>
> Is there any chance kbuild could be made smart enough to suggest the
> tag only when it finds an issue in some list of published trees?
Thanks a lot for the suggestion. As of now, this is a recommendation,
and user may judge based on own situation to add "as appropriate".
Meanwhile, we will continue making the bot better.
>
> > All errors (new ones prefixed by >>):
> >
> > drivers/staging/qlge/qlge_main.c: In function 'qlge_resume':
> > >> drivers/staging/qlge/qlge_main.c:4793:17: error: 'pdev' undeclared (first use in this function); did you mean 'qdev'?
> > 4793 | pci_set_master(pdev);
> > | ^~~~
> > | qdev
> > ...
> _______________________________________________
> kbuild-all mailing list -- kbuild-all@lists.01.org
> To unsubscribe send an email to kbuild-all-leave@lists.01.org
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2020-06-30 0:22 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-29 8:28 [PATCH v1 0/4] drivers/staging: use generic power management Vaibhav Gupta
2020-06-29 8:28 ` [PATCH v1 1/4] qlge/qlge_main.c: use genric " Vaibhav Gupta
2020-06-29 16:09 ` kernel test robot
2020-06-29 17:06 ` Vaibhav Gupta
2020-06-29 17:31 ` Bjorn Helgaas
2020-06-30 0:21 ` [kbuild-all] " Philip Li
2020-06-29 8:28 ` [PATCH v1 2/4] staging/rtl8192e: use generic " Vaibhav Gupta
2020-06-29 8:28 ` [PATCH v1 3/4] rts5208/rtsx.c: " Vaibhav Gupta
2020-06-29 8:28 ` [PATCH v1 4/4] vt6655/device_main.c: " Vaibhav Gupta
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).