diff options
author | Joe Perches <joe@perches.com> | 2012-02-19 22:52:38 -0500 |
---|---|---|
committer | Joe Perches <joe@perches.com> | 2012-02-21 12:04:01 -0500 |
commit | 475be4d85a274d0961593db41cf85689db1d583c (patch) | |
tree | b2b8931eb747794730522c3cf1898e46948527b9 /drivers/isdn/hardware/eicon/debuglib.c | |
parent | 0b0a635f79f91f3755b6518627ea06dd0dbfd523 (diff) |
isdn: whitespace coding style cleanup
isdn source code uses a not-current coding style.
Update the coding style used on a per-line basis
so that git diff -w shows only elided blank lines
at EOF.
Done with emacs and some scripts and some typing.
Built x86 allyesconfig.
No detected change in objdump -d or size.
Signed-off-by: Joe Perches <joe@perches.com>
Diffstat (limited to 'drivers/isdn/hardware/eicon/debuglib.c')
-rw-r--r-- | drivers/isdn/hardware/eicon/debuglib.c | 176 |
1 files changed, 88 insertions, 88 deletions
diff --git a/drivers/isdn/hardware/eicon/debuglib.c b/drivers/isdn/hardware/eicon/debuglib.c index e39c5c1f623e..d5b1092a54f0 100644 --- a/drivers/isdn/hardware/eicon/debuglib.c +++ b/drivers/isdn/hardware/eicon/debuglib.c | |||
@@ -1,26 +1,26 @@ | |||
1 | 1 | ||
2 | /* | 2 | /* |
3 | * | 3 | * |
4 | Copyright (c) Eicon Networks, 2002. | 4 | Copyright (c) Eicon Networks, 2002. |
5 | * | 5 | * |
6 | This source file is supplied for the use with | 6 | This source file is supplied for the use with |
7 | Eicon Networks range of DIVA Server Adapters. | 7 | Eicon Networks range of DIVA Server Adapters. |
8 | * | 8 | * |
9 | Eicon File Revision : 2.1 | 9 | Eicon File Revision : 2.1 |
10 | * | 10 | * |
11 | This program is free software; you can redistribute it and/or modify | 11 | This program is free software; you can redistribute it and/or modify |
12 | it under the terms of the GNU General Public License as published by | 12 | it under the terms of the GNU General Public License as published by |
13 | the Free Software Foundation; either version 2, or (at your option) | 13 | the Free Software Foundation; either version 2, or (at your option) |
14 | any later version. | 14 | any later version. |
15 | * | 15 | * |
16 | This program is distributed in the hope that it will be useful, | 16 | This program is distributed in the hope that it will be useful, |
17 | but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY | 17 | but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY |
18 | implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 18 | implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
19 | See the GNU General Public License for more details. | 19 | See the GNU General Public License for more details. |
20 | * | 20 | * |
21 | You should have received a copy of the GNU General Public License | 21 | You should have received a copy of the GNU General Public License |
22 | along with this program; if not, write to the Free Software | 22 | along with this program; if not, write to the Free Software |
23 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 23 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
24 | * | 24 | * |
25 | */ | 25 | */ |
26 | 26 | ||
@@ -29,35 +29,35 @@ | |||
29 | #ifdef DIVA_NO_DEBUGLIB | 29 | #ifdef DIVA_NO_DEBUGLIB |
30 | static DIVA_DI_PRINTF dprintf; | 30 | static DIVA_DI_PRINTF dprintf; |
31 | #else /* DIVA_NO_DEBUGLIB */ | 31 | #else /* DIVA_NO_DEBUGLIB */ |
32 | 32 | ||
33 | _DbgHandle_ myDriverDebugHandle = { 0 /*!Registered*/, DBG_HANDLE_VERSION }; | 33 | _DbgHandle_ myDriverDebugHandle = { 0 /*!Registered*/, DBG_HANDLE_VERSION }; |
34 | DIVA_DI_PRINTF dprintf = no_printf; | 34 | DIVA_DI_PRINTF dprintf = no_printf; |
35 | /*****************************************************************************/ | 35 | /*****************************************************************************/ |
36 | #define DBG_FUNC(name) \ | 36 | #define DBG_FUNC(name) \ |
37 | void \ | 37 | void \ |
38 | myDbgPrint_##name (char *format, ...) \ | 38 | myDbgPrint_##name(char *format, ...) \ |
39 | { va_list ap ; \ | 39 | { va_list ap; \ |
40 | if ( myDriverDebugHandle.dbg_prt ) \ | 40 | if (myDriverDebugHandle.dbg_prt) \ |
41 | { va_start (ap, format) ; \ | 41 | { va_start(ap, format); \ |
42 | (myDriverDebugHandle.dbg_prt) \ | 42 | (myDriverDebugHandle.dbg_prt) \ |
43 | (myDriverDebugHandle.id, DLI_##name, format, ap) ; \ | 43 | (myDriverDebugHandle.id, DLI_##name, format, ap); \ |
44 | va_end (ap) ; \ | 44 | va_end(ap); \ |
45 | } } | 45 | } } |
46 | DBG_FUNC(LOG) | 46 | DBG_FUNC(LOG) |
47 | DBG_FUNC(FTL) | 47 | DBG_FUNC(FTL) |
48 | DBG_FUNC(ERR) | 48 | DBG_FUNC(ERR) |
49 | DBG_FUNC(TRC) | 49 | DBG_FUNC(TRC) |
50 | DBG_FUNC(MXLOG) | 50 | DBG_FUNC(MXLOG) |
51 | DBG_FUNC(FTL_MXLOG) | 51 | DBG_FUNC(FTL_MXLOG) |
52 | void | 52 | void |
53 | myDbgPrint_EVL (long msgID, ...) | 53 | myDbgPrint_EVL(long msgID, ...) |
54 | { va_list ap ; | 54 | { va_list ap; |
55 | if ( myDriverDebugHandle.dbg_ev ) | 55 | if (myDriverDebugHandle.dbg_ev) |
56 | { va_start (ap, msgID) ; | 56 | { va_start(ap, msgID); |
57 | (myDriverDebugHandle.dbg_ev) | 57 | (myDriverDebugHandle.dbg_ev) |
58 | (myDriverDebugHandle.id, (unsigned long)msgID, ap) ; | 58 | (myDriverDebugHandle.id, (unsigned long)msgID, ap); |
59 | va_end (ap) ; | 59 | va_end(ap); |
60 | } } | 60 | } } |
61 | DBG_FUNC(REG) | 61 | DBG_FUNC(REG) |
62 | DBG_FUNC(MEM) | 62 | DBG_FUNC(MEM) |
63 | DBG_FUNC(SPL) | 63 | DBG_FUNC(SPL) |
@@ -76,81 +76,81 @@ DBG_FUNC(PRV2) | |||
76 | DBG_FUNC(PRV3) | 76 | DBG_FUNC(PRV3) |
77 | /*****************************************************************************/ | 77 | /*****************************************************************************/ |
78 | int | 78 | int |
79 | DbgRegister (char *drvName, char *drvTag, unsigned long dbgMask) | 79 | DbgRegister(char *drvName, char *drvTag, unsigned long dbgMask) |
80 | { | 80 | { |
81 | int len; | 81 | int len; |
82 | /* | 82 | /* |
83 | * deregister (if already registered) and zero out myDriverDebugHandle | 83 | * deregister (if already registered) and zero out myDriverDebugHandle |
84 | */ | 84 | */ |
85 | DbgDeregister () ; | 85 | DbgDeregister(); |
86 | /* | 86 | /* |
87 | * initialize the debug handle | 87 | * initialize the debug handle |
88 | */ | 88 | */ |
89 | myDriverDebugHandle.Version = DBG_HANDLE_VERSION ; | 89 | myDriverDebugHandle.Version = DBG_HANDLE_VERSION; |
90 | myDriverDebugHandle.id = -1 ; | 90 | myDriverDebugHandle.id = -1; |
91 | myDriverDebugHandle.dbgMask = dbgMask | (DL_EVL | DL_FTL | DL_LOG) ; | 91 | myDriverDebugHandle.dbgMask = dbgMask | (DL_EVL | DL_FTL | DL_LOG); |
92 | len = strlen (drvName) ; | 92 | len = strlen(drvName); |
93 | memcpy (myDriverDebugHandle.drvName, drvName, | 93 | memcpy(myDriverDebugHandle.drvName, drvName, |
94 | (len < sizeof(myDriverDebugHandle.drvName)) ? | 94 | (len < sizeof(myDriverDebugHandle.drvName)) ? |
95 | len : sizeof(myDriverDebugHandle.drvName) - 1) ; | 95 | len : sizeof(myDriverDebugHandle.drvName) - 1); |
96 | len = strlen (drvTag) ; | 96 | len = strlen(drvTag); |
97 | memcpy (myDriverDebugHandle.drvTag, drvTag, | 97 | memcpy(myDriverDebugHandle.drvTag, drvTag, |
98 | (len < sizeof(myDriverDebugHandle.drvTag)) ? | 98 | (len < sizeof(myDriverDebugHandle.drvTag)) ? |
99 | len : sizeof(myDriverDebugHandle.drvTag) - 1) ; | 99 | len : sizeof(myDriverDebugHandle.drvTag) - 1); |
100 | /* | 100 | /* |
101 | * Try to register debugging via old (and only) interface | 101 | * Try to register debugging via old (and only) interface |
102 | */ | 102 | */ |
103 | dprintf("\000\377", &myDriverDebugHandle) ; | 103 | dprintf("\000\377", &myDriverDebugHandle); |
104 | if ( myDriverDebugHandle.dbg_prt ) | 104 | if (myDriverDebugHandle.dbg_prt) |
105 | { | 105 | { |
106 | return (1) ; | 106 | return (1); |
107 | } | 107 | } |
108 | /* | 108 | /* |
109 | * Check if we registered with an old maint driver (see debuglib.h) | 109 | * Check if we registered with an old maint driver (see debuglib.h) |
110 | */ | 110 | */ |
111 | if ( myDriverDebugHandle.dbg_end != NULL | 111 | if (myDriverDebugHandle.dbg_end != NULL |
112 | /* location of 'dbg_prt' in _OldDbgHandle_ struct */ | 112 | /* location of 'dbg_prt' in _OldDbgHandle_ struct */ |
113 | && (myDriverDebugHandle.regTime.LowPart || | 113 | && (myDriverDebugHandle.regTime.LowPart || |
114 | myDriverDebugHandle.regTime.HighPart ) ) | 114 | myDriverDebugHandle.regTime.HighPart)) |
115 | /* same location as in _OldDbgHandle_ struct */ | 115 | /* same location as in _OldDbgHandle_ struct */ |
116 | { | 116 | { |
117 | dprintf("%s: Cannot log to old maint driver !", drvName) ; | 117 | dprintf("%s: Cannot log to old maint driver !", drvName); |
118 | myDriverDebugHandle.dbg_end = | 118 | myDriverDebugHandle.dbg_end = |
119 | ((_OldDbgHandle_ *)&myDriverDebugHandle)->dbg_end ; | 119 | ((_OldDbgHandle_ *)&myDriverDebugHandle)->dbg_end; |
120 | DbgDeregister () ; | 120 | DbgDeregister(); |
121 | } | 121 | } |
122 | return (0) ; | 122 | return (0); |
123 | } | 123 | } |
124 | /*****************************************************************************/ | 124 | /*****************************************************************************/ |
125 | void | 125 | void |
126 | DbgSetLevel (unsigned long dbgMask) | 126 | DbgSetLevel(unsigned long dbgMask) |
127 | { | 127 | { |
128 | myDriverDebugHandle.dbgMask = dbgMask | (DL_EVL | DL_FTL | DL_LOG) ; | 128 | myDriverDebugHandle.dbgMask = dbgMask | (DL_EVL | DL_FTL | DL_LOG); |
129 | } | 129 | } |
130 | /*****************************************************************************/ | 130 | /*****************************************************************************/ |
131 | void | 131 | void |
132 | DbgDeregister (void) | 132 | DbgDeregister(void) |
133 | { | 133 | { |
134 | if ( myDriverDebugHandle.dbg_end ) | 134 | if (myDriverDebugHandle.dbg_end) |
135 | { | 135 | { |
136 | (myDriverDebugHandle.dbg_end)(&myDriverDebugHandle) ; | 136 | (myDriverDebugHandle.dbg_end)(&myDriverDebugHandle); |
137 | } | 137 | } |
138 | memset (&myDriverDebugHandle, 0, sizeof(myDriverDebugHandle)) ; | 138 | memset(&myDriverDebugHandle, 0, sizeof(myDriverDebugHandle)); |
139 | } | 139 | } |
140 | void xdi_dbg_xlog (char* x, ...) { | 140 | void xdi_dbg_xlog(char *x, ...) { |
141 | va_list ap; | 141 | va_list ap; |
142 | va_start (ap, x); | 142 | va_start(ap, x); |
143 | if (myDriverDebugHandle.dbg_end && | 143 | if (myDriverDebugHandle.dbg_end && |
144 | (myDriverDebugHandle.dbg_irq || myDriverDebugHandle.dbg_old) && | 144 | (myDriverDebugHandle.dbg_irq || myDriverDebugHandle.dbg_old) && |
145 | (myDriverDebugHandle.dbgMask & DL_STAT)) { | 145 | (myDriverDebugHandle.dbgMask & DL_STAT)) { |
146 | if (myDriverDebugHandle.dbg_irq) { | 146 | if (myDriverDebugHandle.dbg_irq) { |
147 | (*(myDriverDebugHandle.dbg_irq))(myDriverDebugHandle.id, | 147 | (*(myDriverDebugHandle.dbg_irq))(myDriverDebugHandle.id, |
148 | (x[0] != 0) ? DLI_TRC : DLI_XLOG, x, ap); | 148 | (x[0] != 0) ? DLI_TRC : DLI_XLOG, x, ap); |
149 | } else { | 149 | } else { |
150 | (*(myDriverDebugHandle.dbg_old))(myDriverDebugHandle.id, x, ap); | 150 | (*(myDriverDebugHandle.dbg_old))(myDriverDebugHandle.id, x, ap); |
151 | } | 151 | } |
152 | } | 152 | } |
153 | va_end(ap); | 153 | va_end(ap); |
154 | } | 154 | } |
155 | /*****************************************************************************/ | 155 | /*****************************************************************************/ |
156 | #endif /* DIVA_NO_DEBUGLIB */ | 156 | #endif /* DIVA_NO_DEBUGLIB */ |