mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-11-20 16:46:23 +08:00
ipvs: Initialize schedulers' struct list_head at compile time
No need to do it at runtime and this saves a couple of bytes in the text section. Signed-off-by: Sven Wegener <sven.wegener@stealer.net> Acked-by: Simon Horman <horms@verge.net.au>
This commit is contained in:
parent
66a0be4720
commit
d149ccc9cf
@ -233,6 +233,7 @@ static struct ip_vs_scheduler ip_vs_dh_scheduler =
|
||||
.name = "dh",
|
||||
.refcnt = ATOMIC_INIT(0),
|
||||
.module = THIS_MODULE,
|
||||
.n_list = LIST_HEAD_INIT(ip_vs_dh_scheduler.n_list),
|
||||
.init_service = ip_vs_dh_init_svc,
|
||||
.done_service = ip_vs_dh_done_svc,
|
||||
.update_service = ip_vs_dh_update_svc,
|
||||
@ -242,7 +243,6 @@ static struct ip_vs_scheduler ip_vs_dh_scheduler =
|
||||
|
||||
static int __init ip_vs_dh_init(void)
|
||||
{
|
||||
INIT_LIST_HEAD(&ip_vs_dh_scheduler.n_list);
|
||||
return register_ip_vs_scheduler(&ip_vs_dh_scheduler);
|
||||
}
|
||||
|
||||
|
@ -539,6 +539,7 @@ static struct ip_vs_scheduler ip_vs_lblc_scheduler =
|
||||
.name = "lblc",
|
||||
.refcnt = ATOMIC_INIT(0),
|
||||
.module = THIS_MODULE,
|
||||
.n_list = LIST_HEAD_INIT(ip_vs_lblc_scheduler.n_list),
|
||||
.init_service = ip_vs_lblc_init_svc,
|
||||
.done_service = ip_vs_lblc_done_svc,
|
||||
.update_service = ip_vs_lblc_update_svc,
|
||||
@ -550,7 +551,6 @@ static int __init ip_vs_lblc_init(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
INIT_LIST_HEAD(&ip_vs_lblc_scheduler.n_list);
|
||||
sysctl_header = register_sysctl_paths(net_vs_ctl_path, vs_vars_table);
|
||||
ret = register_ip_vs_scheduler(&ip_vs_lblc_scheduler);
|
||||
if (ret)
|
||||
|
@ -728,6 +728,7 @@ static struct ip_vs_scheduler ip_vs_lblcr_scheduler =
|
||||
.name = "lblcr",
|
||||
.refcnt = ATOMIC_INIT(0),
|
||||
.module = THIS_MODULE,
|
||||
.n_list = LIST_HEAD_INIT(ip_vs_lblcr_scheduler.n_list),
|
||||
.init_service = ip_vs_lblcr_init_svc,
|
||||
.done_service = ip_vs_lblcr_done_svc,
|
||||
.update_service = ip_vs_lblcr_update_svc,
|
||||
@ -739,7 +740,6 @@ static int __init ip_vs_lblcr_init(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
INIT_LIST_HEAD(&ip_vs_lblcr_scheduler.n_list);
|
||||
sysctl_header = register_sysctl_paths(net_vs_ctl_path, vs_vars_table);
|
||||
ret = register_ip_vs_scheduler(&ip_vs_lblcr_scheduler);
|
||||
if (ret)
|
||||
|
@ -98,6 +98,7 @@ static struct ip_vs_scheduler ip_vs_lc_scheduler = {
|
||||
.name = "lc",
|
||||
.refcnt = ATOMIC_INIT(0),
|
||||
.module = THIS_MODULE,
|
||||
.n_list = LIST_HEAD_INIT(ip_vs_lc_scheduler.n_list),
|
||||
.init_service = ip_vs_lc_init_svc,
|
||||
.done_service = ip_vs_lc_done_svc,
|
||||
.update_service = ip_vs_lc_update_svc,
|
||||
@ -107,7 +108,6 @@ static struct ip_vs_scheduler ip_vs_lc_scheduler = {
|
||||
|
||||
static int __init ip_vs_lc_init(void)
|
||||
{
|
||||
INIT_LIST_HEAD(&ip_vs_lc_scheduler.n_list);
|
||||
return register_ip_vs_scheduler(&ip_vs_lc_scheduler) ;
|
||||
}
|
||||
|
||||
|
@ -136,6 +136,7 @@ static struct ip_vs_scheduler ip_vs_nq_scheduler =
|
||||
.name = "nq",
|
||||
.refcnt = ATOMIC_INIT(0),
|
||||
.module = THIS_MODULE,
|
||||
.n_list = LIST_HEAD_INIT(ip_vs_nq_scheduler.n_list),
|
||||
.init_service = ip_vs_nq_init_svc,
|
||||
.done_service = ip_vs_nq_done_svc,
|
||||
.update_service = ip_vs_nq_update_svc,
|
||||
@ -145,7 +146,6 @@ static struct ip_vs_scheduler ip_vs_nq_scheduler =
|
||||
|
||||
static int __init ip_vs_nq_init(void)
|
||||
{
|
||||
INIT_LIST_HEAD(&ip_vs_nq_scheduler.n_list);
|
||||
return register_ip_vs_scheduler(&ip_vs_nq_scheduler);
|
||||
}
|
||||
|
||||
|
@ -94,6 +94,7 @@ static struct ip_vs_scheduler ip_vs_rr_scheduler = {
|
||||
.name = "rr", /* name */
|
||||
.refcnt = ATOMIC_INIT(0),
|
||||
.module = THIS_MODULE,
|
||||
.n_list = LIST_HEAD_INIT(ip_vs_rr_scheduler.n_list),
|
||||
.init_service = ip_vs_rr_init_svc,
|
||||
.done_service = ip_vs_rr_done_svc,
|
||||
.update_service = ip_vs_rr_update_svc,
|
||||
@ -102,7 +103,6 @@ static struct ip_vs_scheduler ip_vs_rr_scheduler = {
|
||||
|
||||
static int __init ip_vs_rr_init(void)
|
||||
{
|
||||
INIT_LIST_HEAD(&ip_vs_rr_scheduler.n_list);
|
||||
return register_ip_vs_scheduler(&ip_vs_rr_scheduler);
|
||||
}
|
||||
|
||||
|
@ -138,6 +138,7 @@ static struct ip_vs_scheduler ip_vs_sed_scheduler =
|
||||
.name = "sed",
|
||||
.refcnt = ATOMIC_INIT(0),
|
||||
.module = THIS_MODULE,
|
||||
.n_list = LIST_HEAD_INIT(ip_vs_sed_scheduler.n_list),
|
||||
.init_service = ip_vs_sed_init_svc,
|
||||
.done_service = ip_vs_sed_done_svc,
|
||||
.update_service = ip_vs_sed_update_svc,
|
||||
@ -147,7 +148,6 @@ static struct ip_vs_scheduler ip_vs_sed_scheduler =
|
||||
|
||||
static int __init ip_vs_sed_init(void)
|
||||
{
|
||||
INIT_LIST_HEAD(&ip_vs_sed_scheduler.n_list);
|
||||
return register_ip_vs_scheduler(&ip_vs_sed_scheduler);
|
||||
}
|
||||
|
||||
|
@ -230,6 +230,7 @@ static struct ip_vs_scheduler ip_vs_sh_scheduler =
|
||||
.name = "sh",
|
||||
.refcnt = ATOMIC_INIT(0),
|
||||
.module = THIS_MODULE,
|
||||
.n_list = LIST_HEAD_INIT(ip_vs_sh_scheduler.n_list),
|
||||
.init_service = ip_vs_sh_init_svc,
|
||||
.done_service = ip_vs_sh_done_svc,
|
||||
.update_service = ip_vs_sh_update_svc,
|
||||
@ -239,7 +240,6 @@ static struct ip_vs_scheduler ip_vs_sh_scheduler =
|
||||
|
||||
static int __init ip_vs_sh_init(void)
|
||||
{
|
||||
INIT_LIST_HEAD(&ip_vs_sh_scheduler.n_list);
|
||||
return register_ip_vs_scheduler(&ip_vs_sh_scheduler);
|
||||
}
|
||||
|
||||
|
@ -126,6 +126,7 @@ static struct ip_vs_scheduler ip_vs_wlc_scheduler =
|
||||
.name = "wlc",
|
||||
.refcnt = ATOMIC_INIT(0),
|
||||
.module = THIS_MODULE,
|
||||
.n_list = LIST_HEAD_INIT(ip_vs_wlc_scheduler.n_list),
|
||||
.init_service = ip_vs_wlc_init_svc,
|
||||
.done_service = ip_vs_wlc_done_svc,
|
||||
.update_service = ip_vs_wlc_update_svc,
|
||||
@ -135,7 +136,6 @@ static struct ip_vs_scheduler ip_vs_wlc_scheduler =
|
||||
|
||||
static int __init ip_vs_wlc_init(void)
|
||||
{
|
||||
INIT_LIST_HEAD(&ip_vs_wlc_scheduler.n_list);
|
||||
return register_ip_vs_scheduler(&ip_vs_wlc_scheduler);
|
||||
}
|
||||
|
||||
|
@ -212,6 +212,7 @@ static struct ip_vs_scheduler ip_vs_wrr_scheduler = {
|
||||
.name = "wrr",
|
||||
.refcnt = ATOMIC_INIT(0),
|
||||
.module = THIS_MODULE,
|
||||
.n_list = LIST_HEAD_INIT(ip_vs_wrr_scheduler.n_list),
|
||||
.init_service = ip_vs_wrr_init_svc,
|
||||
.done_service = ip_vs_wrr_done_svc,
|
||||
.update_service = ip_vs_wrr_update_svc,
|
||||
@ -220,7 +221,6 @@ static struct ip_vs_scheduler ip_vs_wrr_scheduler = {
|
||||
|
||||
static int __init ip_vs_wrr_init(void)
|
||||
{
|
||||
INIT_LIST_HEAD(&ip_vs_wrr_scheduler.n_list);
|
||||
return register_ip_vs_scheduler(&ip_vs_wrr_scheduler) ;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user