Message ID | 9db185874262839da245536b5d7f85d70720fb0e.1496356891.git.priyalee.kushwaha@intel.com (mailing list archive) |
---|---|
State | Superseded, archived |
Delegated to: | Darren Hart |
Headers | show |
Hi Priyalee,
[auto build test ERROR on platform-drivers-x86/for-next]
[also build test ERROR on v4.12-rc3 next-20170531]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/priyalee-kushwaha-intel-com/intel_telemetry_debugfs-fix-oops-found-while-load-unload-module-test/20170601-083928
base: git://git.infradead.org/users/dvhart/linux-platform-drivers-x86.git for-next
config: x86_64-randconfig-h0-06011226 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All errors (new ones prefixed by >>):
drivers/platform/x86/intel_telemetry_debugfs.c: In function 'telemetry_debugfs_init':
>> drivers/platform/x86/intel_telemetry_debugfs.c:963:24: error: 'pm_notifier' undeclared (first use in this function)
register_pm_notifier(&pm_notifier);
^
drivers/platform/x86/intel_telemetry_debugfs.c:963:24: note: each undeclared identifier is reported only once for each function it appears in
drivers/platform/x86/intel_telemetry_debugfs.c: In function 'telemetry_debugfs_exit':
drivers/platform/x86/intel_telemetry_debugfs.c:1026:26: error: 'pm_notifier' undeclared (first use in this function)
unregister_pm_notifier(&pm_notifier);
^
vim +/pm_notifier +963 drivers/platform/x86/intel_telemetry_debugfs.c
87bee2909 Souvik Kumar Chakravarty 2016-01-12 957 return -ENODEV;
87bee2909 Souvik Kumar Chakravarty 2016-01-12 958
87bee2909 Souvik Kumar Chakravarty 2016-01-12 959 err = telemetry_debugfs_check_evts();
87bee2909 Souvik Kumar Chakravarty 2016-01-12 960 if (err < 0)
87bee2909 Souvik Kumar Chakravarty 2016-01-12 961 return -EINVAL;
87bee2909 Souvik Kumar Chakravarty 2016-01-12 962
87bee2909 Souvik Kumar Chakravarty 2016-01-12 @963 register_pm_notifier(&pm_notifier);
87bee2909 Souvik Kumar Chakravarty 2016-01-12 964
87bee2909 Souvik Kumar Chakravarty 2016-01-12 965 debugfs_conf->telemetry_dbg_dir = debugfs_create_dir("telemetry", NULL);
1e7e221ab Priyalee Kushwaha 2017-06-01 966 if (!debugfs_conf->telemetry_dbg_dir) {
:::::: The code at line 963 was first introduced by commit
:::::: 87bee290998d062937eecf40ad409480e7281b0e platform:x86: Add Intel Telemetry Debugfs interfaces
:::::: TO: Souvik Kumar Chakravarty <souvik.k.chakravarty@intel.com>
:::::: CC: Darren Hart <dvhart@linux.intel.com>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
diff --git a/drivers/platform/x86/intel_telemetry_debugfs.c b/drivers/platform/x86/intel_telemetry_debugfs.c index ef29f18..d20b6f7 100644 --- a/drivers/platform/x86/intel_telemetry_debugfs.c +++ b/drivers/platform/x86/intel_telemetry_debugfs.c @@ -960,14 +960,13 @@ static int __init telemetry_debugfs_init(void) if (err < 0) return -EINVAL; - -#ifdef CONFIG_PM_SLEEP register_pm_notifier(&pm_notifier); -#endif /* CONFIG_PM_SLEEP */ debugfs_conf->telemetry_dbg_dir = debugfs_create_dir("telemetry", NULL); - if (!debugfs_conf->telemetry_dbg_dir) - return -ENOMEM; + if (!debugfs_conf->telemetry_dbg_dir) { + err = -ENOMEM; + goto out_pm; + } f = debugfs_create_file("pss_info", S_IFREG | S_IRUGO, debugfs_conf->telemetry_dbg_dir, NULL, @@ -1014,6 +1013,8 @@ static int __init telemetry_debugfs_init(void) out: debugfs_remove_recursive(debugfs_conf->telemetry_dbg_dir); debugfs_conf->telemetry_dbg_dir = NULL; +out_pm: + unregister_pm_notifier(&pm_notifier); return err; } @@ -1022,6 +1023,7 @@ static void __exit telemetry_debugfs_exit(void) { debugfs_remove_recursive(debugfs_conf->telemetry_dbg_dir); debugfs_conf->telemetry_dbg_dir = NULL; + unregister_pm_notifier(&pm_notifier); } late_initcall(telemetry_debugfs_init);