aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hisax/fsm.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2012-02-19 22:52:38 -0500
committerJoe Perches <joe@perches.com>2012-02-21 12:04:01 -0500
commit475be4d85a274d0961593db41cf85689db1d583c (patch)
treeb2b8931eb747794730522c3cf1898e46948527b9 /drivers/isdn/hisax/fsm.c
parent0b0a635f79f91f3755b6518627ea06dd0dbfd523 (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/hisax/fsm.c')
-rw-r--r--drivers/isdn/hisax/fsm.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/drivers/isdn/hisax/fsm.c b/drivers/isdn/hisax/fsm.c
index 732ea633758c..1bb291021fdb 100644
--- a/drivers/isdn/hisax/fsm.c
+++ b/drivers/isdn/hisax/fsm.c
@@ -5,7 +5,7 @@
5 * Author Karsten Keil 5 * Author Karsten Keil
6 * Copyright by Karsten Keil <keil@isdn4linux.de> 6 * Copyright by Karsten Keil <keil@isdn4linux.de>
7 * by Kai Germaschewski <kai.germaschewski@gmx.de> 7 * by Kai Germaschewski <kai.germaschewski@gmx.de>
8 * 8 *
9 * This software may be used and distributed according to the terms 9 * This software may be used and distributed according to the terms
10 * of the GNU General Public License, incorporated herein by reference. 10 * of the GNU General Public License, incorporated herein by reference.
11 * 11 *
@@ -27,18 +27,18 @@ FsmNew(struct Fsm *fsm, struct FsmNode *fnlist, int fncount)
27 int i; 27 int i;
28 28
29 fsm->jumpmatrix = (FSMFNPTR *) 29 fsm->jumpmatrix = (FSMFNPTR *)
30 kzalloc(sizeof (FSMFNPTR) * fsm->state_count * fsm->event_count, GFP_KERNEL); 30 kzalloc(sizeof(FSMFNPTR) * fsm->state_count * fsm->event_count, GFP_KERNEL);
31 if (!fsm->jumpmatrix) 31 if (!fsm->jumpmatrix)
32 return -ENOMEM; 32 return -ENOMEM;
33 33
34 for (i = 0; i < fncount; i++) 34 for (i = 0; i < fncount; i++)
35 if ((fnlist[i].state>=fsm->state_count) || (fnlist[i].event>=fsm->event_count)) { 35 if ((fnlist[i].state >= fsm->state_count) || (fnlist[i].event >= fsm->event_count)) {
36 printk(KERN_ERR "FsmNew Error line %d st(%ld/%ld) ev(%ld/%ld)\n", 36 printk(KERN_ERR "FsmNew Error line %d st(%ld/%ld) ev(%ld/%ld)\n",
37 i,(long)fnlist[i].state,(long)fsm->state_count, 37 i, (long)fnlist[i].state, (long)fsm->state_count,
38 (long)fnlist[i].event,(long)fsm->event_count); 38 (long)fnlist[i].event, (long)fsm->event_count);
39 } else 39 } else
40 fsm->jumpmatrix[fsm->state_count * fnlist[i].event + 40 fsm->jumpmatrix[fsm->state_count * fnlist[i].event +
41 fnlist[i].state] = (FSMFNPTR) fnlist[i].routine; 41 fnlist[i].state] = (FSMFNPTR)fnlist[i].routine;
42 return 0; 42 return 0;
43} 43}
44 44
@@ -53,24 +53,24 @@ FsmEvent(struct FsmInst *fi, int event, void *arg)
53{ 53{
54 FSMFNPTR r; 54 FSMFNPTR r;
55 55
56 if ((fi->state>=fi->fsm->state_count) || (event >= fi->fsm->event_count)) { 56 if ((fi->state >= fi->fsm->state_count) || (event >= fi->fsm->event_count)) {
57 printk(KERN_ERR "FsmEvent Error st(%ld/%ld) ev(%d/%ld)\n", 57 printk(KERN_ERR "FsmEvent Error st(%ld/%ld) ev(%d/%ld)\n",
58 (long)fi->state,(long)fi->fsm->state_count,event,(long)fi->fsm->event_count); 58 (long)fi->state, (long)fi->fsm->state_count, event, (long)fi->fsm->event_count);
59 return(1); 59 return (1);
60 } 60 }
61 r = fi->fsm->jumpmatrix[fi->fsm->state_count * event + fi->state]; 61 r = fi->fsm->jumpmatrix[fi->fsm->state_count * event + fi->state];
62 if (r) { 62 if (r) {
63 if (fi->debug) 63 if (fi->debug)
64 fi->printdebug(fi, "State %s Event %s", 64 fi->printdebug(fi, "State %s Event %s",
65 fi->fsm->strState[fi->state], 65 fi->fsm->strState[fi->state],
66 fi->fsm->strEvent[event]); 66 fi->fsm->strEvent[event]);
67 r(fi, event, arg); 67 r(fi, event, arg);
68 return (0); 68 return (0);
69 } else { 69 } else {
70 if (fi->debug) 70 if (fi->debug)
71 fi->printdebug(fi, "State %s Event %s no routine", 71 fi->printdebug(fi, "State %s Event %s no routine",
72 fi->fsm->strState[fi->state], 72 fi->fsm->strState[fi->state],
73 fi->fsm->strEvent[event]); 73 fi->fsm->strEvent[event]);
74 return (!0); 74 return (!0);
75 } 75 }
76} 76}
@@ -81,7 +81,7 @@ FsmChangeState(struct FsmInst *fi, int newstate)
81 fi->state = newstate; 81 fi->state = newstate;
82 if (fi->debug) 82 if (fi->debug)
83 fi->printdebug(fi, "ChangeState %s", 83 fi->printdebug(fi, "ChangeState %s",
84 fi->fsm->strState[newstate]); 84 fi->fsm->strState[newstate]);
85} 85}
86 86
87static void 87static void
@@ -125,7 +125,7 @@ FsmAddTimer(struct FsmTimer *ft,
125#if FSM_TIMER_DEBUG 125#if FSM_TIMER_DEBUG
126 if (ft->fi->debug) 126 if (ft->fi->debug)
127 ft->fi->printdebug(ft->fi, "FsmAddTimer %lx %d %d", 127 ft->fi->printdebug(ft->fi, "FsmAddTimer %lx %d %d",
128 (long) ft, millisec, where); 128 (long) ft, millisec, where);
129#endif 129#endif
130 130
131 if (timer_pending(&ft->tl)) { 131 if (timer_pending(&ft->tl)) {
@@ -143,13 +143,13 @@ FsmAddTimer(struct FsmTimer *ft,
143 143
144void 144void
145FsmRestartTimer(struct FsmTimer *ft, 145FsmRestartTimer(struct FsmTimer *ft,
146 int millisec, int event, void *arg, int where) 146 int millisec, int event, void *arg, int where)
147{ 147{
148 148
149#if FSM_TIMER_DEBUG 149#if FSM_TIMER_DEBUG
150 if (ft->fi->debug) 150 if (ft->fi->debug)
151 ft->fi->printdebug(ft->fi, "FsmRestartTimer %lx %d %d", 151 ft->fi->printdebug(ft->fi, "FsmRestartTimer %lx %d %d",
152 (long) ft, millisec, where); 152 (long) ft, millisec, where);
153#endif 153#endif
154 154
155 if (timer_pending(&ft->tl)) 155 if (timer_pending(&ft->tl))