Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci Improve DDPRINTF for ixl(4)



details:   https://anonhg.NetBSD.org/src/rev/4d85577391c2
branches:  trunk
changeset: 847511:4d85577391c2
user:      yamaguchi <yamaguchi%NetBSD.org@localhost>
date:      Thu Dec 26 03:08:19 2019 +0000

description:
Improve DDPRINTF for ixl(4)

diffstat:

 sys/dev/pci/if_ixl.c |  15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diffs (29 lines):

diff -r 293c884de609 -r 4d85577391c2 sys/dev/pci/if_ixl.c
--- a/sys/dev/pci/if_ixl.c      Wed Dec 25 15:56:35 2019 +0000
+++ b/sys/dev/pci/if_ixl.c      Thu Dec 26 03:08:19 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_ixl.c,v 1.12 2019/12/20 02:19:27 yamaguchi Exp $    */
+/*     $NetBSD: if_ixl.c,v 1.13 2019/12/26 03:08:19 yamaguchi Exp $    */
 
 /*
  * Copyright (c) 2013-2015, Intel Corporation
@@ -594,11 +594,14 @@
 
 #define delaymsec(_x)  DELAY(1000 * (_x))
 #ifdef IXL_DEBUG
-#define DDPRINTF(sc, fmt, args...)     \
-do {                                   \
-       if (sc != NULL)                         \
-               device_printf(sc->sc_dev, "");  \
-       printf("%s:\t" fmt, __func__, ##args);  \
+#define DDPRINTF(sc, fmt, args...)                     \
+do {                                                   \
+       if ((sc) != NULL) {                             \
+               device_printf(                          \
+                   ((struct ixl_softc *)(sc))->sc_dev, \
+                   "");                                \
+       }                                               \
+       printf("%s:\t" fmt, __func__, ##args);          \
 } while (0)
 #else
 #define DDPRINTF(sc, fmt, args...)     __nothing



Home | Main Index | Thread Index | Old Index