Skip to content
Commit 8a58cad2 authored by Kelley Nielsen's avatar Kelley Nielsen Committed by Greg Kroah-Hartman
Browse files

staging: ft1000: extract helper handle_misc_portid()



The function ft1000_poll, in ft1000_hw.c, is complex, with deep levels
of nesting, unnecessary variables, and style issues. Extract the default
case of the switch statement to its own function, handle_misc_portid.
Make the variable struct dpram_blk *pdpram_blk local to the new function
and remove it from the old. The variable struct pseudo_hdr *ppseudo_hdr is
used only once, to access a member of another struct, so eliminate it
and access the member directly. Return -1 in all the places where the
code fails, and 0 on successful completion. Fix coding style errors.

Signed-off-by: default avatarKelley Nielsen <kelleynnn@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6eca0c1f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment