Browse Source

Resolve compilation errors in adsprpc

Number of parameters in print statement was less than number of
format specifiers. This was causing an error with the new kernel
compiler.

Change-Id: Iad4ed0ad373559ecd64e8d9bfb1da37532f443c9
Signed-off-by: Anirudh Raghavendra <[email protected]>
Anirudh Raghavendra 2 năm trước cách đây
mục cha
commit
3a10a6b261
2 tập tin đã thay đổi với 5 bổ sung5 xóa
  1. 3 3
      dsp/adsprpc.c
  2. 2 2
      dsp/adsprpc_shared.h

+ 3 - 3
dsp/adsprpc.c

@@ -3019,7 +3019,7 @@ int fastrpc_internal_invoke(struct fastrpc_file *fl, uint32_t mode,
 		if (err) {
 			err = -EINVAL;
 			ADSPRPC_ERR(
-				"user application %s trying to send a kernel RPC message to channel %d, handle 0x%x\n",
+				"user application trying to send a kernel RPC message to channel %d, handle 0x%x\n",
 				cid, invoke->handle);
 			goto bail;
 		}
@@ -5455,7 +5455,7 @@ static ssize_t fastrpc_debugfs_read(struct file *filp, char __user *buffer,
 		}
 		mutex_unlock(&fl->map_mutex);
 		len += scnprintf(fileinfo + len, DEBUGFS_SIZE - len,
-			"%-20s|%-20s|%-20s|%-20s\n",
+			"%-20s|%-20s|%-20s\n",
 			"len", "refs",
 			"raddr");
 		len += scnprintf(fileinfo + len, DEBUGFS_SIZE - len,
@@ -5465,7 +5465,7 @@ static ssize_t fastrpc_debugfs_read(struct file *filp, char __user *buffer,
 		mutex_lock(&fl->map_mutex);
 		hlist_for_each_entry_safe(map, n, &fl->maps, hn) {
 			len += scnprintf(fileinfo + len, DEBUGFS_SIZE - len,
-				"%-20zu|%-20d|0x%-20lX|%-20d\n\n",
+				"%-20zu|%-20d|0x%-20lX\n\n",
 				map->len, map->refs, map->raddr);
 		}
 		mutex_unlock(&fl->map_mutex);

+ 2 - 2
dsp/adsprpc_shared.h

@@ -48,11 +48,11 @@
 
 /* Pre-defined parameter for print gfa structure*/
 
-#define smq_invoke_ctx_params "pid: %d, tgid: %d, handle: %p, sc: 0x%x, fl: %p, fd: %p, magic: %d\n"
+#define smq_invoke_ctx_params "pid: %d, tgid: %d, handle: %d, sc: 0x%x, fl: %p, fd: %p, magic: %d\n"
 
 #define fastrpc_file_params "fl->tgid: %d, fl->cid: %d, fl->ssrcount: %p, fl->pd: %d, fl->profile: %p, fl->mode: %p, fl->tgid_open: %d, fl->num_cached_buf: %d, num_pers_hdrs: %d, fl->sessionid: %d, fl->servloc_name: %s, fl->file_close: %d, fl->dsp_proc_init: %d,fl->apps: %p, fl->qos_request: %d, fl->dev_minor: %d, fl->debug_buf: %s fl->debug_buf_alloced_attempted: %d, fl->wake_enable: %d, fl->ws_timeout: %d, fl->untrusted_process: %d\n"
 
-#define fastrpc_mmap_params "fl: %p, apps: %p, fd: %d, flags: %p, buf: %p, phys: %p, size : %d, va : %p, map->raddr: %p, len : %d, refs : %d, secure: %d\n"
+#define fastrpc_mmap_params "fd: %d, flags: %p, buf: %p, phys: %p, size : %d, va : %p, map->raddr: %p, len : %d, refs : %d, secure: %d\n"
 
 #define fastrpc_buf_params "buf->fl: %p, buf->phys: %p, buf->virt: %p, buf->size: %d, buf->dma_attr: %ld, buf->raddr: %p, buf->flags: %d, buf->type: %d, buf->in_use: %d\n"
 /* Set for buffers that have no virtual mapping in userspace */