From nobody Thu Sep 18 00:09:03 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 662C7C00145 for ; Thu, 15 Dec 2022 07:05:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230048AbiLOHFl (ORCPT ); Thu, 15 Dec 2022 02:05:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229845AbiLOHFG (ORCPT ); Thu, 15 Dec 2022 02:05:06 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9CCC46C72D; Wed, 14 Dec 2022 22:59:32 -0800 (PST) Received: from umang.jainideasonboard.com (unknown [IPv6:2401:4900:1f3e:7d24:3f0:3e81:fb16:ab4d]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 30D861837; Thu, 15 Dec 2022 07:59:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1671087571; bh=H4sK/5sjcxC66zhrxx8bpZ8f/x9F0dZ/jVF31E/bB+M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Us0Z2mTnLVzH8BYD9hfuhdJ8uuYpwlOwmWSwf54o/oDx9nsygQ7EfSY4MyoDHmG5M oFhWmPiaWPa09/0PefWJMaDHvLEQeYmdwPkVsAjTBcJSew3Js6QsTjM62r6wd8Xz6j zZEOaUr3p8c+4G4fHbpNp1hnD11f/e0WCkhAXHxA= From: Umang Jain To: linux-staging@lists.linux.dev, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Kees Cook , Stefan Wahren , Greg Kroah-Hartman , Florian Fainelli , Adrien Thierry , Dan Carpenter , Dave Stevenson , Kieran Bingham , Laurent Pinchart , Umang Jain Subject: [PATCH 2/7] staging: vc04_services: Drop VCHIQ_SUCCESS usage Date: Thu, 15 Dec 2022 12:28:48 +0530 Message-Id: <20221215065853.34477-3-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221215065853.34477-1-umang.jain@ideasonboard.com> References: <20221215065853.34477-1-umang.jain@ideasonboard.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Drop the usage of VCHIQ_SUCCESS vchiq_status enum type. Replace it with 0 to report the success status. This patch acts as intermediatory to address the TODO item: * Get rid of custom function return values for vc04_services/interface. Signed-off-by: Umang Jain --- .../bcm2835-audio/bcm2835-vchiq.c | 4 +- .../include/linux/raspberrypi/vchiq.h | 1 - .../interface/vchiq_arm/vchiq_arm.c | 36 ++++++------- .../interface/vchiq_arm/vchiq_core.c | 54 +++++++++---------- .../interface/vchiq_arm/vchiq_dev.c | 18 +++---- .../vc04_services/vchiq-mmal/mmal-vchiq.c | 4 +- 6 files changed, 57 insertions(+), 60 deletions(-) diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c b/= drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c index 0fd92affc264..d74110ca17ab 100644 --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c @@ -101,7 +101,7 @@ static int audio_vchi_callback(struct vchiq_instance *v= chiq_instance, struct vc_audio_msg *m; =20 if (reason !=3D VCHIQ_MESSAGE_AVAILABLE) - return VCHIQ_SUCCESS; + return 0; =20 m =3D (void *)header->data; if (m->type =3D=3D VC_AUDIO_MSG_TYPE_RESULT) { @@ -119,7 +119,7 @@ static int audio_vchi_callback(struct vchiq_instance *v= chiq_instance, } =20 vchiq_release_message(vchiq_instance, instance->service_handle, header); - return VCHIQ_SUCCESS; + return 0; } =20 static int diff --git a/drivers/staging/vc04_services/include/linux/raspberrypi/vchiq.= h b/drivers/staging/vc04_services/include/linux/raspberrypi/vchiq.h index 71f4cb5d5cfd..52c513e5cf3b 100644 --- a/drivers/staging/vc04_services/include/linux/raspberrypi/vchiq.h +++ b/drivers/staging/vc04_services/include/linux/raspberrypi/vchiq.h @@ -19,7 +19,6 @@ enum vchiq_reason { =20 enum vchiq_status { VCHIQ_ERROR =3D -1, - VCHIQ_SUCCESS =3D 0, VCHIQ_RETRY =3D 1 }; =20 diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c = b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c index fa92c34890e0..6e4e17272dad 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -724,7 +724,7 @@ void free_bulk_waiter(struct vchiq_instance *instance) =20 int vchiq_shutdown(struct vchiq_instance *instance) { - enum vchiq_status status =3D VCHIQ_SUCCESS; + int status =3D 0; struct vchiq_state *state =3D instance->state; =20 if (mutex_lock_killable(&state->mutex)) @@ -761,7 +761,7 @@ int vchiq_connect(struct vchiq_instance *instance) } status =3D vchiq_connect_internal(state, instance); =20 - if (status =3D=3D VCHIQ_SUCCESS) + if (!status) instance->connected =3D 1; =20 mutex_unlock(&state->mutex); @@ -793,7 +793,7 @@ vchiq_add_service(struct vchiq_instance *instance, =20 if (service) { *phandle =3D service->handle; - status =3D VCHIQ_SUCCESS; + status =3D 0; } else { status =3D VCHIQ_ERROR; } @@ -822,7 +822,7 @@ vchiq_open_service(struct vchiq_instance *instance, if (service) { *phandle =3D service->handle; status =3D vchiq_open_service_internal(service, current->pid); - if (status !=3D VCHIQ_SUCCESS) { + if (status) { vchiq_remove_service(instance, service->handle); *phandle =3D VCHIQ_SERVICE_HANDLE_INVALID; } @@ -1004,7 +1004,7 @@ add_completion(struct vchiq_instance *instance, enum = vchiq_reason reason, return VCHIQ_RETRY; } else if (instance->closing) { vchiq_log_info(vchiq_arm_log_level, "service_callback closing"); - return VCHIQ_SUCCESS; + return 0; } DEBUG_TRACE(SERVICE_CALLBACK_LINE); } @@ -1041,7 +1041,7 @@ add_completion(struct vchiq_instance *instance, enum = vchiq_reason reason, =20 complete(&instance->insert_event); =20 - return VCHIQ_SUCCESS; + return 0; } =20 int @@ -1066,14 +1066,14 @@ service_callback(struct vchiq_instance *instance, e= num vchiq_reason reason, service =3D handle_to_service(instance, handle); if (WARN_ON(!service)) { rcu_read_unlock(); - return VCHIQ_SUCCESS; + return 0; } =20 user_service =3D (struct user_service *)service->base.userdata; =20 if (!instance || instance->closing) { rcu_read_unlock(); - return VCHIQ_SUCCESS; + return 0; } =20 /* @@ -1110,7 +1110,7 @@ service_callback(struct vchiq_instance *instance, enu= m vchiq_reason reason, DEBUG_TRACE(SERVICE_CALLBACK_LINE); status =3D add_completion(instance, reason, NULL, user_service, bulk_userdata); - if (status !=3D VCHIQ_SUCCESS) { + if (status) { DEBUG_TRACE(SERVICE_CALLBACK_LINE); vchiq_service_put(service); return status; @@ -1158,7 +1158,7 @@ service_callback(struct vchiq_instance *instance, enu= m vchiq_reason reason, vchiq_service_put(service); =20 if (skip_completion) - return VCHIQ_SUCCESS; + return 0; =20 return add_completion(instance, reason, header, user_service, bulk_userdata); @@ -1350,14 +1350,14 @@ vchiq_keepalive_thread_func(void *v) } =20 status =3D vchiq_connect(instance); - if (status !=3D VCHIQ_SUCCESS) { + if (status) { vchiq_log_error(vchiq_susp_log_level, "%s vchiq_connect failed %d", __fu= nc__, status); goto shutdown; } =20 status =3D vchiq_add_service(instance, ¶ms, &ka_handle); - if (status !=3D VCHIQ_SUCCESS) { + if (status) { vchiq_log_error(vchiq_susp_log_level, "%s vchiq_open_service failed %d",= __func__, status); goto shutdown; @@ -1386,14 +1386,14 @@ vchiq_keepalive_thread_func(void *v) while (uc--) { atomic_inc(&arm_state->ka_use_ack_count); status =3D vchiq_use_service(instance, ka_handle); - if (status !=3D VCHIQ_SUCCESS) { + if (status) { vchiq_log_error(vchiq_susp_log_level, "%s vchiq_use_service error %d", __func__, status); } } while (rc--) { status =3D vchiq_release_service(instance, ka_handle); - if (status !=3D VCHIQ_SUCCESS) { + if (status) { vchiq_log_error(vchiq_susp_log_level, "%s vchiq_release_service error %d", __func__, status); @@ -1446,13 +1446,13 @@ vchiq_use_internal(struct vchiq_state *state, struc= t vchiq_service *service, write_unlock_bh(&arm_state->susp_res_lock); =20 if (!ret) { - enum vchiq_status status =3D VCHIQ_SUCCESS; + int status =3D 0; long ack_cnt =3D atomic_xchg(&arm_state->ka_use_ack_count, 0); =20 - while (ack_cnt && (status =3D=3D VCHIQ_SUCCESS)) { + while (ack_cnt && !status) { /* Send the use notify to videocore */ status =3D vchiq_send_remote_use_active(state); - if (status =3D=3D VCHIQ_SUCCESS) + if (!status) ack_cnt--; else atomic_add(ack_cnt, &arm_state->ka_use_ack_count); @@ -1708,7 +1708,7 @@ vchiq_check_service(struct vchiq_service *service) =20 read_lock_bh(&arm_state->susp_res_lock); if (service->service_use_count) - ret =3D VCHIQ_SUCCESS; + ret =3D 0; read_unlock_bh(&arm_state->susp_res_lock); =20 if (ret =3D=3D VCHIQ_ERROR) { diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c= b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c index a543c29b1598..8b8f9e56d924 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c @@ -478,7 +478,7 @@ make_service_callback(struct vchiq_service *service, en= um vchiq_reason reason, vchiq_log_warning(vchiq_core_log_level, "%d: ignoring ERROR from callback to service %x", service->state->id, service->handle); - status =3D VCHIQ_SUCCESS; + status =3D 0; } =20 if (reason !=3D VCHIQ_MESSAGE_AVAILABLE) @@ -1135,7 +1135,7 @@ queue_message(struct vchiq_state *state, struct vchiq= _service *service, =20 remote_event_signal(&state->remote->trigger); =20 - return VCHIQ_SUCCESS; + return 0; } =20 /* Called by the slot handler and application threads */ @@ -1223,7 +1223,7 @@ queue_message_sync(struct vchiq_state *state, struct = vchiq_service *service, if (VCHIQ_MSG_TYPE(msgid) !=3D VCHIQ_MSG_PAUSE) mutex_unlock(&state->sync_mutex); =20 - return VCHIQ_SUCCESS; + return 0; } =20 static inline void @@ -1303,7 +1303,7 @@ static int notify_bulks(struct vchiq_service *service, struct vchiq_bulk_queue *queue, int retry_poll) { - enum vchiq_status status =3D VCHIQ_SUCCESS; + int status =3D 0; =20 vchiq_log_trace(vchiq_core_log_level, "%d: nb:%d %cx - p=3D%x rn=3D%x r= =3D%x", service->state->id, service->localport, (queue =3D=3D &service->bulk_tx) ? 't' : 'r', @@ -1357,7 +1357,7 @@ notify_bulks(struct vchiq_service *service, struct vc= hiq_bulk_queue *queue, complete(&service->bulk_remove_event); } if (!retry_poll) - status =3D VCHIQ_SUCCESS; + status =3D 0; =20 if (status =3D=3D VCHIQ_RETRY) request_poll(service->state, service, (queue =3D=3D &service->bulk_tx) ? @@ -1398,13 +1398,12 @@ poll_services_of_group(struct vchiq_state *state, i= nt group) */ service->public_fourcc =3D VCHIQ_FOURCC_INVALID; =20 - if (vchiq_close_service_internal(service, NO_CLOSE_RECVD) !=3D - VCHIQ_SUCCESS) + if (vchiq_close_service_internal(service, NO_CLOSE_RECVD)) request_poll(state, service, VCHIQ_POLL_REMOVE); } else if (service_flags & BIT(VCHIQ_POLL_TERMINATE)) { vchiq_log_info(vchiq_core_log_level, "%d: ps - terminate %d<->%d", state->id, service->localport, service->remoteport); - if (vchiq_close_service_internal(service, NO_CLOSE_RECVD) !=3D VCHIQ_SU= CCESS) + if (vchiq_close_service_internal(service, NO_CLOSE_RECVD)) request_poll(state, service, VCHIQ_POLL_TERMINATE); } if (service_flags & BIT(VCHIQ_POLL_TXNOTIFY)) @@ -2495,7 +2494,7 @@ vchiq_open_service_internal(struct vchiq_service *ser= vice, int client_id) service->version, service->version_min }; - enum vchiq_status status =3D VCHIQ_SUCCESS; + int status =3D 0; =20 service->client_id =3D client_id; vchiq_use_service_internal(service); @@ -2506,7 +2505,7 @@ vchiq_open_service_internal(struct vchiq_service *ser= vice, int client_id) sizeof(payload), QMFLAGS_IS_BLOCKING); =20 - if (status !=3D VCHIQ_SUCCESS) + if (status) return status; =20 /* Wait for the ACK/NAK */ @@ -2602,11 +2601,11 @@ do_abort_bulks(struct vchiq_service *service) mutex_unlock(&service->bulk_mutex); =20 status =3D notify_bulks(service, &service->bulk_tx, NO_RETRY_POLL); - if (status !=3D VCHIQ_SUCCESS) + if (status) return 0; =20 status =3D notify_bulks(service, &service->bulk_rx, NO_RETRY_POLL); - return (status =3D=3D VCHIQ_SUCCESS); + return !status; } =20 static int @@ -2678,7 +2677,7 @@ int vchiq_close_service_internal(struct vchiq_service *service, int close_recv= d) { struct vchiq_state *state =3D service->state; - enum vchiq_status status =3D VCHIQ_SUCCESS; + int status =3D 0; int is_server =3D (service->public_fourcc !=3D VCHIQ_FOURCC_INVALID); int close_id =3D MAKE_CLOSE(service->localport, VCHIQ_MSG_DSTPORT(service->remoteport)); @@ -2730,11 +2729,11 @@ vchiq_close_service_internal(struct vchiq_service *= service, int close_recvd) =20 release_service_messages(service); =20 - if (status =3D=3D VCHIQ_SUCCESS) + if (!status) status =3D queue_message(state, service, close_id, NULL, NULL, 0, QMFLAGS_NO_MUTEX_UNLOCK); =20 - if (status !=3D VCHIQ_SUCCESS) { + if (status) { if (service->srvstate =3D=3D VCHIQ_SRVSTATE_OPENSYNC) mutex_unlock(&state->sync_mutex); break; @@ -2768,7 +2767,7 @@ vchiq_close_service_internal(struct vchiq_service *se= rvice, int close_recvd) break; } =20 - if (status =3D=3D VCHIQ_SUCCESS) + if (!status) status =3D close_service_complete(service, VCHIQ_SRVSTATE_CLOSERECVD); break; =20 @@ -2862,7 +2861,7 @@ vchiq_connect_internal(struct vchiq_state *state, str= uct vchiq_instance *instanc complete(&state->connect); } =20 - return VCHIQ_SUCCESS; + return 0; } =20 void @@ -2884,7 +2883,7 @@ vchiq_close_service(struct vchiq_instance *instance, = unsigned int handle) { /* Unregister the service */ struct vchiq_service *service =3D find_service_by_handle(instance, handle= ); - enum vchiq_status status =3D VCHIQ_SUCCESS; + int status =3D 0; =20 if (!service) return VCHIQ_ERROR; @@ -2926,7 +2925,7 @@ vchiq_close_service(struct vchiq_instance *instance, = unsigned int handle) srvstate_names[service->srvstate]); } =20 - if ((status =3D=3D VCHIQ_SUCCESS) && + if (!status && (service->srvstate !=3D VCHIQ_SRVSTATE_FREE) && (service->srvstate !=3D VCHIQ_SRVSTATE_LISTENING)) status =3D VCHIQ_ERROR; @@ -2942,7 +2941,7 @@ vchiq_remove_service(struct vchiq_instance *instance,= unsigned int handle) { /* Unregister the service */ struct vchiq_service *service =3D find_service_by_handle(instance, handle= ); - enum vchiq_status status =3D VCHIQ_SUCCESS; + int status =3D 0; =20 if (!service) return VCHIQ_ERROR; @@ -2987,8 +2986,7 @@ vchiq_remove_service(struct vchiq_instance *instance,= unsigned int handle) srvstate_names[service->srvstate]); } =20 - if ((status =3D=3D VCHIQ_SUCCESS) && - (service->srvstate !=3D VCHIQ_SRVSTATE_FREE)) + if (!status && (service->srvstate !=3D VCHIQ_SRVSTATE_FREE)) status =3D VCHIQ_ERROR; =20 vchiq_service_put(service); @@ -3028,7 +3026,7 @@ int vchiq_bulk_transfer(struct vchiq_instance *instan= ce, unsigned int handle, if (!offset && !uoffset) goto error_exit; =20 - if (vchiq_check_service(service) !=3D VCHIQ_SUCCESS) + if (vchiq_check_service(service)) goto error_exit; =20 switch (mode) { @@ -3121,7 +3119,7 @@ int vchiq_bulk_transfer(struct vchiq_instance *instan= ce, unsigned int handle, QMFLAGS_IS_BLOCKING | QMFLAGS_NO_MUTEX_LOCK | QMFLAGS_NO_MUTEX_UNLOCK); - if (status !=3D VCHIQ_SUCCESS) + if (status) goto unlock_both_error_exit; =20 queue->local_insert++; @@ -3136,7 +3134,7 @@ int vchiq_bulk_transfer(struct vchiq_instance *instan= ce, unsigned int handle, waiting: vchiq_service_put(service); =20 - status =3D VCHIQ_SUCCESS; + status =3D 0; =20 if (bulk_waiter) { bulk_waiter->bulk =3D bulk; @@ -3175,7 +3173,7 @@ vchiq_queue_message(struct vchiq_instance *instance, = unsigned int handle, if (!service) goto error_exit; =20 - if (vchiq_check_service(service) !=3D VCHIQ_SUCCESS) + if (vchiq_check_service(service)) goto error_exit; =20 if (!size) { @@ -3286,14 +3284,14 @@ vchiq_get_peer_version(struct vchiq_instance *insta= nce, unsigned int handle, sho if (!service) goto exit; =20 - if (vchiq_check_service(service) !=3D VCHIQ_SUCCESS) + if (vchiq_check_service(service)) goto exit; =20 if (!peer_version) goto exit; =20 *peer_version =3D service->peer_version; - status =3D VCHIQ_SUCCESS; + status =3D 0; =20 exit: if (service) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_dev.c = b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_dev.c index 7e297494437e..d9c4d550412e 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_dev.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_dev.c @@ -112,7 +112,7 @@ vchiq_ioc_queue_message(struct vchiq_instance *instance= , unsigned int handle, struct vchiq_element *elements, unsigned long count) { struct vchiq_io_copy_callback_context context; - enum vchiq_status status =3D VCHIQ_SUCCESS; + int status =3D 0; unsigned long i; size_t total_size =3D 0; =20 @@ -142,7 +142,7 @@ static int vchiq_ioc_create_service(struct vchiq_instan= ce *instance, { struct user_service *user_service =3D NULL; struct vchiq_service *service; - enum vchiq_status status =3D VCHIQ_SUCCESS; + int status =3D 0; struct vchiq_service_params_kernel params; int srvstate; =20 @@ -190,7 +190,7 @@ static int vchiq_ioc_create_service(struct vchiq_instan= ce *instance, =20 if (args->is_open) { status =3D vchiq_open_service_internal(service, instance->pid); - if (status !=3D VCHIQ_SUCCESS) { + if (status) { vchiq_remove_service(instance, service->handle); return (status =3D=3D VCHIQ_RETRY) ? -EINTR : -EIO; @@ -577,7 +577,7 @@ static long vchiq_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { struct vchiq_instance *instance =3D file->private_data; - enum vchiq_status status =3D VCHIQ_SUCCESS; + int status =3D 0; struct vchiq_service *service =3D NULL; long ret =3D 0; int i, rc; @@ -598,12 +598,12 @@ vchiq_ioctl(struct file *file, unsigned int cmd, unsi= gned long arg) instance, &i))) { status =3D vchiq_remove_service(instance, service->handle); vchiq_service_put(service); - if (status !=3D VCHIQ_SUCCESS) + if (status) break; } service =3D NULL; =20 - if (status =3D=3D VCHIQ_SUCCESS) { + if (!status) { /* Wake the completion thread and ask it to exit */ instance->closing =3D 1; complete(&instance->insert_event); @@ -627,7 +627,7 @@ vchiq_ioctl(struct file *file, unsigned int cmd, unsign= ed long arg) status =3D vchiq_connect_internal(instance->state, instance); mutex_unlock(&instance->state->mutex); =20 - if (status =3D=3D VCHIQ_SUCCESS) + if (!status) instance->connected =3D 1; else vchiq_log_error(vchiq_arm_log_level, @@ -675,7 +675,7 @@ vchiq_ioctl(struct file *file, unsigned int cmd, unsign= ed long arg) status =3D (cmd =3D=3D VCHIQ_IOC_CLOSE_SERVICE) ? vchiq_close_service(instance, service->handle) : vchiq_remove_service(instance, service->handle); - if (status !=3D VCHIQ_SUCCESS) + if (status) break; } =20 @@ -868,7 +868,7 @@ vchiq_ioctl(struct file *file, unsigned int cmd, unsign= ed long arg) ret =3D -EINTR; } =20 - if ((status =3D=3D VCHIQ_SUCCESS) && (ret < 0) && (ret !=3D -EINTR) && (r= et !=3D -EWOULDBLOCK)) + if (!status && (ret < 0) && (ret !=3D -EINTR) && (ret !=3D -EWOULDBLOCK)) vchiq_log_info(vchiq_arm_log_level, " ioctl instance %pK, cmd %s -> status %d, %ld", instance, (_IOC_NR(cmd) <=3D VCHIQ_IOC_MAX) ? diff --git a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c b/driver= s/staging/vc04_services/vchiq-mmal/mmal-vchiq.c index 48a983f497f0..cda46497977c 100644 --- a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c +++ b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c @@ -559,7 +559,7 @@ static int service_callback(struct vchiq_instance *vchi= q_instance, =20 if (!instance) { pr_err("Message callback passed NULL instance\n"); - return VCHIQ_SUCCESS; + return 0; } =20 switch (reason) { @@ -643,7 +643,7 @@ static int service_callback(struct vchiq_instance *vchi= q_instance, break; } =20 - return VCHIQ_SUCCESS; + return 0; } =20 static int send_synchronous_mmal_msg(struct vchiq_mmal_instance *instance, --=20 2.38.1