Skip to content

Commit 7699a6a

Browse files
committed
acpi, nfit: kill ACPI_NFIT_DEBUG
Inevitably when one actually needs to debug a DSM issue it's on a distribution kernel that has CONFIG_ACPI_NFIT_DEBUG=n. The config symbol was only there to avoid the compile error due to the missing fallback for print_hex_dump_debug in the CONFIG_DYNAMIC_DEBUG=n case. That was fixed with commit cdf1744 "hexdump: do not print debug dumps for !CONFIG_DEBUG", so the config symbol can just be dropped. Cc: Joe Perches <joe@perches.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
1 parent 8d13c02 commit 7699a6a

File tree

2 files changed

+8
-25
lines changed

2 files changed

+8
-25
lines changed

drivers/acpi/nfit/Kconfig

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,3 @@ config ACPI_NFIT
1212

1313
To compile this driver as a module, choose M here:
1414
the module will be called nfit.
15-
16-
config ACPI_NFIT_DEBUG
17-
bool "NFIT DSM debug"
18-
depends on ACPI_NFIT
19-
depends on DYNAMIC_DEBUG
20-
default n
21-
help
22-
Enabling this option causes the nfit driver to dump the
23-
input and output buffers of _DSM operations on the ACPI0012
24-
device and its children. This can be very verbose, so leave
25-
it disabled unless you are debugging a hardware / firmware
26-
issue.

drivers/acpi/nfit/core.c

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -268,14 +268,11 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm,
268268
in_buf.buffer.length = call_pkg->nd_size_in;
269269
}
270270

271-
if (IS_ENABLED(CONFIG_ACPI_NFIT_DEBUG)) {
272-
dev_dbg(dev, "%s:%s cmd: %d: func: %d input length: %d\n",
273-
__func__, dimm_name, cmd, func,
274-
in_buf.buffer.length);
275-
print_hex_dump_debug("nvdimm in ", DUMP_PREFIX_OFFSET, 4, 4,
271+
dev_dbg(dev, "%s:%s cmd: %d: func: %d input length: %d\n",
272+
__func__, dimm_name, cmd, func, in_buf.buffer.length);
273+
print_hex_dump_debug("nvdimm in ", DUMP_PREFIX_OFFSET, 4, 4,
276274
in_buf.buffer.pointer,
277275
min_t(u32, 256, in_buf.buffer.length), true);
278-
}
279276

280277
out_obj = acpi_evaluate_dsm(handle, uuid, 1, func, &in_obj);
281278
if (!out_obj) {
@@ -307,13 +304,11 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm,
307304
goto out;
308305
}
309306

310-
if (IS_ENABLED(CONFIG_ACPI_NFIT_DEBUG)) {
311-
dev_dbg(dev, "%s:%s cmd: %s output length: %d\n", __func__,
312-
dimm_name, cmd_name, out_obj->buffer.length);
313-
print_hex_dump_debug(cmd_name, DUMP_PREFIX_OFFSET, 4,
314-
4, out_obj->buffer.pointer, min_t(u32, 128,
315-
out_obj->buffer.length), true);
316-
}
307+
dev_dbg(dev, "%s:%s cmd: %s output length: %d\n", __func__, dimm_name,
308+
cmd_name, out_obj->buffer.length);
309+
print_hex_dump_debug(cmd_name, DUMP_PREFIX_OFFSET, 4, 4,
310+
out_obj->buffer.pointer,
311+
min_t(u32, 128, out_obj->buffer.length), true);
317312

318313
for (i = 0, offset = 0; i < desc->out_num; i++) {
319314
u32 out_size = nd_cmd_out_size(nvdimm, cmd, desc, i, buf,

0 commit comments

Comments
 (0)