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
| ||
|
Date: Mon, 14 Nov 2011 16:02:28 -0800 From: "Yu, Fenghua" <fenghua.yu@...el.com> To: "Srivatsa S. Bhat" <srivatsa.bhat@...ux.vnet.ibm.com> CC: Linus Torvalds <torvalds@...ux-foundation.org>, Ingo Molnar <mingo@...e.hu>, Rusty Russell <rusty@...tcorp.com.au>, "Rafael J. Wysocki" <rjw@...k.pl>, linux-kernel <linux-kernel@...r.kernel.org>, linux-pm <linux-pm@...r.kernel.org>, linux-next <linux-next@...r.kernel.org> Subject: RE: [PATCH] kernel/cpu.c: Add right qualifiers for intel_thermal_interrupt() and cpu_hotplug_pm_sync_init() > > -int cpu_hotplug_pm_sync_init(void) > > +static int __init cpu_hotplug_pm_sync_init(void) > > { > > pm_notifier(cpu_hotplug_pm_callback, 0); > > pm_notifier() macro will declare a static variable. I agree this won't > be any problem functionality-wise. But it doesn't seem elegant to say > "throw away the function but keep the static variable". > So, if you want to add __init qualifier to this function, I suggest > that > you declare the static variable outside the function, and call > register_pm_notifier() in the function, just to ensure it doesn't > obscure > things. > Rmoving __init cpu_hotplug_pm_sync_init() function after boot time and keep the static data defined in pm_notifier() is a normal behavior and normal usage in kernel. Same notifier registration usage function examples are ia64_mca_init() and msic_init() in mrst.c. There are quite a few other similar static data in __init functions usage examples in kernel source code. So I would keep the same code in the patch. I'll send an updated patch just to change the title typo. Thanks. -Fenghua -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists