Print this page
10686 Debug macros causes smatch issues
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/common/sys/ib/clients/rds/rdsib_debug.h
+++ new/usr/src/uts/common/sys/ib/clients/rds/rdsib_debug.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
↓ open down ↓ |
15 lines elided |
↑ open up ↑ |
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21 /*
22 22 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
23 23 * Use is subject to license terms.
24 24 */
25 25
26 +/*
27 + * Copyright 2019, Joyent, Inc.
28 + */
29 +
26 30 #ifndef _RDSIB_DEBUG_H
27 31 #define _RDSIB_DEBUG_H
28 32
29 -#pragma ident "%Z%%M% %I% %E% SMI"
30 -
31 33 #ifdef __cplusplus
32 34 extern "C" {
33 35 #endif
34 36
35 37 #define LABEL "RDS"
36 38
37 39 /*
38 40 * warnings, console & syslog buffer.
39 41 * For Non recoverable or Major Errors
40 42 */
41 43 #define RDS_LOG_L0 0
42 44
43 45 /*
44 46 * syslog buffer or RDS trace buffer (console if booted /w debug)
45 47 * For additional information on Non recoverable errors and
46 48 * warnings/informational message for sys-admin types.
47 49 */
48 50 #define RDS_LOG_L1 1
49 51
50 52 /*
51 53 * debug only
52 54 * for more verbose trace than L1, for e.g. recoverable errors,
53 55 * or intersting trace
54 56 */
55 57 #define RDS_LOG_L2 2
56 58
57 59 /*
58 60 * debug only
59 61 * for more verbose trace than L2, for e.g. informational messages
60 62 */
61 63 #define RDS_LOG_L3 3
62 64
63 65 /*
64 66 * debug only
65 67 * for more verbose trace than L3, for e.g. printing function entries...
66 68 */
67 69 #define RDS_LOG_L4 4
68 70
69 71 /*
70 72 * debug only
71 73 * most verbose level. Used only for excessive trace, for e.g.
72 74 * printing structures etc.
73 75 */
74 76 #define RDS_LOG_L5 5
75 77
76 78 /*
77 79 * debug only
78 80 * for messages from softints, taskqs, intr handlers, timeout handlers etc.
79 81 */
80 82 #define RDS_LOG_LINTR 6
81 83
82 84
83 85 #ifdef DEBUG
84 86 #define RDS_DPRINTF_INTR rds_dprintf_intr
85 87 #define RDS_DPRINTF5 rds_dprintf5
86 88 #define RDS_DPRINTF4 rds_dprintf4
87 89 #define RDS_DPRINTF3 rds_dprintf3
88 90
89 91 void rds_dprintf_intr(
90 92 char *name,
91 93 char *fmt, ...);
↓ open down ↓ |
51 lines elided |
↑ open up ↑ |
92 94 void rds_dprintf5(
93 95 char *name,
94 96 char *fmt, ...);
95 97 void rds_dprintf4(
96 98 char *name,
97 99 char *fmt, ...);
98 100 void rds_dprintf3(
99 101 char *name,
100 102 char *fmt, ...);
101 103 #else
102 -#define RDS_DPRINTF_INTR 0 &&
103 -#define RDS_DPRINTF5 0 &&
104 -#define RDS_DPRINTF4 0 &&
105 -#define RDS_DPRINTF3 0 &&
104 +#define RDS_DPRINTF_INTR(...)
105 +#define RDS_DPRINTF5(...)
106 +#define RDS_DPRINTF4(...)
107 +#define RDS_DPRINTF3(...)
106 108 #endif
107 109
108 110 #define RDS_DPRINTF2 rds_dprintf2
109 111 #define RDS_DPRINTF1 rds_dprintf1
110 112 #define RDS_DPRINTF0 rds_dprintf0
111 113
112 114 void rds_dprintf2(
113 115 char *name,
114 116 char *fmt, ...);
115 117 void rds_dprintf1(
116 118 char *name,
117 119 char *fmt, ...);
118 120 void rds_dprintf0(
119 121 char *name,
120 122 char *fmt, ...);
121 123
122 124 #ifdef __cplusplus
123 125 }
124 126 #endif
125 127
126 128 #endif /* _RDSIB_DEBUG_H */
↓ open down ↓ |
11 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX