> From: Xenia Ragiadakou
> Sent: Thursday, August 22, 2013 8:20 AM
> 
> This patch refactors the switch statement in handle_cmd_completion() by
> creating a separate function for each branch, named 'xhci_handle_cmd_<type>'.
> 
> Other changes introduced by this patch are:
> 
> - Renaming the already existed functions by adding the prefix
>   'xhci_handle_cmd_' for consistency. Also, for handle_stopped_endpoint()
>   the order of arguments was changed too, so that the prototype of
>   'xhci_handle_cmd_' be similar and easy to follow.
> - Additional local variables were added, such as cmd_trb, cmd_comp_code,
>   cmd_type, add_flags and drop_flags, and the label 'update_ring',
>   mainly to reduce code dublication and line length.
> - The variable ep_ring, that was assigned in the case TRB_CONFIG_EP
>   but never used, was removed.

Just a small suggestion, I think it would be better to name these functions
to indicate they handle completion events, instead of commands. So maybe
xhci_handle_stop_ep_complete, xhci_handle_set_deq_complete,
xhci_handle_reset_ep_complete etc?

Feel free to ignore me if you disagree :)

-- 
Paul

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to