freebsd-nq/sys/dev/smartpqi
Warner Losh 30f8afd027 cam: fix xpt_bus_register and xpt_bus_deregister return errno
xpt_bus_register and xpt_bus_deregister returns a hybrid error that's
neither a cam_status, nor an errno, but a mix of both.  Update
xpt_bus_register and xpt_bus_deregister to return an errno. The vast
majority of current users compare against zero, which can also be
spelled CAM_SUCCESS. Nobody uses CAM_FAILURE, so remove that symbol
to prevent comfusion (nothing returns it either).

Where the return value is saved, ensure that the variable 'error' is
used to store an errno and 'status' is used to store a cam_status where
it makes the code clearer (usually just in functions that already mix
and match). Where the return value isn't used at all, avoid storing it
at all.

Reviewed by:		scottl@, mav@ (earlier version)
Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D30860
2021-06-28 16:13:03 -06:00
..
smartpqi_cam.c
smartpqi_cmd.c
smartpqi_defines.h
smartpqi_discovery.c
smartpqi_event.c
smartpqi_helper.c
smartpqi_includes.h
smartpqi_init.c
smartpqi_intr.c
smartpqi_ioctl.c
smartpqi_ioctl.h
smartpqi_main.c
smartpqi_mem.c
smartpqi_misc.c
smartpqi_prototypes.h
smartpqi_queue.c
smartpqi_request.c
smartpqi_response.c
smartpqi_sis.c
smartpqi_structures.h
smartpqi_tag.c