Source-Changes-HG archive

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

[src/trunk]: src/sys/external/bsd/drm2/include drm: Mark variable as used onl...



details:   https://anonhg.NetBSD.org/src/rev/1085d59bcdc8
branches:  trunk
changeset: 1029006:1085d59bcdc8
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 12:42:06 2021 +0000

description:
drm: Mark variable as used only by trace point.

diffstat:

 sys/external/bsd/drm2/include/drm/drm_trace_netbsd.h |  8 +++++++-
 sys/external/bsd/drm2/include/i915_trace.h           |  4 ++--
 2 files changed, 9 insertions(+), 3 deletions(-)

diffs (38 lines):

diff -r 5f3651330e4e -r 1085d59bcdc8 sys/external/bsd/drm2/include/drm/drm_trace_netbsd.h
--- a/sys/external/bsd/drm2/include/drm/drm_trace_netbsd.h      Sun Dec 19 12:41:54 2021 +0000
+++ b/sys/external/bsd/drm2/include/drm/drm_trace_netbsd.h      Sun Dec 19 12:42:06 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: drm_trace_netbsd.h,v 1.1 2018/08/27 15:23:40 riastradh Exp $   */
+/*     $NetBSD: drm_trace_netbsd.h,v 1.2 2021/12/19 12:42:06 riastradh Exp $   */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -67,4 +67,10 @@
 #define        TRACE6(m,p,n,a,b,c,d,e,f)       SDT_PROBE6(sdt,m,p,n,a,b,c,d,e,f)
 #define        TRACE7(m,p,n,a,b,c,d,e,f,g)     SDT_PROBE7(sdt,m,p,n,a,b,c,d,e,f,g)
 
+#ifdef KDTRACE_HOOKS
+#define        __trace_used    /* empty */
+#else
+#define        __trace_used    __unused
+#endif
+
 #endif /* _LINUX_TRACEPOINT_H_ */
diff -r 5f3651330e4e -r 1085d59bcdc8 sys/external/bsd/drm2/include/i915_trace.h
--- a/sys/external/bsd/drm2/include/i915_trace.h        Sun Dec 19 12:41:54 2021 +0000
+++ b/sys/external/bsd/drm2/include/i915_trace.h        Sun Dec 19 12:42:06 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i915_trace.h,v 1.22 2021/12/19 11:49:12 riastradh Exp $        */
+/*     $NetBSD: i915_trace.h,v 1.23 2021/12/19 12:42:06 riastradh Exp $        */
 
 /*-
  * Copyright (c) 2013, 2018 The NetBSD Foundation, Inc.
@@ -262,7 +262,7 @@
 trace_i915_reg_rw(bool write, i915_reg_t reg, uint64_t value, size_t len,
     bool trace)
 {
-       uint32_t regoff = i915_mmio_reg_offset(reg);
+       uint32_t regoff __trace_used = i915_mmio_reg_offset(reg);
 
        if (!trace)
                return;



Home | Main Index | Thread Index | Old Index