Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e8824bab authored by Colin Ian King's avatar Colin Ian King Committed by Corey Minyard
Browse files

ipmi: use ARRAY_SIZE for poweroff_functions array sizing calculation



Use the ARRAY_SIZE macro on a array poweroff_functions to determine
size of the array. Improvement suggested by Coccinelle.

Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
parent 71404a2f
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -519,8 +519,7 @@ static struct poweroff_function poweroff_functions[] = {
	  .detect		= ipmi_chassis_detect,
	  .poweroff_func	= ipmi_poweroff_chassis },
};
#define NUM_PO_FUNCS (sizeof(poweroff_functions) \
		      / sizeof(struct poweroff_function))
#define NUM_PO_FUNCS ARRAY_SIZE(poweroff_functions)


/* Called on a powerdown request. */