IB/srpt: Simplify channel state management
authorBart Van Assche <bart.vanassche@sandisk.com>
Thu, 11 Feb 2016 19:05:38 +0000 (11:05 -0800)
committerDoug Ledford <dledford@redhat.com>
Mon, 29 Feb 2016 22:12:35 +0000 (17:12 -0500)
commitf130c2205dba8f02372c794c6c4e6cc4906376f4
treeca3b7390ed3896ba3586aeb58b834057b5b7ae4b
parente1dd413ccff7a35c4d8b14781668ed27bae64823
IB/srpt: Simplify channel state management

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 <bart.vanassche@sandisk.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
Cc: Alex Estrin <alex.estrin@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/ulp/srpt/ib_srpt.c