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: b...@freebsd.org
          Reporter: huangfq.dax...@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.
_______________________________________________
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"

Reply via email to