Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ipmi:si: Move flags get start to its own function

It's about to be used from another place, and this looks better,
anyway.

Signed-off-by: Corey Minyard <corey@minyard.net>

+13 -6
+13 -6
drivers/char/ipmi/ipmi_si_intf.c
··· 313 313 314 314 static enum si_sm_result start_next_msg(struct smi_info *smi_info) 315 315 { 316 - int rv; 316 + int rv; 317 317 318 318 if (!smi_info->waiting_msg) { 319 319 smi_info->curr_msg = NULL; ··· 388 388 389 389 start_new_msg(smi_info, msg, 3); 390 390 smi_info->si_state = SI_CLEARING_FLAGS; 391 + } 392 + 393 + static void start_get_flags(struct smi_info *smi_info) 394 + { 395 + unsigned char msg[2]; 396 + 397 + msg[0] = (IPMI_NETFN_APP_REQUEST << 2); 398 + msg[1] = IPMI_GET_MSG_FLAGS_CMD; 399 + 400 + start_new_msg(smi_info, msg, 2); 401 + smi_info->si_state = SI_GETTING_FLAGS; 391 402 } 392 403 393 404 static void start_getting_msg_queue(struct smi_info *smi_info) ··· 828 817 * interrupts work with the SMI, that's not really 829 818 * possible. 830 819 */ 831 - msg[0] = (IPMI_NETFN_APP_REQUEST << 2); 832 - msg[1] = IPMI_GET_MSG_FLAGS_CMD; 833 - 834 - start_new_msg(smi_info, msg, 2); 835 - smi_info->si_state = SI_GETTING_FLAGS; 820 + start_get_flags(smi_info); 836 821 goto restart; 837 822 } 838 823 }