The only allowed channel state changes are those that change
the channel state into a state with a higher numerical value.
This allows to merge the functions srpt_set_ch_state() and
srpt_test_and_set_ch_state() into a single function.

Signed-off-by: Bart Van Assche <[email protected]>
Cc: Christoph Hellwig <[email protected]>

The patch looks correct to me, but IMO it would be better to
open-code state transitions instead of relying on the assumption of
a numerical relationship between states. This can save a potential
future bug if someone will add/change a state in the future, and it
is also more readable IMO.

Just a suggestion though, otherwise

Reviewed-by: Sagi Grimberg <[email protected]>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to