Date: Mon, 17 Jun 2019 11:30:23 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 238660] ocs_fs: replace device_printf with ocs_log_debug Message-ID: <bug-238660-227@https.bugs.freebsd.org/bugzilla/>
index | next in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238660 Bug ID: 238660 Summary: ocs_fs: replace device_printf with ocs_log_debug Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: huangfq.daxian@gmail.com Created attachment 205178 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=205178&action=edit The patch file Avoid print kernel pointer directly by device_printf. Use ocs_log_debug instead. The pointer is only printed out at a certain debug level. diff --git a/sys/dev/ocs_fc/ocs_ioctl.c b/sys/dev/ocs_fc/ocs_ioctl.c index 70e1a99c1d3..5c67a1a282c 100644 --- a/sys/dev/ocs_fc/ocs_ioctl.c +++ b/sys/dev/ocs_fc/ocs_ioctl.c @@ -168,7 +168,7 @@ ocs_process_sli_config (ocs_t *ocs, ocs_ioctl_elxu_mbox_t *mcmd, ocs_dma_t *dma) case SLI4_OPC_COMMON_READ_TRANSCEIVER_DATA: break; default: - device_printf(ocs->dev, "%s: in=%p (%lld) out=%p (%lld)\n", __func__, + ocs_log_debug(ocs, "%s: in=%p (%lld) out=%p (%lld)\n", __func__, (void *)(uintptr_t)mcmd->in_addr, (unsigned long long)mcmd->in_bytes, (void *)(uintptr_t)mcmd->out_addr, (unsigned long long)mcmd->out_bytes); device_printf(ocs->dev, "%s: unknown (opc=%#x)\n", __func__, -- You are receiving this mail because: You are the assignee for the bug.help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-238660-227>
