acpi, nfit: remove redundant __func__ in dev_dbg

Dynamic debug can be instructed to add the function name to the debug
output using the +f switch, so there is no need for the nfit module to
do it again. If a user decides to add the +f switch for nfit's dynamic
debug this results in double prints of the function name like the
following:

[ 2391.935383] acpi_nfit_ctl: nfit ACPI0012:00: acpi_nfit_ctl:nmem8 cmd: 10: func: 1 input length: 0

Thus remove the stray __func__ printing.

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
This commit is contained in:
Johannes Thumshirn 2018-03-02 13:20:49 +01:00 committed by Dan Williams
parent 661e50bc85
commit b814735f5c
2 changed files with 38 additions and 42 deletions

View file

@ -476,8 +476,8 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm,
in_buf.buffer.length = call_pkg->nd_size_in; in_buf.buffer.length = call_pkg->nd_size_in;
} }
dev_dbg(dev, "%s:%s cmd: %d: func: %d input length: %d\n", dev_dbg(dev, "%s cmd: %d: func: %d input length: %d\n",
__func__, dimm_name, cmd, func, in_buf.buffer.length); dimm_name, cmd, func, in_buf.buffer.length);
print_hex_dump_debug("nvdimm in ", DUMP_PREFIX_OFFSET, 4, 4, print_hex_dump_debug("nvdimm in ", DUMP_PREFIX_OFFSET, 4, 4,
in_buf.buffer.pointer, in_buf.buffer.pointer,
min_t(u32, 256, in_buf.buffer.length), true); min_t(u32, 256, in_buf.buffer.length), true);
@ -506,8 +506,7 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm,
} }
if (!out_obj) { if (!out_obj) {
dev_dbg(dev, "%s:%s _DSM failed cmd: %s\n", __func__, dimm_name, dev_dbg(dev, "%s _DSM failed cmd: %s\n", dimm_name, cmd_name);
cmd_name);
return -EINVAL; return -EINVAL;
} }
@ -528,13 +527,13 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm,
} }
if (out_obj->package.type != ACPI_TYPE_BUFFER) { if (out_obj->package.type != ACPI_TYPE_BUFFER) {
dev_dbg(dev, "%s:%s unexpected output object type cmd: %s type: %d\n", dev_dbg(dev, "%s unexpected output object type cmd: %s type: %d\n",
__func__, dimm_name, cmd_name, out_obj->type); dimm_name, cmd_name, out_obj->type);
rc = -EINVAL; rc = -EINVAL;
goto out; goto out;
} }
dev_dbg(dev, "%s:%s cmd: %s output length: %d\n", __func__, dimm_name, dev_dbg(dev, "%s cmd: %s output length: %d\n", dimm_name,
cmd_name, out_obj->buffer.length); cmd_name, out_obj->buffer.length);
print_hex_dump_debug(cmd_name, DUMP_PREFIX_OFFSET, 4, 4, print_hex_dump_debug(cmd_name, DUMP_PREFIX_OFFSET, 4, 4,
out_obj->buffer.pointer, out_obj->buffer.pointer,
@ -546,14 +545,14 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm,
out_obj->buffer.length - offset); out_obj->buffer.length - offset);
if (offset + out_size > out_obj->buffer.length) { if (offset + out_size > out_obj->buffer.length) {
dev_dbg(dev, "%s:%s output object underflow cmd: %s field: %d\n", dev_dbg(dev, "%s output object underflow cmd: %s field: %d\n",
__func__, dimm_name, cmd_name, i); dimm_name, cmd_name, i);
break; break;
} }
if (in_buf.buffer.length + offset + out_size > buf_len) { if (in_buf.buffer.length + offset + out_size > buf_len) {
dev_dbg(dev, "%s:%s output overrun cmd: %s field: %d\n", dev_dbg(dev, "%s output overrun cmd: %s field: %d\n",
__func__, dimm_name, cmd_name, i); dimm_name, cmd_name, i);
rc = -ENXIO; rc = -ENXIO;
goto out; goto out;
} }
@ -655,7 +654,7 @@ static bool add_spa(struct acpi_nfit_desc *acpi_desc,
INIT_LIST_HEAD(&nfit_spa->list); INIT_LIST_HEAD(&nfit_spa->list);
memcpy(nfit_spa->spa, spa, sizeof(*spa)); memcpy(nfit_spa->spa, spa, sizeof(*spa));
list_add_tail(&nfit_spa->list, &acpi_desc->spas); list_add_tail(&nfit_spa->list, &acpi_desc->spas);
dev_dbg(dev, "%s: spa index: %d type: %s\n", __func__, dev_dbg(dev, "spa index: %d type: %s\n",
spa->range_index, spa->range_index,
spa_type_name(nfit_spa_type(spa))); spa_type_name(nfit_spa_type(spa)));
return true; return true;
@ -684,8 +683,8 @@ static bool add_memdev(struct acpi_nfit_desc *acpi_desc,
INIT_LIST_HEAD(&nfit_memdev->list); INIT_LIST_HEAD(&nfit_memdev->list);
memcpy(nfit_memdev->memdev, memdev, sizeof(*memdev)); memcpy(nfit_memdev->memdev, memdev, sizeof(*memdev));
list_add_tail(&nfit_memdev->list, &acpi_desc->memdevs); list_add_tail(&nfit_memdev->list, &acpi_desc->memdevs);
dev_dbg(dev, "%s: memdev handle: %#x spa: %d dcr: %d flags: %#x\n", dev_dbg(dev, "memdev handle: %#x spa: %d dcr: %d flags: %#x\n",
__func__, memdev->device_handle, memdev->range_index, memdev->device_handle, memdev->range_index,
memdev->region_index, memdev->flags); memdev->region_index, memdev->flags);
return true; return true;
} }
@ -727,7 +726,7 @@ static bool add_dcr(struct acpi_nfit_desc *acpi_desc,
INIT_LIST_HEAD(&nfit_dcr->list); INIT_LIST_HEAD(&nfit_dcr->list);
memcpy(nfit_dcr->dcr, dcr, sizeof_dcr(dcr)); memcpy(nfit_dcr->dcr, dcr, sizeof_dcr(dcr));
list_add_tail(&nfit_dcr->list, &acpi_desc->dcrs); list_add_tail(&nfit_dcr->list, &acpi_desc->dcrs);
dev_dbg(dev, "%s: dcr index: %d windows: %d\n", __func__, dev_dbg(dev, "dcr index: %d windows: %d\n",
dcr->region_index, dcr->windows); dcr->region_index, dcr->windows);
return true; return true;
} }
@ -754,7 +753,7 @@ static bool add_bdw(struct acpi_nfit_desc *acpi_desc,
INIT_LIST_HEAD(&nfit_bdw->list); INIT_LIST_HEAD(&nfit_bdw->list);
memcpy(nfit_bdw->bdw, bdw, sizeof(*bdw)); memcpy(nfit_bdw->bdw, bdw, sizeof(*bdw));
list_add_tail(&nfit_bdw->list, &acpi_desc->bdws); list_add_tail(&nfit_bdw->list, &acpi_desc->bdws);
dev_dbg(dev, "%s: bdw dcr: %d windows: %d\n", __func__, dev_dbg(dev, "bdw dcr: %d windows: %d\n",
bdw->region_index, bdw->windows); bdw->region_index, bdw->windows);
return true; return true;
} }
@ -793,7 +792,7 @@ static bool add_idt(struct acpi_nfit_desc *acpi_desc,
INIT_LIST_HEAD(&nfit_idt->list); INIT_LIST_HEAD(&nfit_idt->list);
memcpy(nfit_idt->idt, idt, sizeof_idt(idt)); memcpy(nfit_idt->idt, idt, sizeof_idt(idt));
list_add_tail(&nfit_idt->list, &acpi_desc->idts); list_add_tail(&nfit_idt->list, &acpi_desc->idts);
dev_dbg(dev, "%s: idt index: %d num_lines: %d\n", __func__, dev_dbg(dev, "idt index: %d num_lines: %d\n",
idt->interleave_index, idt->line_count); idt->interleave_index, idt->line_count);
return true; return true;
} }
@ -833,7 +832,7 @@ static bool add_flush(struct acpi_nfit_desc *acpi_desc,
INIT_LIST_HEAD(&nfit_flush->list); INIT_LIST_HEAD(&nfit_flush->list);
memcpy(nfit_flush->flush, flush, sizeof_flush(flush)); memcpy(nfit_flush->flush, flush, sizeof_flush(flush));
list_add_tail(&nfit_flush->list, &acpi_desc->flushes); list_add_tail(&nfit_flush->list, &acpi_desc->flushes);
dev_dbg(dev, "%s: nfit_flush handle: %d hint_count: %d\n", __func__, dev_dbg(dev, "nfit_flush handle: %d hint_count: %d\n",
flush->device_handle, flush->hint_count); flush->device_handle, flush->hint_count);
return true; return true;
} }
@ -846,7 +845,7 @@ static bool add_platform_cap(struct acpi_nfit_desc *acpi_desc,
mask = (1 << (pcap->highest_capability + 1)) - 1; mask = (1 << (pcap->highest_capability + 1)) - 1;
acpi_desc->platform_cap = pcap->capabilities & mask; acpi_desc->platform_cap = pcap->capabilities & mask;
dev_dbg(dev, "%s: cap: %#x\n", __func__, acpi_desc->platform_cap); dev_dbg(dev, "cap: %#x\n", acpi_desc->platform_cap);
return true; return true;
} }
@ -893,7 +892,7 @@ static void *add_table(struct acpi_nfit_desc *acpi_desc,
return err; return err;
break; break;
case ACPI_NFIT_TYPE_SMBIOS: case ACPI_NFIT_TYPE_SMBIOS:
dev_dbg(dev, "%s: smbios\n", __func__); dev_dbg(dev, "smbios\n");
break; break;
case ACPI_NFIT_TYPE_CAPABILITIES: case ACPI_NFIT_TYPE_CAPABILITIES:
if (!add_platform_cap(acpi_desc, table)) if (!add_platform_cap(acpi_desc, table))
@ -1621,7 +1620,7 @@ void __acpi_nvdimm_notify(struct device *dev, u32 event)
struct nfit_mem *nfit_mem; struct nfit_mem *nfit_mem;
struct acpi_nfit_desc *acpi_desc; struct acpi_nfit_desc *acpi_desc;
dev_dbg(dev->parent, "%s: %s: event: %d\n", dev_name(dev), __func__, dev_dbg(dev->parent, "%s: event: %d\n", dev_name(dev),
event); event);
if (event != NFIT_NOTIFY_DIMM_HEALTH) { if (event != NFIT_NOTIFY_DIMM_HEALTH) {
@ -2338,7 +2337,7 @@ static int acpi_nfit_blk_region_enable(struct nvdimm_bus *nvdimm_bus,
nvdimm = nd_blk_region_to_dimm(ndbr); nvdimm = nd_blk_region_to_dimm(ndbr);
nfit_mem = nvdimm_provider_data(nvdimm); nfit_mem = nvdimm_provider_data(nvdimm);
if (!nfit_mem || !nfit_mem->dcr || !nfit_mem->bdw) { if (!nfit_mem || !nfit_mem->dcr || !nfit_mem->bdw) {
dev_dbg(dev, "%s: missing%s%s%s\n", __func__, dev_dbg(dev, "missing%s%s%s\n",
nfit_mem ? "" : " nfit_mem", nfit_mem ? "" : " nfit_mem",
(nfit_mem && nfit_mem->dcr) ? "" : " dcr", (nfit_mem && nfit_mem->dcr) ? "" : " dcr",
(nfit_mem && nfit_mem->bdw) ? "" : " bdw"); (nfit_mem && nfit_mem->bdw) ? "" : " bdw");
@ -2357,7 +2356,7 @@ static int acpi_nfit_blk_region_enable(struct nvdimm_bus *nvdimm_bus,
mmio->addr.base = devm_nvdimm_memremap(dev, nfit_mem->spa_bdw->address, mmio->addr.base = devm_nvdimm_memremap(dev, nfit_mem->spa_bdw->address,
nfit_mem->spa_bdw->length, nd_blk_memremap_flags(ndbr)); nfit_mem->spa_bdw->length, nd_blk_memremap_flags(ndbr));
if (!mmio->addr.base) { if (!mmio->addr.base) {
dev_dbg(dev, "%s: %s failed to map bdw\n", __func__, dev_dbg(dev, "%s failed to map bdw\n",
nvdimm_name(nvdimm)); nvdimm_name(nvdimm));
return -ENOMEM; return -ENOMEM;
} }
@ -2368,8 +2367,8 @@ static int acpi_nfit_blk_region_enable(struct nvdimm_bus *nvdimm_bus,
rc = nfit_blk_init_interleave(mmio, nfit_mem->idt_bdw, rc = nfit_blk_init_interleave(mmio, nfit_mem->idt_bdw,
nfit_mem->memdev_bdw->interleave_ways); nfit_mem->memdev_bdw->interleave_ways);
if (rc) { if (rc) {
dev_dbg(dev, "%s: %s failed to init bdw interleave\n", dev_dbg(dev, "%s failed to init bdw interleave\n",
__func__, nvdimm_name(nvdimm)); nvdimm_name(nvdimm));
return rc; return rc;
} }
@ -2380,7 +2379,7 @@ static int acpi_nfit_blk_region_enable(struct nvdimm_bus *nvdimm_bus,
mmio->addr.base = devm_nvdimm_ioremap(dev, nfit_mem->spa_dcr->address, mmio->addr.base = devm_nvdimm_ioremap(dev, nfit_mem->spa_dcr->address,
nfit_mem->spa_dcr->length); nfit_mem->spa_dcr->length);
if (!mmio->addr.base) { if (!mmio->addr.base) {
dev_dbg(dev, "%s: %s failed to map dcr\n", __func__, dev_dbg(dev, "%s failed to map dcr\n",
nvdimm_name(nvdimm)); nvdimm_name(nvdimm));
return -ENOMEM; return -ENOMEM;
} }
@ -2391,15 +2390,15 @@ static int acpi_nfit_blk_region_enable(struct nvdimm_bus *nvdimm_bus,
rc = nfit_blk_init_interleave(mmio, nfit_mem->idt_dcr, rc = nfit_blk_init_interleave(mmio, nfit_mem->idt_dcr,
nfit_mem->memdev_dcr->interleave_ways); nfit_mem->memdev_dcr->interleave_ways);
if (rc) { if (rc) {
dev_dbg(dev, "%s: %s failed to init dcr interleave\n", dev_dbg(dev, "%s failed to init dcr interleave\n",
__func__, nvdimm_name(nvdimm)); nvdimm_name(nvdimm));
return rc; return rc;
} }
rc = acpi_nfit_blk_get_flags(nd_desc, nvdimm, nfit_blk); rc = acpi_nfit_blk_get_flags(nd_desc, nvdimm, nfit_blk);
if (rc < 0) { if (rc < 0) {
dev_dbg(dev, "%s: %s failed get DIMM flags\n", dev_dbg(dev, "%s failed get DIMM flags\n",
__func__, nvdimm_name(nvdimm)); nvdimm_name(nvdimm));
return rc; return rc;
} }
@ -2655,8 +2654,7 @@ static int acpi_nfit_register_region(struct acpi_nfit_desc *acpi_desc,
return 0; return 0;
if (spa->range_index == 0 && !nfit_spa_is_virtual(spa)) { if (spa->range_index == 0 && !nfit_spa_is_virtual(spa)) {
dev_dbg(acpi_desc->dev, "%s: detected invalid spa index\n", dev_dbg(acpi_desc->dev, "detected invalid spa index\n");
__func__);
return 0; return 0;
} }
@ -3142,8 +3140,7 @@ int acpi_nfit_init(struct acpi_nfit_desc *acpi_desc, void *data, acpi_size sz)
data = add_table(acpi_desc, &prev, data, end); data = add_table(acpi_desc, &prev, data, end);
if (IS_ERR(data)) { if (IS_ERR(data)) {
dev_dbg(dev, "%s: nfit table parsing error: %ld\n", __func__, dev_dbg(dev, "nfit table parsing error: %ld\n", PTR_ERR(data));
PTR_ERR(data));
rc = PTR_ERR(data); rc = PTR_ERR(data);
goto out_unlock; goto out_unlock;
} }
@ -3259,7 +3256,7 @@ int acpi_nfit_ars_rescan(struct acpi_nfit_desc *acpi_desc, u8 flags)
} }
acpi_desc->ars_start_flags = flags; acpi_desc->ars_start_flags = flags;
queue_work(nfit_wq, &acpi_desc->work); queue_work(nfit_wq, &acpi_desc->work);
dev_dbg(dev, "%s: ars_scan triggered\n", __func__); dev_dbg(dev, "ars_scan triggered\n");
mutex_unlock(&acpi_desc->init_mutex); mutex_unlock(&acpi_desc->init_mutex);
return 0; return 0;
@ -3366,8 +3363,8 @@ static int acpi_nfit_add(struct acpi_device *adev)
rc = acpi_nfit_init(acpi_desc, obj->buffer.pointer, rc = acpi_nfit_init(acpi_desc, obj->buffer.pointer,
obj->buffer.length); obj->buffer.length);
else else
dev_dbg(dev, "%s invalid type %d, ignoring _FIT\n", dev_dbg(dev, "invalid type %d, ignoring _FIT\n",
__func__, (int) obj->type); (int) obj->type);
kfree(buf.pointer); kfree(buf.pointer);
} else } else
/* skip over the lead-in header table */ /* skip over the lead-in header table */
@ -3396,7 +3393,7 @@ static void acpi_nfit_update_notify(struct device *dev, acpi_handle handle)
if (!dev->driver) { if (!dev->driver) {
/* dev->driver may be null if we're being removed */ /* dev->driver may be null if we're being removed */
dev_dbg(dev, "%s: no driver found for dev\n", __func__); dev_dbg(dev, "no driver found for dev\n");
return; return;
} }
@ -3442,7 +3439,7 @@ static void acpi_nfit_uc_error_notify(struct device *dev, acpi_handle handle)
void __acpi_nfit_notify(struct device *dev, acpi_handle handle, u32 event) void __acpi_nfit_notify(struct device *dev, acpi_handle handle, u32 event)
{ {
dev_dbg(dev, "%s: event: 0x%x\n", __func__, event); dev_dbg(dev, "event: 0x%x\n", event);
switch (event) { switch (event) {
case NFIT_NOTIFY_UPDATE: case NFIT_NOTIFY_UPDATE:

View file

@ -51,9 +51,8 @@ static int nfit_handle_mce(struct notifier_block *nb, unsigned long val,
if ((spa->address + spa->length - 1) < mce->addr) if ((spa->address + spa->length - 1) < mce->addr)
continue; continue;
found_match = 1; found_match = 1;
dev_dbg(dev, "%s: addr in SPA %d (0x%llx, 0x%llx)\n", dev_dbg(dev, "addr in SPA %d (0x%llx, 0x%llx)\n",
__func__, spa->range_index, spa->address, spa->range_index, spa->address, spa->length);
spa->length);
/* /*
* We can break at the first match because we're going * We can break at the first match because we're going
* to rescan all the SPA ranges. There shouldn't be any * to rescan all the SPA ranges. There shouldn't be any