[PATCH] IPMI: tidy up various things

Tidy up various coding standard things, mostly removing the space after !,
but also break some long lines and fix a few other spacing inconsistencies.
Also fixes some bad error reporting when deleting an IPMI user.

Signed-off-by: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Corey Minyard 2006-03-31 02:30:40 -08:00 committed by Linus Torvalds
parent 453823ba08
commit 8a3628d53f
5 changed files with 35 additions and 33 deletions

View file

@ -819,14 +819,13 @@ static void free_user(struct kref *ref)
int ipmi_destroy_user(ipmi_user_t user) int ipmi_destroy_user(ipmi_user_t user)
{ {
int rv = -ENODEV;
ipmi_smi_t intf = user->intf; ipmi_smi_t intf = user->intf;
int i; int i;
unsigned long flags; unsigned long flags;
struct cmd_rcvr *rcvr; struct cmd_rcvr *rcvr;
struct cmd_rcvr *rcvrs = NULL; struct cmd_rcvr *rcvrs = NULL;
user->valid = 1; user->valid = 0;
/* Remove the user from the interface's sequence table. */ /* Remove the user from the interface's sequence table. */
spin_lock_irqsave(&intf->seq_lock, flags); spin_lock_irqsave(&intf->seq_lock, flags);
@ -871,7 +870,7 @@ int ipmi_destroy_user(ipmi_user_t user)
kref_put(&user->refcount, free_user); kref_put(&user->refcount, free_user);
return rv; return 0;
} }
void ipmi_get_version(ipmi_user_t user, void ipmi_get_version(ipmi_user_t user,
@ -936,7 +935,8 @@ int ipmi_set_gets_events(ipmi_user_t user, int val)
if (val) { if (val) {
/* Deliver any queued events. */ /* Deliver any queued events. */
list_for_each_entry_safe(msg, msg2, &intf->waiting_events, link) { list_for_each_entry_safe(msg, msg2, &intf->waiting_events,
link) {
list_del(&msg->link); list_del(&msg->link);
list_add_tail(&msg->link, &msgs); list_add_tail(&msg->link, &msgs);
} }
@ -2874,7 +2874,8 @@ static int handle_read_event_rsp(ipmi_smi_t intf,
recv_msg = ipmi_alloc_recv_msg(); recv_msg = ipmi_alloc_recv_msg();
if (!recv_msg) { if (!recv_msg) {
rcu_read_unlock(); rcu_read_unlock();
list_for_each_entry_safe(recv_msg, recv_msg2, &msgs, link) { list_for_each_entry_safe(recv_msg, recv_msg2, &msgs,
link) {
list_del(&recv_msg->link); list_del(&recv_msg->link);
ipmi_free_recv_msg(recv_msg); ipmi_free_recv_msg(recv_msg);
} }
@ -3313,7 +3314,8 @@ static void ipmi_timeout_handler(long timeout_period)
/* See if any waiting messages need to be processed. */ /* See if any waiting messages need to be processed. */
spin_lock_irqsave(&intf->waiting_msgs_lock, flags); spin_lock_irqsave(&intf->waiting_msgs_lock, flags);
list_for_each_entry_safe(smi_msg, smi_msg2, &intf->waiting_msgs, link) { list_for_each_entry_safe(smi_msg, smi_msg2,
&intf->waiting_msgs, link) {
if (!handle_new_recv_msg(intf, smi_msg)) { if (!handle_new_recv_msg(intf, smi_msg)) {
list_del(&smi_msg->link); list_del(&smi_msg->link);
ipmi_free_smi_msg(smi_msg); ipmi_free_smi_msg(smi_msg);

View file

@ -790,13 +790,13 @@ static int ipmi_fasync(int fd, struct file *file, int on)
static int ipmi_close(struct inode *ino, struct file *filep) static int ipmi_close(struct inode *ino, struct file *filep)
{ {
if (iminor(ino)==WATCHDOG_MINOR) if (iminor(ino) == WATCHDOG_MINOR) {
{
if (expect_close == 42) { if (expect_close == 42) {
ipmi_watchdog_state = WDOG_TIMEOUT_NONE; ipmi_watchdog_state = WDOG_TIMEOUT_NONE;
ipmi_set_timeout(IPMI_SET_TIMEOUT_NO_HB); ipmi_set_timeout(IPMI_SET_TIMEOUT_NO_HB);
} else { } else {
printk(KERN_CRIT PFX "Unexpected close, not stopping watchdog!\n"); printk(KERN_CRIT PFX
"Unexpected close, not stopping watchdog!\n");
ipmi_heartbeat(); ipmi_heartbeat();
} }
clear_bit(0, &ipmi_wdog_open); clear_bit(0, &ipmi_wdog_open);