Re: [PATCH 07/15] IB/srpt: Simplify channel state management

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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@xxxxxxxxxxx>
Cc: Christoph Hellwig <hch@xxxxxx>

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 <sagig@xxxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux