Commit 4486174c authored by Stefan Wahren's avatar Stefan Wahren Committed by Greg Kroah-Hartman

staging: vc04_services: Use __func__ macro

It's better to use the __func__ macro instead of open-code the function
name. This fixes the following checkpatch warning:

WARNING: Prefer using '"%s...", __func__' to using 'x',
this function's name, in a string
Signed-off-by: default avatarStefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1cc5a28b
...@@ -582,8 +582,8 @@ free_pagelist(struct vchiq_pagelist_info *pagelistinfo, ...@@ -582,8 +582,8 @@ free_pagelist(struct vchiq_pagelist_info *pagelistinfo,
struct page **pages = pagelistinfo->pages; struct page **pages = pagelistinfo->pages;
unsigned int num_pages = pagelistinfo->num_pages; unsigned int num_pages = pagelistinfo->num_pages;
vchiq_log_trace(vchiq_arm_log_level, "free_pagelist - %pK, %d", vchiq_log_trace(vchiq_arm_log_level, "%s - %pK, %d",
pagelistinfo->pagelist, actual); __func__, pagelistinfo->pagelist, actual);
/* /*
* NOTE: dma_unmap_sg must be called before the * NOTE: dma_unmap_sg must be called before the
......
...@@ -563,7 +563,7 @@ add_completion(VCHIQ_INSTANCE_T instance, VCHIQ_REASON_T reason, ...@@ -563,7 +563,7 @@ add_completion(VCHIQ_INSTANCE_T instance, VCHIQ_REASON_T reason,
/* Out of space - wait for the client */ /* Out of space - wait for the client */
DEBUG_TRACE(SERVICE_CALLBACK_LINE); DEBUG_TRACE(SERVICE_CALLBACK_LINE);
vchiq_log_trace(vchiq_arm_log_level, vchiq_log_trace(vchiq_arm_log_level,
"add_completion - completion queue full"); "%s - completion queue full", __func__);
DEBUG_COUNT(COMPLETION_QUEUE_FULL_COUNT); DEBUG_COUNT(COMPLETION_QUEUE_FULL_COUNT);
if (down_interruptible(&instance->remove_event) != 0) { if (down_interruptible(&instance->remove_event) != 0) {
vchiq_log_info(vchiq_arm_log_level, vchiq_log_info(vchiq_arm_log_level,
...@@ -641,9 +641,9 @@ service_callback(VCHIQ_REASON_T reason, VCHIQ_HEADER_T *header, ...@@ -641,9 +641,9 @@ service_callback(VCHIQ_REASON_T reason, VCHIQ_HEADER_T *header,
return VCHIQ_SUCCESS; return VCHIQ_SUCCESS;
vchiq_log_trace(vchiq_arm_log_level, vchiq_log_trace(vchiq_arm_log_level,
"service_callback - service %lx(%d,%p), reason %d, header %lx, " "%s - service %lx(%d,%p), reason %d, header %lx, "
"instance %lx, bulk_userdata %lx", "instance %lx, bulk_userdata %lx",
(unsigned long)user_service, __func__, (unsigned long)user_service,
service->localport, user_service->userdata, service->localport, user_service->userdata,
reason, (unsigned long)header, reason, (unsigned long)header,
(unsigned long)instance, (unsigned long)bulk_userdata); (unsigned long)instance, (unsigned long)bulk_userdata);
...@@ -679,12 +679,12 @@ service_callback(VCHIQ_REASON_T reason, VCHIQ_HEADER_T *header, ...@@ -679,12 +679,12 @@ service_callback(VCHIQ_REASON_T reason, VCHIQ_HEADER_T *header,
if (down_interruptible(&user_service->remove_event) if (down_interruptible(&user_service->remove_event)
!= 0) { != 0) {
vchiq_log_info(vchiq_arm_log_level, vchiq_log_info(vchiq_arm_log_level,
"service_callback interrupted"); "%s interrupted", __func__);
DEBUG_TRACE(SERVICE_CALLBACK_LINE); DEBUG_TRACE(SERVICE_CALLBACK_LINE);
return VCHIQ_RETRY; return VCHIQ_RETRY;
} else if (instance->closing) { } else if (instance->closing) {
vchiq_log_info(vchiq_arm_log_level, vchiq_log_info(vchiq_arm_log_level,
"service_callback closing"); "%s closing", __func__);
DEBUG_TRACE(SERVICE_CALLBACK_LINE); DEBUG_TRACE(SERVICE_CALLBACK_LINE);
return VCHIQ_ERROR; return VCHIQ_ERROR;
} }
...@@ -740,8 +740,8 @@ user_service_free(void *userdata) ...@@ -740,8 +740,8 @@ user_service_free(void *userdata)
static void close_delivered(USER_SERVICE_T *user_service) static void close_delivered(USER_SERVICE_T *user_service)
{ {
vchiq_log_info(vchiq_arm_log_level, vchiq_log_info(vchiq_arm_log_level,
"close_delivered(handle=%x)", "%s(handle=%x)",
user_service->service->handle); __func__, user_service->service->handle);
if (user_service->close_pending) { if (user_service->close_pending) {
/* Allow the underlying service to be culled */ /* Allow the underlying service to be culled */
...@@ -872,8 +872,8 @@ vchiq_ioctl(struct file *file, unsigned int cmd, unsigned long arg) ...@@ -872,8 +872,8 @@ vchiq_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
DEBUG_INITIALISE(g_state.local) DEBUG_INITIALISE(g_state.local)
vchiq_log_trace(vchiq_arm_log_level, vchiq_log_trace(vchiq_arm_log_level,
"vchiq_ioctl - instance %pK, cmd %s, arg %lx", "%s - instance %pK, cmd %s, arg %lx",
instance, __func__, instance,
((_IOC_TYPE(cmd) == VCHIQ_IOC_MAGIC) && ((_IOC_TYPE(cmd) == VCHIQ_IOC_MAGIC) &&
(_IOC_NR(cmd) <= VCHIQ_IOC_MAX)) ? (_IOC_NR(cmd) <= VCHIQ_IOC_MAX)) ?
ioctl_names[_IOC_NR(cmd)] : "<invalid>", arg); ioctl_names[_IOC_NR(cmd)] : "<invalid>", arg);
...@@ -2078,8 +2078,8 @@ vchiq_release(struct inode *inode, struct file *file) ...@@ -2078,8 +2078,8 @@ vchiq_release(struct inode *inode, struct file *file)
int i; int i;
vchiq_log_info(vchiq_arm_log_level, vchiq_log_info(vchiq_arm_log_level,
"vchiq_release: instance=%lx", "%s: instance=%lx",
(unsigned long)instance); __func__, (unsigned long)instance);
if (!state) { if (!state) {
ret = -EPERM; ret = -EPERM;
......
...@@ -1197,8 +1197,8 @@ release_slot(VCHIQ_STATE_T *state, VCHIQ_SLOT_INFO_T *slot_info, ...@@ -1197,8 +1197,8 @@ release_slot(VCHIQ_STATE_T *state, VCHIQ_SLOT_INFO_T *slot_info,
SLOT_INDEX_FROM_INFO(state, slot_info); SLOT_INDEX_FROM_INFO(state, slot_info);
state->remote->slot_queue_recycle = slot_queue_recycle + 1; state->remote->slot_queue_recycle = slot_queue_recycle + 1;
vchiq_log_info(vchiq_core_log_level, vchiq_log_info(vchiq_core_log_level,
"%d: release_slot %d - recycle->%x", "%d: %s %d - recycle->%x", state->id, __func__,
state->id, SLOT_INDEX_FROM_INFO(state, slot_info), SLOT_INDEX_FROM_INFO(state, slot_info),
state->remote->slot_queue_recycle); state->remote->slot_queue_recycle);
/* A write barrier is necessary, but remote_event_signal /* A write barrier is necessary, but remote_event_signal
...@@ -2338,8 +2338,8 @@ vchiq_init_slots(void *mem_base, int mem_size) ...@@ -2338,8 +2338,8 @@ vchiq_init_slots(void *mem_base, int mem_size)
if (num_slots < 4) { if (num_slots < 4) {
vchiq_log_error(vchiq_core_log_level, vchiq_log_error(vchiq_core_log_level,
"vchiq_init_slots - insufficient memory %x bytes", "%s - insufficient memory %x bytes",
mem_size); __func__, mem_size);
return NULL; return NULL;
} }
...@@ -2870,9 +2870,9 @@ close_service_complete(VCHIQ_SERVICE_T *service, int failstate) ...@@ -2870,9 +2870,9 @@ close_service_complete(VCHIQ_SERVICE_T *service, int failstate)
break; break;
default: default:
vchiq_log_error(vchiq_core_log_level, vchiq_log_error(vchiq_core_log_level,
"close_service_complete(%x) called in state %s", "%s(%x) called in state %s", __func__,
service->handle, srvstate_names[service->srvstate]); service->handle, srvstate_names[service->srvstate]);
WARN(1, "close_service_complete in unexpected state\n"); WARN(1, "%s in unexpected state\n", __func__);
return VCHIQ_ERROR; return VCHIQ_ERROR;
} }
...@@ -2924,9 +2924,9 @@ vchiq_close_service_internal(VCHIQ_SERVICE_T *service, int close_recvd) ...@@ -2924,9 +2924,9 @@ vchiq_close_service_internal(VCHIQ_SERVICE_T *service, int close_recvd)
case VCHIQ_SRVSTATE_CLOSEWAIT: case VCHIQ_SRVSTATE_CLOSEWAIT:
if (close_recvd) if (close_recvd)
vchiq_log_error(vchiq_core_log_level, vchiq_log_error(vchiq_core_log_level,
"vchiq_close_service_internal(1) called " "%s(1) called "
"in state %s", "in state %s",
srvstate_names[service->srvstate]); __func__, srvstate_names[service->srvstate]);
else if (is_server) { else if (is_server) {
if (service->srvstate == VCHIQ_SRVSTATE_LISTENING) { if (service->srvstate == VCHIQ_SRVSTATE_LISTENING) {
status = VCHIQ_ERROR; status = VCHIQ_ERROR;
...@@ -3033,7 +3033,7 @@ vchiq_close_service_internal(VCHIQ_SERVICE_T *service, int close_recvd) ...@@ -3033,7 +3033,7 @@ vchiq_close_service_internal(VCHIQ_SERVICE_T *service, int close_recvd)
default: default:
vchiq_log_error(vchiq_core_log_level, vchiq_log_error(vchiq_core_log_level,
"vchiq_close_service_internal(%d) called in state %s", "%s(%d) called in state %s", __func__,
close_recvd, srvstate_names[service->srvstate]); close_recvd, srvstate_names[service->srvstate]);
break; break;
} }
...@@ -3154,8 +3154,8 @@ vchiq_pause_internal(VCHIQ_STATE_T *state) ...@@ -3154,8 +3154,8 @@ vchiq_pause_internal(VCHIQ_STATE_T *state)
break; break;
default: default:
vchiq_log_error(vchiq_core_log_level, vchiq_log_error(vchiq_core_log_level,
"vchiq_pause_internal in state %s\n", "%s in state %s\n",
conn_state_names[state->conn_state]); __func__, conn_state_names[state->conn_state]);
status = VCHIQ_ERROR; status = VCHIQ_ERROR;
VCHIQ_STATS_INC(state, error_count); VCHIQ_STATS_INC(state, error_count);
break; break;
......
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