Commit 877197ef authored by Corey Minyard's avatar Corey Minyard Committed by Linus Torvalds

[PATCH] ipmi: remove unused fields

This removes the unused "all_cmd_rcvr" variable from the IPMI driver.
Signed-off-by: default avatarCorey Minyard <minyard@acm.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent e8b33617
...@@ -202,12 +202,6 @@ struct ipmi_smi ...@@ -202,12 +202,6 @@ struct ipmi_smi
struct list_head waiting_events; struct list_head waiting_events;
unsigned int waiting_events_count; /* How many events in queue? */ unsigned int waiting_events_count; /* How many events in queue? */
/* This will be non-null if someone registers to receive all
IPMI commands (this is for interface emulation). There
may not be any things in the cmd_rcvrs list above when
this is registered. */
ipmi_user_t all_cmd_rcvr;
/* The event receiver for my BMC, only really used at panic /* The event receiver for my BMC, only really used at panic
shutdown as a place to store this. */ shutdown as a place to store this. */
unsigned char event_receiver; unsigned char event_receiver;
...@@ -867,11 +861,6 @@ int ipmi_register_for_cmd(ipmi_user_t user, ...@@ -867,11 +861,6 @@ int ipmi_register_for_cmd(ipmi_user_t user,
read_lock(&(user->intf->users_lock)); read_lock(&(user->intf->users_lock));
write_lock_irqsave(&(user->intf->cmd_rcvr_lock), flags); write_lock_irqsave(&(user->intf->cmd_rcvr_lock), flags);
if (user->intf->all_cmd_rcvr != NULL) {
rv = -EBUSY;
goto out_unlock;
}
/* Make sure the command/netfn is not already registered. */ /* Make sure the command/netfn is not already registered. */
list_for_each_entry(cmp, &(user->intf->cmd_rcvrs), link) { list_for_each_entry(cmp, &(user->intf->cmd_rcvrs), link) {
if ((cmp->netfn == netfn) && (cmp->cmd == cmd)) { if ((cmp->netfn == netfn) && (cmp->cmd == cmd)) {
...@@ -886,7 +875,7 @@ int ipmi_register_for_cmd(ipmi_user_t user, ...@@ -886,7 +875,7 @@ int ipmi_register_for_cmd(ipmi_user_t user,
rcvr->user = user; rcvr->user = user;
list_add_tail(&(rcvr->link), &(user->intf->cmd_rcvrs)); list_add_tail(&(rcvr->link), &(user->intf->cmd_rcvrs));
} }
out_unlock:
write_unlock_irqrestore(&(user->intf->cmd_rcvr_lock), flags); write_unlock_irqrestore(&(user->intf->cmd_rcvr_lock), flags);
read_unlock(&(user->intf->users_lock)); read_unlock(&(user->intf->users_lock));
...@@ -1799,7 +1788,6 @@ int ipmi_register_smi(struct ipmi_smi_handlers *handlers, ...@@ -1799,7 +1788,6 @@ int ipmi_register_smi(struct ipmi_smi_handlers *handlers,
rwlock_init(&(new_intf->cmd_rcvr_lock)); rwlock_init(&(new_intf->cmd_rcvr_lock));
init_waitqueue_head(&new_intf->waitq); init_waitqueue_head(&new_intf->waitq);
INIT_LIST_HEAD(&(new_intf->cmd_rcvrs)); INIT_LIST_HEAD(&(new_intf->cmd_rcvrs));
new_intf->all_cmd_rcvr = NULL;
spin_lock_init(&(new_intf->counter_lock)); spin_lock_init(&(new_intf->counter_lock));
...@@ -2037,15 +2025,11 @@ static int handle_ipmb_get_msg_cmd(ipmi_smi_t intf, ...@@ -2037,15 +2025,11 @@ static int handle_ipmb_get_msg_cmd(ipmi_smi_t intf,
read_lock(&(intf->cmd_rcvr_lock)); read_lock(&(intf->cmd_rcvr_lock));
if (intf->all_cmd_rcvr) { /* Find the command/netfn. */
user = intf->all_cmd_rcvr; list_for_each_entry(rcvr, &(intf->cmd_rcvrs), link) {
} else { if ((rcvr->netfn == netfn) && (rcvr->cmd == cmd)) {
/* Find the command/netfn. */ user = rcvr->user;
list_for_each_entry(rcvr, &(intf->cmd_rcvrs), link) { break;
if ((rcvr->netfn == netfn) && (rcvr->cmd == cmd)) {
user = rcvr->user;
break;
}
} }
} }
read_unlock(&(intf->cmd_rcvr_lock)); read_unlock(&(intf->cmd_rcvr_lock));
...@@ -2222,15 +2206,11 @@ static int handle_lan_get_msg_cmd(ipmi_smi_t intf, ...@@ -2222,15 +2206,11 @@ static int handle_lan_get_msg_cmd(ipmi_smi_t intf,
read_lock(&(intf->cmd_rcvr_lock)); read_lock(&(intf->cmd_rcvr_lock));
if (intf->all_cmd_rcvr) { /* Find the command/netfn. */
user = intf->all_cmd_rcvr; list_for_each_entry(rcvr, &(intf->cmd_rcvrs), link) {
} else { if ((rcvr->netfn == netfn) && (rcvr->cmd == cmd)) {
/* Find the command/netfn. */ user = rcvr->user;
list_for_each_entry(rcvr, &(intf->cmd_rcvrs), link) { break;
if ((rcvr->netfn == netfn) && (rcvr->cmd == cmd)) {
user = rcvr->user;
break;
}
} }
} }
read_unlock(&(intf->cmd_rcvr_lock)); read_unlock(&(intf->cmd_rcvr_lock));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment