aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ipmi.h
diff options
context:
space:
mode:
authorCorey Minyard <cminyard@mvista.com>2008-04-29 04:01:09 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-29 11:06:15 -0400
commitc70d749986f6f1d4e2bb008bfc0c5fc22ec3fc64 (patch)
tree69ddc91cf39938e5ec3ba7924cff78c6760de927 /include/linux/ipmi.h
parentba8ff1c61eb119e687b06ca35f7f4ab041bf0422 (diff)
ipmi: style fixes in the base code
Lots of style fixes for the base IPMI driver. No functional changes. Basically fixes everything reported by checkpatch and fixes the comment style. Signed-off-by: Corey Minyard <cminyard@mvista.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/ipmi.h')
-rw-r--r--include/linux/ipmi.h72
1 files changed, 30 insertions, 42 deletions
diff --git a/include/linux/ipmi.h b/include/linux/ipmi.h
index 1144b32f5310..2f75c4640b45 100644
--- a/include/linux/ipmi.h
+++ b/include/linux/ipmi.h
@@ -75,8 +75,7 @@
75 * work for sockets. 75 * work for sockets.
76 */ 76 */
77#define IPMI_MAX_ADDR_SIZE 32 77#define IPMI_MAX_ADDR_SIZE 32
78struct ipmi_addr 78struct ipmi_addr {
79{
80 /* Try to take these from the "Channel Medium Type" table 79 /* Try to take these from the "Channel Medium Type" table
81 in section 6.5 of the IPMI 1.5 manual. */ 80 in section 6.5 of the IPMI 1.5 manual. */
82 int addr_type; 81 int addr_type;
@@ -90,8 +89,7 @@ struct ipmi_addr
90 * 0), or IPMC_BMC_CHANNEL if communicating directly with the BMC. 89 * 0), or IPMC_BMC_CHANNEL if communicating directly with the BMC.
91 */ 90 */
92#define IPMI_SYSTEM_INTERFACE_ADDR_TYPE 0x0c 91#define IPMI_SYSTEM_INTERFACE_ADDR_TYPE 0x0c
93struct ipmi_system_interface_addr 92struct ipmi_system_interface_addr {
94{
95 int addr_type; 93 int addr_type;
96 short channel; 94 short channel;
97 unsigned char lun; 95 unsigned char lun;
@@ -100,10 +98,9 @@ struct ipmi_system_interface_addr
100/* An IPMB Address. */ 98/* An IPMB Address. */
101#define IPMI_IPMB_ADDR_TYPE 0x01 99#define IPMI_IPMB_ADDR_TYPE 0x01
102/* Used for broadcast get device id as described in section 17.9 of the 100/* Used for broadcast get device id as described in section 17.9 of the
103 IPMI 1.5 manual. */ 101 IPMI 1.5 manual. */
104#define IPMI_IPMB_BROADCAST_ADDR_TYPE 0x41 102#define IPMI_IPMB_BROADCAST_ADDR_TYPE 0x41
105struct ipmi_ipmb_addr 103struct ipmi_ipmb_addr {
106{
107 int addr_type; 104 int addr_type;
108 short channel; 105 short channel;
109 unsigned char slave_addr; 106 unsigned char slave_addr;
@@ -128,8 +125,7 @@ struct ipmi_ipmb_addr
128 * message is a little weird, but this is required. 125 * message is a little weird, but this is required.
129 */ 126 */
130#define IPMI_LAN_ADDR_TYPE 0x04 127#define IPMI_LAN_ADDR_TYPE 0x04
131struct ipmi_lan_addr 128struct ipmi_lan_addr {
132{
133 int addr_type; 129 int addr_type;
134 short channel; 130 short channel;
135 unsigned char privilege; 131 unsigned char privilege;
@@ -162,16 +158,14 @@ struct ipmi_lan_addr
162 * byte of data in the response (as the spec shows the messages laid 158 * byte of data in the response (as the spec shows the messages laid
163 * out). 159 * out).
164 */ 160 */
165struct ipmi_msg 161struct ipmi_msg {
166{
167 unsigned char netfn; 162 unsigned char netfn;
168 unsigned char cmd; 163 unsigned char cmd;
169 unsigned short data_len; 164 unsigned short data_len;
170 unsigned char __user *data; 165 unsigned char __user *data;
171}; 166};
172 167
173struct kernel_ipmi_msg 168struct kernel_ipmi_msg {
174{
175 unsigned char netfn; 169 unsigned char netfn;
176 unsigned char cmd; 170 unsigned char cmd;
177 unsigned short data_len; 171 unsigned short data_len;
@@ -239,12 +233,11 @@ typedef struct ipmi_user *ipmi_user_t;
239 * used after the message is delivered, so the upper layer may use the 233 * used after the message is delivered, so the upper layer may use the
240 * link to build a linked list, if it likes. 234 * link to build a linked list, if it likes.
241 */ 235 */
242struct ipmi_recv_msg 236struct ipmi_recv_msg {
243{
244 struct list_head link; 237 struct list_head link;
245 238
246 /* The type of message as defined in the "Receive Types" 239 /* The type of message as defined in the "Receive Types"
247 defines above. */ 240 defines above. */
248 int recv_type; 241 int recv_type;
249 242
250 ipmi_user_t user; 243 ipmi_user_t user;
@@ -271,9 +264,8 @@ struct ipmi_recv_msg
271/* Allocate and free the receive message. */ 264/* Allocate and free the receive message. */
272void ipmi_free_recv_msg(struct ipmi_recv_msg *msg); 265void ipmi_free_recv_msg(struct ipmi_recv_msg *msg);
273 266
274struct ipmi_user_hndl 267struct ipmi_user_hndl {
275{ 268 /* Routine type to call when a message needs to be routed to
276 /* Routine type to call when a message needs to be routed to
277 the upper layer. This will be called with some locks held, 269 the upper layer. This will be called with some locks held,
278 the only IPMI routines that can be called are ipmi_request 270 the only IPMI routines that can be called are ipmi_request
279 and the alloc/free operations. The handler_data is the 271 and the alloc/free operations. The handler_data is the
@@ -433,8 +425,7 @@ int ipmi_set_gets_events(ipmi_user_t user, int val);
433 * every existing interface when a new watcher is registered with 425 * every existing interface when a new watcher is registered with
434 * ipmi_smi_watcher_register(). 426 * ipmi_smi_watcher_register().
435 */ 427 */
436struct ipmi_smi_watcher 428struct ipmi_smi_watcher {
437{
438 struct list_head link; 429 struct list_head link;
439 430
440 /* You must set the owner to the current module, if you are in 431 /* You must set the owner to the current module, if you are in
@@ -505,8 +496,7 @@ int ipmi_validate_addr(struct ipmi_addr *addr, int len);
505 496
506 497
507/* Messages sent to the interface are this format. */ 498/* Messages sent to the interface are this format. */
508struct ipmi_req 499struct ipmi_req {
509{
510 unsigned char __user *addr; /* Address to send the message to. */ 500 unsigned char __user *addr; /* Address to send the message to. */
511 unsigned int addr_len; 501 unsigned int addr_len;
512 502
@@ -531,12 +521,11 @@ struct ipmi_req
531 521
532/* Messages sent to the interface with timing parameters are this 522/* Messages sent to the interface with timing parameters are this
533 format. */ 523 format. */
534struct ipmi_req_settime 524struct ipmi_req_settime {
535{
536 struct ipmi_req req; 525 struct ipmi_req req;
537 526
538 /* See ipmi_request_settime() above for details on these 527 /* See ipmi_request_settime() above for details on these
539 values. */ 528 values. */
540 int retries; 529 int retries;
541 unsigned int retry_time_ms; 530 unsigned int retry_time_ms;
542}; 531};
@@ -553,8 +542,7 @@ struct ipmi_req_settime
553 struct ipmi_req_settime) 542 struct ipmi_req_settime)
554 543
555/* Messages received from the interface are this format. */ 544/* Messages received from the interface are this format. */
556struct ipmi_recv 545struct ipmi_recv {
557{
558 int recv_type; /* Is this a command, response or an 546 int recv_type; /* Is this a command, response or an
559 asyncronous event. */ 547 asyncronous event. */
560 548
@@ -600,13 +588,12 @@ struct ipmi_recv
600 struct ipmi_recv) 588 struct ipmi_recv)
601 589
602/* Register to get commands from other entities on this interface. */ 590/* Register to get commands from other entities on this interface. */
603struct ipmi_cmdspec 591struct ipmi_cmdspec {
604{
605 unsigned char netfn; 592 unsigned char netfn;
606 unsigned char cmd; 593 unsigned char cmd;
607}; 594};
608 595
609/* 596/*
610 * Register to receive a specific command. error values: 597 * Register to receive a specific command. error values:
611 * - EFAULT - an address supplied was invalid. 598 * - EFAULT - an address supplied was invalid.
612 * - EBUSY - The netfn/cmd supplied was already in use. 599 * - EBUSY - The netfn/cmd supplied was already in use.
@@ -629,8 +616,7 @@ struct ipmi_cmdspec
629 * else. The chans field is a bitmask, (1 << channel) for each channel. 616 * else. The chans field is a bitmask, (1 << channel) for each channel.
630 * It may be IPMI_CHAN_ALL for all channels. 617 * It may be IPMI_CHAN_ALL for all channels.
631 */ 618 */
632struct ipmi_cmdspec_chans 619struct ipmi_cmdspec_chans {
633{
634 unsigned int netfn; 620 unsigned int netfn;
635 unsigned int cmd; 621 unsigned int cmd;
636 unsigned int chans; 622 unsigned int chans;
@@ -652,7 +638,7 @@ struct ipmi_cmdspec_chans
652#define IPMICTL_UNREGISTER_FOR_CMD_CHANS _IOR(IPMI_IOC_MAGIC, 29, \ 638#define IPMICTL_UNREGISTER_FOR_CMD_CHANS _IOR(IPMI_IOC_MAGIC, 29, \
653 struct ipmi_cmdspec_chans) 639 struct ipmi_cmdspec_chans)
654 640
655/* 641/*
656 * Set whether this interface receives events. Note that the first 642 * Set whether this interface receives events. Note that the first
657 * user registered for events will get all pending events for the 643 * user registered for events will get all pending events for the
658 * interface. error values: 644 * interface. error values:
@@ -668,15 +654,18 @@ struct ipmi_cmdspec_chans
668 * things it takes to determine your address (if not the BMC) and set 654 * things it takes to determine your address (if not the BMC) and set
669 * it for everyone else. You should probably leave the LUN alone. 655 * it for everyone else. You should probably leave the LUN alone.
670 */ 656 */
671struct ipmi_channel_lun_address_set 657struct ipmi_channel_lun_address_set {
672{
673 unsigned short channel; 658 unsigned short channel;
674 unsigned char value; 659 unsigned char value;
675}; 660};
676#define IPMICTL_SET_MY_CHANNEL_ADDRESS_CMD _IOR(IPMI_IOC_MAGIC, 24, struct ipmi_channel_lun_address_set) 661#define IPMICTL_SET_MY_CHANNEL_ADDRESS_CMD \
677#define IPMICTL_GET_MY_CHANNEL_ADDRESS_CMD _IOR(IPMI_IOC_MAGIC, 25, struct ipmi_channel_lun_address_set) 662 _IOR(IPMI_IOC_MAGIC, 24, struct ipmi_channel_lun_address_set)
678#define IPMICTL_SET_MY_CHANNEL_LUN_CMD _IOR(IPMI_IOC_MAGIC, 26, struct ipmi_channel_lun_address_set) 663#define IPMICTL_GET_MY_CHANNEL_ADDRESS_CMD \
679#define IPMICTL_GET_MY_CHANNEL_LUN_CMD _IOR(IPMI_IOC_MAGIC, 27, struct ipmi_channel_lun_address_set) 664 _IOR(IPMI_IOC_MAGIC, 25, struct ipmi_channel_lun_address_set)
665#define IPMICTL_SET_MY_CHANNEL_LUN_CMD \
666 _IOR(IPMI_IOC_MAGIC, 26, struct ipmi_channel_lun_address_set)
667#define IPMICTL_GET_MY_CHANNEL_LUN_CMD \
668 _IOR(IPMI_IOC_MAGIC, 27, struct ipmi_channel_lun_address_set)
680/* Legacy interfaces, these only set IPMB 0. */ 669/* Legacy interfaces, these only set IPMB 0. */
681#define IPMICTL_SET_MY_ADDRESS_CMD _IOR(IPMI_IOC_MAGIC, 17, unsigned int) 670#define IPMICTL_SET_MY_ADDRESS_CMD _IOR(IPMI_IOC_MAGIC, 17, unsigned int)
682#define IPMICTL_GET_MY_ADDRESS_CMD _IOR(IPMI_IOC_MAGIC, 18, unsigned int) 671#define IPMICTL_GET_MY_ADDRESS_CMD _IOR(IPMI_IOC_MAGIC, 18, unsigned int)
@@ -687,8 +676,7 @@ struct ipmi_channel_lun_address_set
687 * Get/set the default timing values for an interface. You shouldn't 676 * Get/set the default timing values for an interface. You shouldn't
688 * generally mess with these. 677 * generally mess with these.
689 */ 678 */
690struct ipmi_timing_parms 679struct ipmi_timing_parms {
691{
692 int retries; 680 int retries;
693 unsigned int retry_time_ms; 681 unsigned int retry_time_ms;
694}; 682};