Re: [PATCH] acpi, nfit: remove redundant __func__ in dev_dbg
On Tue, Mar 06, 2018 at 08:52:21AM -0800, Dan Williams wrote: > > Oh, Johannes I noticed that here is one stray one still in > > drivers/acpi/nfit/mce.c. Do you mind pulling it into your patch to keep the > > drivers/acpi/nfit/* changes together? > > I'll fix this locally. Sorry for the late response, I was some days off. Thanks Dan, Johannes -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850 ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm
Re: [PATCH] acpi, nfit: remove redundant __func__ in dev_dbg
On Mon, Mar 5, 2018 at 8:06 PM, Ross Zwisler wrote: > On Fri, Mar 02, 2018 at 01:20:49PM +0100, Johannes Thumshirn wrote: >> 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 > > Oh, Johannes I noticed that here is one stray one still in > drivers/acpi/nfit/mce.c. Do you mind pulling it into your patch to keep the > drivers/acpi/nfit/* changes together? I'll fix this locally. ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm
Re: [PATCH] acpi, nfit: remove redundant __func__ in dev_dbg
On Fri, Mar 02, 2018 at 01:20:49PM +0100, Johannes Thumshirn wrote: > 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 Oh, Johannes I noticed that here is one stray one still in drivers/acpi/nfit/mce.c. Do you mind pulling it into your patch to keep the drivers/acpi/nfit/* changes together? ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm
Re: [PATCH] acpi, nfit: remove redundant __func__ in dev_dbg
On Fri, Mar 02, 2018 at 01:20:49PM +0100, Johannes Thumshirn wrote: > 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 I looked through this and this all looked right to me. Reviewed-by: Ross Zwisler ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm
Re: [PATCH] acpi, nfit: remove redundant __func__ in dev_dbg
On Mon, Mar 5, 2018 at 10:01 AM, Ross Zwisler wrote: > On Mon, Mar 05, 2018 at 09:53:47AM -0800, Dan Williams wrote: >> On Mon, Mar 5, 2018 at 9:49 AM, Ross Zwisler >> wrote: >> > On Fri, Mar 02, 2018 at 01:20:49PM +0100, Johannes Thumshirn wrote: >> >> 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 >> > >> > This makes sense to me, but I guess we'll see what Dan thinks. If we >> > decide >> > to go this route we may also want to do the same to all the instances of >> > this >> > pattern in the libnvdimm debug output. >> >> Is there a way to turn on this '+f' flag from the kernel boot command >> line? My primary debug scenario is specifying "libnvdimm.dyndbg >> nfit.dyndbg" on the command line. > > Yep, it's just: > > libnvdimm.dyndbg="+fp" Works for me, lets change this everywhere. ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm
Re: [PATCH] acpi, nfit: remove redundant __func__ in dev_dbg
On Mon, Mar 05, 2018 at 09:53:47AM -0800, Dan Williams wrote: > On Mon, Mar 5, 2018 at 9:49 AM, Ross Zwisler > wrote: > > On Fri, Mar 02, 2018 at 01:20:49PM +0100, Johannes Thumshirn wrote: > >> 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 > > > > This makes sense to me, but I guess we'll see what Dan thinks. If we decide > > to go this route we may also want to do the same to all the instances of > > this > > pattern in the libnvdimm debug output. > > Is there a way to turn on this '+f' flag from the kernel boot command > line? My primary debug scenario is specifying "libnvdimm.dyndbg > nfit.dyndbg" on the command line. Yep, it's just: libnvdimm.dyndbg="+fp" ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm
Re: [PATCH] acpi, nfit: remove redundant __func__ in dev_dbg
On Mon, Mar 5, 2018 at 9:49 AM, Ross Zwisler wrote: > On Fri, Mar 02, 2018 at 01:20:49PM +0100, Johannes Thumshirn wrote: >> 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 > > This makes sense to me, but I guess we'll see what Dan thinks. If we decide > to go this route we may also want to do the same to all the instances of this > pattern in the libnvdimm debug output. Is there a way to turn on this '+f' flag from the kernel boot command line? My primary debug scenario is specifying "libnvdimm.dyndbg nfit.dyndbg" on the command line. ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm
Re: [PATCH] acpi, nfit: remove redundant __func__ in dev_dbg
On Fri, Mar 02, 2018 at 01:20:49PM +0100, Johannes Thumshirn wrote: > 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 This makes sense to me, but I guess we'll see what Dan thinks. If we decide to go this route we may also want to do the same to all the instances of this pattern in the libnvdimm debug output. ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm
[PATCH] 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 --- drivers/acpi/nfit/core.c | 75 +++- 1 file changed, 36 insertions(+), 39 deletions(-) diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c index bbe48ad20886..39ad06143e78 100644 --- a/drivers/acpi/nfit/core.c +++ b/drivers/acpi/nfit/core.c @@ -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; } - dev_dbg(dev, "%s:%s cmd: %d: func: %d input length: %d\n", - __func__, dimm_name, cmd, func, in_buf.buffer.length); + dev_dbg(dev, "%s cmd: %d: func: %d input length: %d\n", + dimm_name, cmd, func, in_buf.buffer.length); print_hex_dump_debug("nvdimm in ", DUMP_PREFIX_OFFSET, 4, 4, in_buf.buffer.pointer, 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) { - dev_dbg(dev, "%s:%s _DSM failed cmd: %s\n", __func__, dimm_name, - cmd_name); + dev_dbg(dev, "%s _DSM failed cmd: %s\n", dimm_name, cmd_name); 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) { - dev_dbg(dev, "%s:%s unexpected output object type cmd: %s type: %d\n", - __func__, dimm_name, cmd_name, out_obj->type); + dev_dbg(dev, "%s unexpected output object type cmd: %s type: %d\n", + dimm_name, cmd_name, out_obj->type); rc = -EINVAL; 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); print_hex_dump_debug(cmd_name, DUMP_PREFIX_OFFSET, 4, 4, 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); if (offset + out_size > out_obj->buffer.length) { - dev_dbg(dev, "%s:%s output object underflow cmd: %s field: %d\n", - __func__, dimm_name, cmd_name, i); + dev_dbg(dev, "%s output object underflow cmd: %s field: %d\n", + dimm_name, cmd_name, i); break; } if (in_buf.buffer.length + offset + out_size > buf_len) { - dev_dbg(dev, "%s:%s output overrun cmd: %s field: %d\n", - __func__, dimm_name, cmd_name, i); + dev_dbg(dev, "%s output overrun cmd: %s field: %d\n", + dimm_name, cmd_name, i); rc = -ENXIO; goto out; } @@ -655,7 +654,7 @@ static bool add_spa(struct acpi_nfit_desc *acpi_desc, INIT_LIST_HEAD(&nfit_spa->list); memcpy(nfit_spa->spa, spa, sizeof(*spa)); 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_type_name(nfit_spa_type(spa))); return true; @@ -684,8 +683,8 @@ static bool add_memdev(struct acpi_nfit_desc *acpi_desc, INIT_LIST_HEAD(&nfit_memdev->list); memcpy(nfit_memdev->memdev, memdev, sizeof(*memdev)); list_add_tail(&nfit_memdev->list, &acpi_desc->memdevs); - dev_dbg(dev, "%s: memdev handle: %#x spa: %d dcr: %d flags: %#x\n", - __func__, memdev->device_handle, memdev->range_index, + dev_dbg(dev, "memdev handle: %#x spa: %d dcr: %d flags: %#x\n", + memdev->device_handle, memdev->range_index, memdev->region_index, memdev->flags); return true; } @@ -727,7 +726,7 @@ static bool add_dcr(struct acpi_nfit_desc *acpi_desc, INIT_LIST_HEAD(&nfit_dcr->list); memcpy(nfit_dcr->dcr, dcr, sizeof_dcr(dcr)); l