Whamcloud - gitweb
LU-6142 lnet: code style cleanups, improve error handling
During submission of the dynamic LNet work to the upstream
client Dan Carpenter suggested several improvements and a
few fixes. They are:
1) Rename the goto labels to be more clear.
2) Replace CLASSERT with BUILD_BUG_ON
3) Rework the loops to reduce the code indentation level
and to make them more clear.
4) Add test to ensure the ioctl data is really smaller
than what is reported in the ioctl header.
5) Fix one off error in lnet_get_peer_info
6) Handle errors instead of sucesses in lnet_dyn_[un]configure
Change-Id: If003d313ae587fd6311d9dfb419e8c6f59ef4705
Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/18469
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Olaf Weber <olaf@sgi.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>