diff options
author | Corey Minyard <cminyard@mvista.com> | 2008-04-29 04:01:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-29 11:06:15 -0400 |
commit | c305e3d38e5f54a48a4618496cdc1ada970ebf68 (patch) | |
tree | e6c8a145dec75f27f87bd6759cd0504a104f4f0f /drivers/char/ipmi/ipmi_si_sm.h | |
parent | c70d749986f6f1d4e2bb008bfc0c5fc22ec3fc64 (diff) |
IPMI: Style fixes in the system interface code
Lots of style fixes for the IPMI system interface driver. No functional
changes. Basically fixes everything reported by checkpatch and fixes the
comment style.
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Cc: Rocky Craig <rocky.craig@hp.com>
Cc: Hannes Schulz <schulz@schwaar.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char/ipmi/ipmi_si_sm.h')
-rw-r--r-- | drivers/char/ipmi/ipmi_si_sm.h | 89 |
1 files changed, 54 insertions, 35 deletions
diff --git a/drivers/char/ipmi/ipmi_si_sm.h b/drivers/char/ipmi/ipmi_si_sm.h index 4b731b24dc16..df89f73475fb 100644 --- a/drivers/char/ipmi/ipmi_si_sm.h +++ b/drivers/char/ipmi/ipmi_si_sm.h | |||
@@ -34,22 +34,27 @@ | |||
34 | * 675 Mass Ave, Cambridge, MA 02139, USA. | 34 | * 675 Mass Ave, Cambridge, MA 02139, USA. |
35 | */ | 35 | */ |
36 | 36 | ||
37 | /* This is defined by the state machines themselves, it is an opaque | 37 | /* |
38 | data type for them to use. */ | 38 | * This is defined by the state machines themselves, it is an opaque |
39 | * data type for them to use. | ||
40 | */ | ||
39 | struct si_sm_data; | 41 | struct si_sm_data; |
40 | 42 | ||
41 | /* The structure for doing I/O in the state machine. The state | 43 | /* |
42 | machine doesn't have the actual I/O routines, they are done through | 44 | * The structure for doing I/O in the state machine. The state |
43 | this interface. */ | 45 | * machine doesn't have the actual I/O routines, they are done through |
44 | struct si_sm_io | 46 | * this interface. |
45 | { | 47 | */ |
48 | struct si_sm_io { | ||
46 | unsigned char (*inputb)(struct si_sm_io *io, unsigned int offset); | 49 | unsigned char (*inputb)(struct si_sm_io *io, unsigned int offset); |
47 | void (*outputb)(struct si_sm_io *io, | 50 | void (*outputb)(struct si_sm_io *io, |
48 | unsigned int offset, | 51 | unsigned int offset, |
49 | unsigned char b); | 52 | unsigned char b); |
50 | 53 | ||
51 | /* Generic info used by the actual handling routines, the | 54 | /* |
52 | state machine shouldn't touch these. */ | 55 | * Generic info used by the actual handling routines, the |
56 | * state machine shouldn't touch these. | ||
57 | */ | ||
53 | void __iomem *addr; | 58 | void __iomem *addr; |
54 | int regspacing; | 59 | int regspacing; |
55 | int regsize; | 60 | int regsize; |
@@ -59,53 +64,67 @@ struct si_sm_io | |||
59 | }; | 64 | }; |
60 | 65 | ||
61 | /* Results of SMI events. */ | 66 | /* Results of SMI events. */ |
62 | enum si_sm_result | 67 | enum si_sm_result { |
63 | { | ||
64 | SI_SM_CALL_WITHOUT_DELAY, /* Call the driver again immediately */ | 68 | SI_SM_CALL_WITHOUT_DELAY, /* Call the driver again immediately */ |
65 | SI_SM_CALL_WITH_DELAY, /* Delay some before calling again. */ | 69 | SI_SM_CALL_WITH_DELAY, /* Delay some before calling again. */ |
66 | SI_SM_CALL_WITH_TICK_DELAY, /* Delay at least 1 tick before calling again. */ | 70 | SI_SM_CALL_WITH_TICK_DELAY,/* Delay >=1 tick before calling again. */ |
67 | SI_SM_TRANSACTION_COMPLETE, /* A transaction is finished. */ | 71 | SI_SM_TRANSACTION_COMPLETE, /* A transaction is finished. */ |
68 | SI_SM_IDLE, /* The SM is in idle state. */ | 72 | SI_SM_IDLE, /* The SM is in idle state. */ |
69 | SI_SM_HOSED, /* The hardware violated the state machine. */ | 73 | SI_SM_HOSED, /* The hardware violated the state machine. */ |
70 | SI_SM_ATTN /* The hardware is asserting attn and the | 74 | |
71 | state machine is idle. */ | 75 | /* |
76 | * The hardware is asserting attn and the state machine is | ||
77 | * idle. | ||
78 | */ | ||
79 | SI_SM_ATTN | ||
72 | }; | 80 | }; |
73 | 81 | ||
74 | /* Handlers for the SMI state machine. */ | 82 | /* Handlers for the SMI state machine. */ |
75 | struct si_sm_handlers | 83 | struct si_sm_handlers { |
76 | { | 84 | /* |
77 | /* Put the version number of the state machine here so the | 85 | * Put the version number of the state machine here so the |
78 | upper layer can print it. */ | 86 | * upper layer can print it. |
87 | */ | ||
79 | char *version; | 88 | char *version; |
80 | 89 | ||
81 | /* Initialize the data and return the amount of I/O space to | 90 | /* |
82 | reserve for the space. */ | 91 | * Initialize the data and return the amount of I/O space to |
92 | * reserve for the space. | ||
93 | */ | ||
83 | unsigned int (*init_data)(struct si_sm_data *smi, | 94 | unsigned int (*init_data)(struct si_sm_data *smi, |
84 | struct si_sm_io *io); | 95 | struct si_sm_io *io); |
85 | 96 | ||
86 | /* Start a new transaction in the state machine. This will | 97 | /* |
87 | return -2 if the state machine is not idle, -1 if the size | 98 | * Start a new transaction in the state machine. This will |
88 | is invalid (to large or too small), or 0 if the transaction | 99 | * return -2 if the state machine is not idle, -1 if the size |
89 | is successfully completed. */ | 100 | * is invalid (to large or too small), or 0 if the transaction |
101 | * is successfully completed. | ||
102 | */ | ||
90 | int (*start_transaction)(struct si_sm_data *smi, | 103 | int (*start_transaction)(struct si_sm_data *smi, |
91 | unsigned char *data, unsigned int size); | 104 | unsigned char *data, unsigned int size); |
92 | 105 | ||
93 | /* Return the results after the transaction. This will return | 106 | /* |
94 | -1 if the buffer is too small, zero if no transaction is | 107 | * Return the results after the transaction. This will return |
95 | present, or the actual length of the result data. */ | 108 | * -1 if the buffer is too small, zero if no transaction is |
109 | * present, or the actual length of the result data. | ||
110 | */ | ||
96 | int (*get_result)(struct si_sm_data *smi, | 111 | int (*get_result)(struct si_sm_data *smi, |
97 | unsigned char *data, unsigned int length); | 112 | unsigned char *data, unsigned int length); |
98 | 113 | ||
99 | /* Call this periodically (for a polled interface) or upon | 114 | /* |
100 | receiving an interrupt (for a interrupt-driven interface). | 115 | * Call this periodically (for a polled interface) or upon |
101 | If interrupt driven, you should probably poll this | 116 | * receiving an interrupt (for a interrupt-driven interface). |
102 | periodically when not in idle state. This should be called | 117 | * If interrupt driven, you should probably poll this |
103 | with the time that passed since the last call, if it is | 118 | * periodically when not in idle state. This should be called |
104 | significant. Time is in microseconds. */ | 119 | * with the time that passed since the last call, if it is |
120 | * significant. Time is in microseconds. | ||
121 | */ | ||
105 | enum si_sm_result (*event)(struct si_sm_data *smi, long time); | 122 | enum si_sm_result (*event)(struct si_sm_data *smi, long time); |
106 | 123 | ||
107 | /* Attempt to detect an SMI. Returns 0 on success or nonzero | 124 | /* |
108 | on failure. */ | 125 | * Attempt to detect an SMI. Returns 0 on success or nonzero |
126 | * on failure. | ||
127 | */ | ||
109 | int (*detect)(struct si_sm_data *smi); | 128 | int (*detect)(struct si_sm_data *smi); |
110 | 129 | ||
111 | /* The interface is shutting down, so clean it up. */ | 130 | /* The interface is shutting down, so clean it up. */ |