Commit 57d14635 authored by Stefan Wahren's avatar Stefan Wahren Committed by Greg Kroah-Hartman

staging: vchiq_core: Replace remaining BUG_ON with WARN_ON

This replaces all remaining BUG_ON with WARN_ON. So in case of
a VCHIQ bug the system is still usable.
Signed-off-by: default avatarStefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d1eab9de
...@@ -313,7 +313,7 @@ unlock_service(VCHIQ_SERVICE_T *service) ...@@ -313,7 +313,7 @@ unlock_service(VCHIQ_SERVICE_T *service)
if (!service->ref_count) { if (!service->ref_count) {
VCHIQ_STATE_T *state = service->state; VCHIQ_STATE_T *state = service->state;
BUG_ON(service->srvstate != VCHIQ_SRVSTATE_FREE); WARN_ON(service->srvstate != VCHIQ_SRVSTATE_FREE);
state->services[service->localport] = NULL; state->services[service->localport] = NULL;
} else { } else {
service = NULL; service = NULL;
...@@ -839,8 +839,8 @@ queue_message(VCHIQ_STATE_T *state, VCHIQ_SERVICE_T *service, ...@@ -839,8 +839,8 @@ queue_message(VCHIQ_STATE_T *state, VCHIQ_SERVICE_T *service,
return VCHIQ_ERROR; return VCHIQ_ERROR;
} }
BUG_ON((flags & (QMFLAGS_NO_MUTEX_LOCK | WARN_ON((flags & (QMFLAGS_NO_MUTEX_LOCK |
QMFLAGS_NO_MUTEX_UNLOCK)) != 0); QMFLAGS_NO_MUTEX_UNLOCK)) != 0);
if (service->closing) { if (service->closing) {
/* The service has been closed */ /* The service has been closed */
...@@ -939,8 +939,8 @@ queue_message(VCHIQ_STATE_T *state, VCHIQ_SERVICE_T *service, ...@@ -939,8 +939,8 @@ queue_message(VCHIQ_STATE_T *state, VCHIQ_SERVICE_T *service,
header, size, VCHIQ_MSG_SRCPORT(msgid), header, size, VCHIQ_MSG_SRCPORT(msgid),
VCHIQ_MSG_DSTPORT(msgid)); VCHIQ_MSG_DSTPORT(msgid));
BUG_ON((flags & (QMFLAGS_NO_MUTEX_LOCK | WARN_ON((flags & (QMFLAGS_NO_MUTEX_LOCK |
QMFLAGS_NO_MUTEX_UNLOCK)) != 0); QMFLAGS_NO_MUTEX_UNLOCK)) != 0);
callback_result = callback_result =
copy_message_data(copy_callback, context, copy_message_data(copy_callback, context,
...@@ -3204,7 +3204,7 @@ vchiq_close_service(VCHIQ_SERVICE_HANDLE_T handle) ...@@ -3204,7 +3204,7 @@ vchiq_close_service(VCHIQ_SERVICE_HANDLE_T handle)
if (current == service->state->slot_handler_thread) { if (current == service->state->slot_handler_thread) {
status = vchiq_close_service_internal(service, status = vchiq_close_service_internal(service,
0/*!close_recvd*/); 0/*!close_recvd*/);
BUG_ON(status == VCHIQ_RETRY); WARN_ON(status == VCHIQ_RETRY);
} else { } else {
/* Mark the service for termination by the slot handler */ /* Mark the service for termination by the slot handler */
request_poll(service->state, service, VCHIQ_POLL_TERMINATE); request_poll(service->state, service, VCHIQ_POLL_TERMINATE);
...@@ -3266,7 +3266,7 @@ vchiq_remove_service(VCHIQ_SERVICE_HANDLE_T handle) ...@@ -3266,7 +3266,7 @@ vchiq_remove_service(VCHIQ_SERVICE_HANDLE_T handle)
status = vchiq_close_service_internal(service, status = vchiq_close_service_internal(service,
0/*!close_recvd*/); 0/*!close_recvd*/);
BUG_ON(status == VCHIQ_RETRY); WARN_ON(status == VCHIQ_RETRY);
} else { } else {
/* Mark the service for removal by the slot handler */ /* Mark the service for removal by the slot handler */
request_poll(service->state, service, VCHIQ_POLL_REMOVE); request_poll(service->state, service, VCHIQ_POLL_REMOVE);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment