mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 14:04:27 -04:00
s390/ipl: Improve readability
Use explicit decleration on all shutdown_action/shutdown_trigger declerations and reformat shutdown_actions_list decleration to improve readability. No functional changes. Signed-off-by: Mete Durlu <meted@linux.ibm.com> Acked-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
This commit is contained in:
committed by
Vasily Gorbik
parent
654e97c9d7
commit
bc5d0909ee
@@ -2021,8 +2021,11 @@ static int vmcmd_init(void)
|
||||
return sysfs_create_group(&vmcmd_kset->kobj, &vmcmd_attr_group);
|
||||
}
|
||||
|
||||
static struct shutdown_action vmcmd_action = {SHUTDOWN_ACTION_VMCMD_STR,
|
||||
vmcmd_run, vmcmd_init};
|
||||
static struct shutdown_action vmcmd_action = {
|
||||
.name = SHUTDOWN_ACTION_VMCMD_STR,
|
||||
.fn = vmcmd_run,
|
||||
.init = vmcmd_init
|
||||
};
|
||||
|
||||
/*
|
||||
* stop shutdown action: Stop Linux on shutdown.
|
||||
@@ -2036,14 +2039,21 @@ static void stop_run(struct shutdown_trigger *trigger)
|
||||
smp_stop_cpu();
|
||||
}
|
||||
|
||||
static struct shutdown_action stop_action = {SHUTDOWN_ACTION_STOP_STR,
|
||||
stop_run, NULL};
|
||||
static struct shutdown_action stop_action = {
|
||||
.name = SHUTDOWN_ACTION_STOP_STR,
|
||||
.fn = stop_run
|
||||
};
|
||||
|
||||
/* action list */
|
||||
|
||||
static struct shutdown_action *shutdown_actions_list[] = {
|
||||
&ipl_action, &reipl_action, &dump_reipl_action, &dump_action,
|
||||
&vmcmd_action, &stop_action};
|
||||
&ipl_action,
|
||||
&reipl_action,
|
||||
&dump_reipl_action,
|
||||
&dump_action,
|
||||
&vmcmd_action,
|
||||
&stop_action
|
||||
};
|
||||
|
||||
/*
|
||||
* Trigger section
|
||||
@@ -2071,8 +2081,10 @@ static int set_trigger(const char *buf, struct shutdown_trigger *trigger,
|
||||
|
||||
/* on reipl */
|
||||
|
||||
static struct shutdown_trigger on_reboot_trigger = {ON_REIPL_STR,
|
||||
&reipl_action};
|
||||
static struct shutdown_trigger on_reboot_trigger = {
|
||||
.name = ON_REIPL_STR,
|
||||
.action = &reipl_action
|
||||
};
|
||||
|
||||
static ssize_t on_reboot_show(struct kobject *kobj,
|
||||
struct kobj_attribute *attr, char *page)
|
||||
@@ -2097,8 +2109,10 @@ static void do_machine_restart(char *__unused)
|
||||
void (*_machine_restart)(char *command) = do_machine_restart;
|
||||
|
||||
/* on panic */
|
||||
|
||||
static struct shutdown_trigger on_panic_trigger = {ON_PANIC_STR, &stop_action};
|
||||
static struct shutdown_trigger on_panic_trigger = {
|
||||
.name = ON_PANIC_STR,
|
||||
.action = &stop_action
|
||||
};
|
||||
|
||||
static ssize_t on_panic_show(struct kobject *kobj,
|
||||
struct kobj_attribute *attr, char *page)
|
||||
@@ -2122,9 +2136,10 @@ static void do_panic(void)
|
||||
}
|
||||
|
||||
/* on restart */
|
||||
|
||||
static struct shutdown_trigger on_restart_trigger = {ON_RESTART_STR,
|
||||
&stop_action};
|
||||
static struct shutdown_trigger on_restart_trigger = {
|
||||
.name = ON_RESTART_STR,
|
||||
.action = &stop_action
|
||||
};
|
||||
|
||||
static ssize_t on_restart_show(struct kobject *kobj,
|
||||
struct kobj_attribute *attr, char *page)
|
||||
@@ -2159,8 +2174,10 @@ void do_restart(void *arg)
|
||||
}
|
||||
|
||||
/* on halt */
|
||||
|
||||
static struct shutdown_trigger on_halt_trigger = {ON_HALT_STR, &stop_action};
|
||||
static struct shutdown_trigger on_halt_trigger = {
|
||||
.name = ON_HALT_STR,
|
||||
.action = &stop_action
|
||||
};
|
||||
|
||||
static ssize_t on_halt_show(struct kobject *kobj,
|
||||
struct kobj_attribute *attr, char *page)
|
||||
@@ -2185,8 +2202,10 @@ static void do_machine_halt(void)
|
||||
void (*_machine_halt)(void) = do_machine_halt;
|
||||
|
||||
/* on power off */
|
||||
|
||||
static struct shutdown_trigger on_poff_trigger = {ON_POFF_STR, &stop_action};
|
||||
static struct shutdown_trigger on_poff_trigger = {
|
||||
.name = ON_POFF_STR,
|
||||
.action = &stop_action
|
||||
};
|
||||
|
||||
static ssize_t on_poff_show(struct kobject *kobj,
|
||||
struct kobj_attribute *attr, char *page)
|
||||
|
||||
Reference in New Issue
Block a user