Commit 948fd537 authored by Felix Siegel's avatar Felix Siegel Committed by Greg Kroah-Hartman

staging: gasket: Use __func__ instead of hardcoded string - Style

Changed logging statements to use %s and __func__ instead of hard coding
the function name in a string.
Signed-off-by: default avatarFelix Siegel <felix.siegel@posteo.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 792b260d
...@@ -420,8 +420,9 @@ static int apex_device_cleanup(struct gasket_dev *gasket_dev) ...@@ -420,8 +420,9 @@ static int apex_device_cleanup(struct gasket_dev *gasket_dev)
gasket_log_info( gasket_log_info(
gasket_dev, gasket_dev,
"apex_device_cleanup 0x%p hib_error 0x%llx scalar_error " "%s 0x%p hib_error 0x%llx scalar_error "
"0x%llx.", "0x%llx.",
__func__,
gasket_dev, hib_error, scalar_error); gasket_dev, hib_error, scalar_error);
if (allow_power_save) if (allow_power_save)
...@@ -449,7 +450,7 @@ static int apex_reset(struct gasket_dev *gasket_dev, uint type) ...@@ -449,7 +450,7 @@ static int apex_reset(struct gasket_dev *gasket_dev, uint type)
/* We are not in reset - toggle the reset bit so as to force /* We are not in reset - toggle the reset bit so as to force
* re-init of custom block * re-init of custom block
*/ */
gasket_log_debug(gasket_dev, "apex_reset: toggle reset."); gasket_log_debug(gasket_dev, "%s: toggle reset.", __func__);
ret = apex_enter_reset(gasket_dev, type); ret = apex_enter_reset(gasket_dev, type);
if (ret) if (ret)
...@@ -673,7 +674,7 @@ static long apex_clock_gating(struct gasket_dev *gasket_dev, ulong arg) ...@@ -673,7 +674,7 @@ static long apex_clock_gating(struct gasket_dev *gasket_dev, ulong arg)
return -EFAULT; return -EFAULT;
gasket_log_error( gasket_log_error(
gasket_dev, "apex_clock_gating %llu", ibuf.enable); gasket_dev, "%s %llu", __func__, ibuf.enable);
if (ibuf.enable) { if (ibuf.enable) {
/* Quiesce AXI, gate GCB clock. */ /* Quiesce AXI, gate GCB clock. */
......
...@@ -932,7 +932,7 @@ static int gasket_enable_dev( ...@@ -932,7 +932,7 @@ static int gasket_enable_dev(
} else { } else {
gasket_log_error( gasket_log_error(
gasket_dev, gasket_dev,
"gasket_enable_dev with no physical device!!"); "%s with no physical device!!", __func__);
WARN_ON(1); WARN_ON(1);
ddev = NULL; ddev = NULL;
} }
...@@ -2100,8 +2100,9 @@ int gasket_wait_sync( ...@@ -2100,8 +2100,9 @@ int gasket_wait_sync(
if (diff_nanosec > timeout_ns) { if (diff_nanosec > timeout_ns) {
gasket_log_error( gasket_log_error(
gasket_dev, gasket_dev,
"gasket_wait_sync timeout: reg %llx count %x " "%s timeout: reg %llx count %x "
"dma %lld ns\n", "dma %lld ns\n",
__func__,
offset, count, diff_nanosec); offset, count, diff_nanosec);
return -1; return -1;
} }
...@@ -2141,7 +2142,8 @@ int gasket_wait_with_reschedule( ...@@ -2141,7 +2142,8 @@ int gasket_wait_with_reschedule(
if (retries == max_retries) { if (retries == max_retries) {
gasket_log_error( gasket_log_error(
gasket_dev, gasket_dev,
"gasket_wait_with_reschedule timeout: reg %llx timeout (%llu ms)", "%s timeout: reg %llx timeout (%llu ms)",
__func__,
offset, max_retries * delay_ms); offset, max_retries * delay_ms);
return -EINVAL; return -EINVAL;
} }
......
...@@ -178,7 +178,8 @@ static uint gasket_ioctl_check_permissions(struct file *filp, uint cmd) ...@@ -178,7 +178,8 @@ static uint gasket_ioctl_check_permissions(struct file *filp, uint cmd)
alive = (gasket_dev->status == GASKET_STATUS_ALIVE); alive = (gasket_dev->status == GASKET_STATUS_ALIVE);
if (!alive) { if (!alive) {
gasket_nodev_error( gasket_nodev_error(
"gasket_ioctl_check_permissions alive %d status %d.", "%s alive %d status %d.",
__func__,
alive, gasket_dev->status); alive, gasket_dev->status);
} }
......
...@@ -445,8 +445,9 @@ int gasket_page_table_map( ...@@ -445,8 +445,9 @@ int gasket_page_table_map(
mutex_unlock(&pg_tbl->mutex); mutex_unlock(&pg_tbl->mutex);
gasket_nodev_debug( gasket_nodev_debug(
"gasket_page_table_map done: ha %llx daddr %llx num %d, " "%s done: ha %llx daddr %llx num %d, "
"ret %d\n", "ret %d\n",
__func__,
(unsigned long long)host_addr, (unsigned long long)host_addr,
(unsigned long long)dev_addr, num_pages, ret); (unsigned long long)dev_addr, num_pages, ret);
return ret; return ret;
...@@ -869,7 +870,7 @@ static int gasket_perform_mapping( ...@@ -869,7 +870,7 @@ static int gasket_perform_mapping(
for (i = 0; i < num_pages; i++) { for (i = 0; i < num_pages; i++) {
page_addr = host_addr + i * PAGE_SIZE; page_addr = host_addr + i * PAGE_SIZE;
offset = page_addr & (PAGE_SIZE - 1); offset = page_addr & (PAGE_SIZE - 1);
gasket_nodev_debug("gasket_perform_mapping i %d\n", i); gasket_nodev_debug("%s i %d\n", __func__, i);
if (is_coherent(pg_tbl, host_addr)) { if (is_coherent(pg_tbl, host_addr)) {
u64 off = u64 off =
(u64)host_addr - (u64)host_addr -
...@@ -907,17 +908,19 @@ static int gasket_perform_mapping( ...@@ -907,17 +908,19 @@ static int gasket_perform_mapping(
} }
gasket_nodev_debug( gasket_nodev_debug(
" gasket_perform_mapping dev %p " "%s dev %p "
"i %d pte %p pfn %p -> mapped %llx\n", "i %d pte %p pfn %p -> mapped %llx\n",
__func__,
pg_tbl->device, i, &ptes[i], pg_tbl->device, i, &ptes[i],
(void *)page_to_pfn(page), (void *)page_to_pfn(page),
(unsigned long long)ptes[i].dma_addr); (unsigned long long)ptes[i].dma_addr);
if (ptes[i].dma_addr == -1) { if (ptes[i].dma_addr == -1) {
gasket_nodev_error( gasket_nodev_error(
"gasket_perform_mapping i %d" "%s i %d"
" -> fail to map page %llx " " -> fail to map page %llx "
"[pfn %p ohys %p]\n", "[pfn %p ohys %p]\n",
__func__,
i, i,
(unsigned long long)ptes[i].dma_addr, (unsigned long long)ptes[i].dma_addr,
(void *)page_to_pfn(page), (void *)page_to_pfn(page),
...@@ -1623,7 +1626,7 @@ int gasket_set_user_virt( ...@@ -1623,7 +1626,7 @@ int gasket_set_user_virt(
pg_tbl = gasket_dev->page_table[0]; pg_tbl = gasket_dev->page_table[0];
if (!pg_tbl) { if (!pg_tbl) {
gasket_nodev_error( gasket_nodev_error(
"gasket_set_user_virt: invalid page table index"); "%s: invalid page table index", __func__);
return 0; return 0;
} }
for (j = 0; j < num_pages; j++) { for (j = 0; j < num_pages; j++) {
......
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