[PATCH 04/11] android/hal-ipc: Constify param parameter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



param buffer is not modified by function and should be const.
Due to non-const iov_base in struct iovec this needs to be later
casted to (void *).
---
 android/hal-ipc.c | 4 ++--
 android/hal-ipc.h | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/android/hal-ipc.c b/android/hal-ipc.c
index 7aef971..8f02e97 100644
--- a/android/hal-ipc.c
+++ b/android/hal-ipc.c
@@ -396,8 +396,8 @@ void hal_ipc_cleanup(void)
 	disconnect_cb_data = NULL;
 }
 
-int hal_ipc_cmd(uint8_t service_id, uint8_t opcode, uint16_t len, void *param,
-					size_t *rsp_len, void *rsp, int *fd)
+int hal_ipc_cmd(uint8_t service_id, uint8_t opcode, uint16_t len,
+			const void *param, size_t *rsp_len, void *rsp, int *fd)
 {
 	ssize_t ret;
 	struct msghdr msg;
diff --git a/android/hal-ipc.h b/android/hal-ipc.h
index ddfcbd4..8b7b35f 100644
--- a/android/hal-ipc.h
+++ b/android/hal-ipc.h
@@ -32,8 +32,8 @@ void hal_ipc_set_thread_cb(hal_ipc_thread_t cb);
 bool hal_ipc_accept(void);
 void hal_ipc_cleanup(void);
 
-int hal_ipc_cmd(uint8_t service_id, uint8_t opcode, uint16_t len, void *param,
-					size_t *rsp_len, void *rsp, int *fd);
+int hal_ipc_cmd(uint8_t service_id, uint8_t opcode, uint16_t len,
+			const void *param, size_t *rsp_len, void *rsp, int *fd);
 
 void hal_ipc_register(uint8_t service, const struct hal_ipc_handler *handlers,
 								uint8_t size);
-- 
1.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux