staging: vc04_services: Fix NULL ptr sparse warnings
In calls to queue_message() in vchiq_core.c, the "void *context" parameter is set as 0 rather than NULL. This patch amends each call to use the proper NULL pointer. The following sparse warnings are fixed: drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c:1623:23: warning: Using plain integer as NULL pointer drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c:1976:47: warning: Using plain integer as NULL pointer drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c:2075:47: warning: Using plain integer as NULL pointer drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c:2095:47: warning: Using plain integer as NULL pointer drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c:2907:39: warning: Using plain integer as NULL pointer drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c:2929:39: warning: Using plain integer as NULL pointer drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c:3059:72: warning: Using plain integer as NULL pointer drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c:3860:31: warning: Using plain integer as NULL pointer drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c:3870:31: warning: Using plain integer as NULL pointer drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c:3880:31: warning: Using plain integer as NULL pointer Signed-off-by: Mike Kofron <mpkofron@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
7048e25483
commit
c322160ac5
|
@ -1620,7 +1620,7 @@ fail_open:
|
||||||
/* No available service, or an invalid request - send a CLOSE */
|
/* No available service, or an invalid request - send a CLOSE */
|
||||||
if (queue_message(state, NULL,
|
if (queue_message(state, NULL,
|
||||||
VCHIQ_MAKE_MSG(VCHIQ_MSG_CLOSE, 0, VCHIQ_MSG_SRCPORT(msgid)),
|
VCHIQ_MAKE_MSG(VCHIQ_MSG_CLOSE, 0, VCHIQ_MSG_SRCPORT(msgid)),
|
||||||
NULL, 0, 0, 0) == VCHIQ_RETRY)
|
NULL, NULL, 0, 0) == VCHIQ_RETRY)
|
||||||
goto bail_not_ready;
|
goto bail_not_ready;
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -1973,7 +1973,7 @@ parse_rx_slots(VCHIQ_STATE_T *state)
|
||||||
/* Send a PAUSE in response */
|
/* Send a PAUSE in response */
|
||||||
if (queue_message(state, NULL,
|
if (queue_message(state, NULL,
|
||||||
VCHIQ_MAKE_MSG(VCHIQ_MSG_PAUSE, 0, 0),
|
VCHIQ_MAKE_MSG(VCHIQ_MSG_PAUSE, 0, 0),
|
||||||
NULL, 0, 0, QMFLAGS_NO_MUTEX_UNLOCK)
|
NULL, NULL, 0, QMFLAGS_NO_MUTEX_UNLOCK)
|
||||||
== VCHIQ_RETRY)
|
== VCHIQ_RETRY)
|
||||||
goto bail_not_ready;
|
goto bail_not_ready;
|
||||||
if (state->is_master)
|
if (state->is_master)
|
||||||
|
@ -2072,7 +2072,7 @@ slot_handler_func(void *v)
|
||||||
pause_bulks(state);
|
pause_bulks(state);
|
||||||
if (queue_message(state, NULL,
|
if (queue_message(state, NULL,
|
||||||
VCHIQ_MAKE_MSG(VCHIQ_MSG_PAUSE, 0, 0),
|
VCHIQ_MAKE_MSG(VCHIQ_MSG_PAUSE, 0, 0),
|
||||||
NULL, 0, 0,
|
NULL, NULL, 0,
|
||||||
QMFLAGS_NO_MUTEX_UNLOCK)
|
QMFLAGS_NO_MUTEX_UNLOCK)
|
||||||
!= VCHIQ_RETRY) {
|
!= VCHIQ_RETRY) {
|
||||||
vchiq_set_conn_state(state,
|
vchiq_set_conn_state(state,
|
||||||
|
@ -2092,7 +2092,7 @@ slot_handler_func(void *v)
|
||||||
case VCHIQ_CONNSTATE_RESUMING:
|
case VCHIQ_CONNSTATE_RESUMING:
|
||||||
if (queue_message(state, NULL,
|
if (queue_message(state, NULL,
|
||||||
VCHIQ_MAKE_MSG(VCHIQ_MSG_RESUME, 0, 0),
|
VCHIQ_MAKE_MSG(VCHIQ_MSG_RESUME, 0, 0),
|
||||||
NULL, 0, 0, QMFLAGS_NO_MUTEX_LOCK)
|
NULL, NULL, 0, QMFLAGS_NO_MUTEX_LOCK)
|
||||||
!= VCHIQ_RETRY) {
|
!= VCHIQ_RETRY) {
|
||||||
if (state->is_master)
|
if (state->is_master)
|
||||||
resume_bulks(state);
|
resume_bulks(state);
|
||||||
|
@ -2904,7 +2904,7 @@ vchiq_close_service_internal(VCHIQ_SERVICE_T *service, int close_recvd)
|
||||||
(VCHIQ_MSG_CLOSE,
|
(VCHIQ_MSG_CLOSE,
|
||||||
service->localport,
|
service->localport,
|
||||||
VCHIQ_MSG_DSTPORT(service->remoteport)),
|
VCHIQ_MSG_DSTPORT(service->remoteport)),
|
||||||
NULL, 0, 0, 0);
|
NULL, NULL, 0, 0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -2926,7 +2926,7 @@ vchiq_close_service_internal(VCHIQ_SERVICE_T *service, int close_recvd)
|
||||||
(VCHIQ_MSG_CLOSE,
|
(VCHIQ_MSG_CLOSE,
|
||||||
service->localport,
|
service->localport,
|
||||||
VCHIQ_MSG_DSTPORT(service->remoteport)),
|
VCHIQ_MSG_DSTPORT(service->remoteport)),
|
||||||
NULL, 0, 0, QMFLAGS_NO_MUTEX_UNLOCK);
|
NULL, NULL, 0, QMFLAGS_NO_MUTEX_UNLOCK);
|
||||||
|
|
||||||
if (status == VCHIQ_SUCCESS) {
|
if (status == VCHIQ_SUCCESS) {
|
||||||
if (!close_recvd) {
|
if (!close_recvd) {
|
||||||
|
@ -3056,7 +3056,7 @@ vchiq_connect_internal(VCHIQ_STATE_T *state, VCHIQ_INSTANCE_T instance)
|
||||||
|
|
||||||
if (state->conn_state == VCHIQ_CONNSTATE_DISCONNECTED) {
|
if (state->conn_state == VCHIQ_CONNSTATE_DISCONNECTED) {
|
||||||
if (queue_message(state, NULL,
|
if (queue_message(state, NULL,
|
||||||
VCHIQ_MAKE_MSG(VCHIQ_MSG_CONNECT, 0, 0), NULL, 0,
|
VCHIQ_MAKE_MSG(VCHIQ_MSG_CONNECT, 0, 0), NULL, NULL,
|
||||||
0, QMFLAGS_IS_BLOCKING) == VCHIQ_RETRY)
|
0, QMFLAGS_IS_BLOCKING) == VCHIQ_RETRY)
|
||||||
return VCHIQ_RETRY;
|
return VCHIQ_RETRY;
|
||||||
|
|
||||||
|
@ -3857,7 +3857,7 @@ VCHIQ_STATUS_T vchiq_send_remote_use(VCHIQ_STATE_T *state)
|
||||||
if (state->conn_state != VCHIQ_CONNSTATE_DISCONNECTED)
|
if (state->conn_state != VCHIQ_CONNSTATE_DISCONNECTED)
|
||||||
status = queue_message(state, NULL,
|
status = queue_message(state, NULL,
|
||||||
VCHIQ_MAKE_MSG(VCHIQ_MSG_REMOTE_USE, 0, 0),
|
VCHIQ_MAKE_MSG(VCHIQ_MSG_REMOTE_USE, 0, 0),
|
||||||
NULL, 0, 0, 0);
|
NULL, NULL, 0, 0);
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3867,7 +3867,7 @@ VCHIQ_STATUS_T vchiq_send_remote_release(VCHIQ_STATE_T *state)
|
||||||
if (state->conn_state != VCHIQ_CONNSTATE_DISCONNECTED)
|
if (state->conn_state != VCHIQ_CONNSTATE_DISCONNECTED)
|
||||||
status = queue_message(state, NULL,
|
status = queue_message(state, NULL,
|
||||||
VCHIQ_MAKE_MSG(VCHIQ_MSG_REMOTE_RELEASE, 0, 0),
|
VCHIQ_MAKE_MSG(VCHIQ_MSG_REMOTE_RELEASE, 0, 0),
|
||||||
NULL, 0, 0, 0);
|
NULL, NULL, 0, 0);
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3877,7 +3877,7 @@ VCHIQ_STATUS_T vchiq_send_remote_use_active(VCHIQ_STATE_T *state)
|
||||||
if (state->conn_state != VCHIQ_CONNSTATE_DISCONNECTED)
|
if (state->conn_state != VCHIQ_CONNSTATE_DISCONNECTED)
|
||||||
status = queue_message(state, NULL,
|
status = queue_message(state, NULL,
|
||||||
VCHIQ_MAKE_MSG(VCHIQ_MSG_REMOTE_USE_ACTIVE, 0, 0),
|
VCHIQ_MAKE_MSG(VCHIQ_MSG_REMOTE_USE_ACTIVE, 0, 0),
|
||||||
NULL, 0, 0, 0);
|
NULL, NULL, 0, 0);
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue