ipmi: Change ipmi_smi_t to struct ipmi_smi *

Get rid of this coding style violation in the user files.  Include
files will come later.

Signed-off-by: Corey Minyard <cminyard@mvista.com>
This commit is contained in:
Corey Minyard 2018-04-05 20:54:04 -05:00
parent 2911c9886c
commit a567b62300
3 changed files with 99 additions and 95 deletions

View File

@ -37,9 +37,9 @@
static struct ipmi_recv_msg *ipmi_alloc_recv_msg(void);
static int ipmi_init_msghandler(void);
static void smi_recv_tasklet(unsigned long);
static void handle_new_recv_msgs(ipmi_smi_t intf);
static void need_waiter(ipmi_smi_t intf);
static int handle_one_recv_msg(ipmi_smi_t intf,
static void handle_new_recv_msgs(struct ipmi_smi *intf);
static void need_waiter(struct ipmi_smi *intf);
static int handle_one_recv_msg(struct ipmi_smi *intf,
struct ipmi_smi_msg *msg);
#ifdef DEBUG
@ -207,7 +207,7 @@ struct ipmi_user {
void *handler_data;
/* The interface this user is bound to. */
ipmi_smi_t intf;
struct ipmi_smi *intf;
/* Does this interface receive IPMI events? */
bool gets_events;
@ -322,7 +322,7 @@ struct bmc_device {
};
#define to_bmc_device(x) container_of((x), struct bmc_device, pdev.dev)
static int bmc_get_device_id(ipmi_smi_t intf, struct bmc_device *bmc,
static int bmc_get_device_id(struct ipmi_smi *intf, struct bmc_device *bmc,
struct ipmi_device_id *id,
bool *guid_set, guid_t *guid);
@ -564,7 +564,8 @@ struct ipmi_smi {
*
* Protected by bmc_reg_mutex.
*/
void (*null_user_handler)(ipmi_smi_t intf, struct ipmi_recv_msg *msg);
void (*null_user_handler)(struct ipmi_smi *intf,
struct ipmi_recv_msg *msg);
/*
* When we are scanning the channels for an SMI, this will
@ -590,12 +591,12 @@ struct ipmi_smi {
};
#define to_si_intf_from_dev(device) container_of(device, struct ipmi_smi, dev)
static void __get_guid(ipmi_smi_t intf);
static void __ipmi_bmc_unregister(ipmi_smi_t intf);
static int __ipmi_bmc_register(ipmi_smi_t intf,
static void __get_guid(struct ipmi_smi *intf);
static void __ipmi_bmc_unregister(struct ipmi_smi *intf);
static int __ipmi_bmc_register(struct ipmi_smi *intf,
struct ipmi_device_id *id,
bool guid_set, guid_t *guid, int intf_num);
static int __scan_channels(ipmi_smi_t intf, struct ipmi_device_id *id);
static int __scan_channels(struct ipmi_smi *intf, struct ipmi_device_id *id);
/**
@ -674,7 +675,7 @@ static void free_smi_msg_list(struct list_head *q)
}
}
static void clean_up_interface_data(ipmi_smi_t intf)
static void clean_up_interface_data(struct ipmi_smi *intf)
{
int i;
struct cmd_rcvr *rcvr, *rcvr2;
@ -706,7 +707,7 @@ static void clean_up_interface_data(ipmi_smi_t intf)
static void intf_free(struct kref *ref)
{
ipmi_smi_t intf = container_of(ref, struct ipmi_smi, refcount);
struct ipmi_smi *intf = container_of(ref, struct ipmi_smi, refcount);
clean_up_interface_data(intf);
kfree(intf);
@ -714,13 +715,13 @@ static void intf_free(struct kref *ref)
struct watcher_entry {
int intf_num;
ipmi_smi_t intf;
struct ipmi_smi *intf;
struct list_head link;
};
int ipmi_smi_watcher_register(struct ipmi_smi_watcher *watcher)
{
ipmi_smi_t intf;
struct ipmi_smi *intf;
LIST_HEAD(to_deliver);
struct watcher_entry *e, *e2;
@ -888,7 +889,7 @@ EXPORT_SYMBOL(ipmi_addr_length);
static void deliver_response(struct ipmi_recv_msg *msg)
{
if (!msg->user) {
ipmi_smi_t intf = msg->user_msg_data;
struct ipmi_smi *intf = msg->user_msg_data;
/* Special handling for NULL users. */
if (intf->null_user_handler) {
@ -927,7 +928,7 @@ deliver_err_response(struct ipmi_recv_msg *msg, int err)
* message with the given timeout to the sequence table. This must be
* called with the interface's seq_lock held.
*/
static int intf_next_seq(ipmi_smi_t intf,
static int intf_next_seq(struct ipmi_smi *intf,
struct ipmi_recv_msg *recv_msg,
unsigned long timeout,
int retries,
@ -980,7 +981,7 @@ static int intf_next_seq(ipmi_smi_t intf,
* guard against message coming in after their timeout and the
* sequence number being reused).
*/
static int intf_find_seq(ipmi_smi_t intf,
static int intf_find_seq(struct ipmi_smi *intf,
unsigned char seq,
short channel,
unsigned char cmd,
@ -1013,7 +1014,7 @@ static int intf_find_seq(ipmi_smi_t intf,
/* Start the timer for a specific sequence table entry. */
static int intf_start_seq_timer(ipmi_smi_t intf,
static int intf_start_seq_timer(struct ipmi_smi *intf,
long msgid)
{
int rv = -ENODEV;
@ -1041,7 +1042,7 @@ static int intf_start_seq_timer(ipmi_smi_t intf,
}
/* Got an error for the send message for a specific sequence number. */
static int intf_err_seq(ipmi_smi_t intf,
static int intf_err_seq(struct ipmi_smi *intf,
long msgid,
unsigned int err)
{
@ -1084,7 +1085,7 @@ int ipmi_create_user(unsigned int if_num,
unsigned long flags;
struct ipmi_user *new_user;
int rv = 0;
ipmi_smi_t intf;
struct ipmi_smi *intf;
/*
* There is no module usecount here, because it's not
@ -1180,7 +1181,7 @@ EXPORT_SYMBOL(ipmi_create_user);
int ipmi_get_smi_info(int if_num, struct ipmi_smi_info *data)
{
int rv = 0;
ipmi_smi_t intf;
struct ipmi_smi *intf;
const struct ipmi_smi_handlers *handlers;
mutex_lock(&ipmi_interfaces_mutex);
@ -1212,7 +1213,7 @@ static void free_user(struct kref *ref)
int ipmi_destroy_user(struct ipmi_user *user)
{
ipmi_smi_t intf = user->intf;
struct ipmi_smi *intf = user->intf;
int i;
unsigned long flags;
struct cmd_rcvr *rcvr;
@ -1352,7 +1353,7 @@ int ipmi_get_maintenance_mode(struct ipmi_user *user)
}
EXPORT_SYMBOL(ipmi_get_maintenance_mode);
static void maintenance_mode_update(ipmi_smi_t intf)
static void maintenance_mode_update(struct ipmi_smi *intf)
{
if (intf->handlers->set_maintenance_mode)
intf->handlers->set_maintenance_mode(
@ -1363,7 +1364,7 @@ int ipmi_set_maintenance_mode(struct ipmi_user *user, int mode)
{
int rv = 0;
unsigned long flags;
ipmi_smi_t intf = user->intf;
struct ipmi_smi *intf = user->intf;
spin_lock_irqsave(&intf->maintenance_mode_lock, flags);
if (intf->maintenance_mode != mode) {
@ -1399,7 +1400,7 @@ EXPORT_SYMBOL(ipmi_set_maintenance_mode);
int ipmi_set_gets_events(struct ipmi_user *user, bool val)
{
unsigned long flags;
ipmi_smi_t intf = user->intf;
struct ipmi_smi *intf = user->intf;
struct ipmi_recv_msg *msg, *msg2;
struct list_head msgs;
@ -1456,7 +1457,7 @@ int ipmi_set_gets_events(struct ipmi_user *user, bool val)
}
EXPORT_SYMBOL(ipmi_set_gets_events);
static struct cmd_rcvr *find_cmd_rcvr(ipmi_smi_t intf,
static struct cmd_rcvr *find_cmd_rcvr(struct ipmi_smi *intf,
unsigned char netfn,
unsigned char cmd,
unsigned char chan)
@ -1471,7 +1472,7 @@ static struct cmd_rcvr *find_cmd_rcvr(ipmi_smi_t intf,
return NULL;
}
static int is_cmd_rcvr_exclusive(ipmi_smi_t intf,
static int is_cmd_rcvr_exclusive(struct ipmi_smi *intf,
unsigned char netfn,
unsigned char cmd,
unsigned int chans)
@ -1491,7 +1492,7 @@ int ipmi_register_for_cmd(struct ipmi_user *user,
unsigned char cmd,
unsigned int chans)
{
ipmi_smi_t intf = user->intf;
struct ipmi_smi *intf = user->intf;
struct cmd_rcvr *rcvr;
int rv = 0;
@ -1530,7 +1531,7 @@ int ipmi_unregister_for_cmd(struct ipmi_user *user,
unsigned char cmd,
unsigned int chans)
{
ipmi_smi_t intf = user->intf;
struct ipmi_smi *intf = user->intf;
struct cmd_rcvr *rcvr;
struct cmd_rcvr *rcvrs = NULL;
int i, rv = -ENOENT;
@ -1654,7 +1655,7 @@ static inline void format_lan_msg(struct ipmi_smi_msg *smi_msg,
smi_msg->msgid = msgid;
}
static struct ipmi_smi_msg *smi_add_send_msg(ipmi_smi_t intf,
static struct ipmi_smi_msg *smi_add_send_msg(struct ipmi_smi *intf,
struct ipmi_smi_msg *smi_msg,
int priority)
{
@ -1672,7 +1673,8 @@ static struct ipmi_smi_msg *smi_add_send_msg(ipmi_smi_t intf,
}
static void smi_send(ipmi_smi_t intf, const struct ipmi_smi_handlers *handlers,
static void smi_send(struct ipmi_smi *intf,
const struct ipmi_smi_handlers *handlers,
struct ipmi_smi_msg *smi_msg, int priority)
{
int run_to_completion = intf->run_to_completion;
@ -1699,7 +1701,7 @@ static bool is_maintenance_mode_cmd(struct kernel_ipmi_msg *msg)
|| (msg->netfn == IPMI_NETFN_FIRMWARE_REQUEST));
}
static int i_ipmi_req_sysintf(ipmi_smi_t intf,
static int i_ipmi_req_sysintf(struct ipmi_smi *intf,
struct ipmi_addr *addr,
long msgid,
struct kernel_ipmi_msg *msg,
@ -1766,7 +1768,7 @@ static int i_ipmi_req_sysintf(ipmi_smi_t intf,
return 0;
}
static int i_ipmi_req_ipmb(ipmi_smi_t intf,
static int i_ipmi_req_ipmb(struct ipmi_smi *intf,
struct ipmi_addr *addr,
long msgid,
struct kernel_ipmi_msg *msg,
@ -1907,7 +1909,7 @@ static int i_ipmi_req_ipmb(ipmi_smi_t intf,
return rv;
}
static int i_ipmi_req_lan(ipmi_smi_t intf,
static int i_ipmi_req_lan(struct ipmi_smi *intf,
struct ipmi_addr *addr,
long msgid,
struct kernel_ipmi_msg *msg,
@ -2032,7 +2034,7 @@ static int i_ipmi_req_lan(ipmi_smi_t intf,
* occurs.
*/
static int i_ipmi_request(struct ipmi_user *user,
ipmi_smi_t intf,
struct ipmi_smi *intf,
struct ipmi_addr *addr,
long msgid,
struct kernel_ipmi_msg *msg,
@ -2114,7 +2116,7 @@ static int i_ipmi_request(struct ipmi_user *user,
return rv;
}
static int check_addr(ipmi_smi_t intf,
static int check_addr(struct ipmi_smi *intf,
struct ipmi_addr *addr,
unsigned char *saddr,
unsigned char *lun)
@ -2190,7 +2192,8 @@ int ipmi_request_supply_msgs(struct ipmi_user *user,
}
EXPORT_SYMBOL(ipmi_request_supply_msgs);
static void bmc_device_id_handler(ipmi_smi_t intf, struct ipmi_recv_msg *msg)
static void bmc_device_id_handler(struct ipmi_smi *intf,
struct ipmi_recv_msg *msg)
{
int rv;
@ -2222,7 +2225,7 @@ static void bmc_device_id_handler(ipmi_smi_t intf, struct ipmi_recv_msg *msg)
}
static int
send_get_device_id_cmd(ipmi_smi_t intf)
send_get_device_id_cmd(struct ipmi_smi *intf)
{
struct ipmi_system_interface_addr si;
struct kernel_ipmi_msg msg;
@ -2250,7 +2253,7 @@ send_get_device_id_cmd(ipmi_smi_t intf)
-1, 0);
}
static int __get_device_id(ipmi_smi_t intf, struct bmc_device *bmc)
static int __get_device_id(struct ipmi_smi *intf, struct bmc_device *bmc)
{
int rv;
@ -2284,7 +2287,7 @@ static int __get_device_id(ipmi_smi_t intf, struct bmc_device *bmc)
* Except for the first time this is called (in ipmi_register_smi()),
* this will always return good data;
*/
static int __bmc_get_device_id(ipmi_smi_t intf, struct bmc_device *bmc,
static int __bmc_get_device_id(struct ipmi_smi *intf, struct bmc_device *bmc,
struct ipmi_device_id *id,
bool *guid_set, guid_t *guid, int intf_num)
{
@ -2417,7 +2420,7 @@ static int __bmc_get_device_id(ipmi_smi_t intf, struct bmc_device *bmc,
return rv;
}
static int bmc_get_device_id(ipmi_smi_t intf, struct bmc_device *bmc,
static int bmc_get_device_id(struct ipmi_smi *intf, struct bmc_device *bmc,
struct ipmi_device_id *id,
bool *guid_set, guid_t *guid)
{
@ -2427,7 +2430,7 @@ static int bmc_get_device_id(ipmi_smi_t intf, struct bmc_device *bmc,
#ifdef CONFIG_IPMI_PROC_INTERFACE
static int smi_ipmb_proc_show(struct seq_file *m, void *v)
{
ipmi_smi_t intf = m->private;
struct ipmi_smi *intf = m->private;
int i;
seq_printf(m, "%x", intf->addrinfo[0].address);
@ -2452,7 +2455,7 @@ static const struct file_operations smi_ipmb_proc_ops = {
static int smi_version_proc_show(struct seq_file *m, void *v)
{
ipmi_smi_t intf = m->private;
struct ipmi_smi *intf = m->private;
struct ipmi_device_id id;
int rv;
@ -2481,7 +2484,7 @@ static const struct file_operations smi_version_proc_ops = {
static int smi_stats_proc_show(struct seq_file *m, void *v)
{
ipmi_smi_t intf = m->private;
struct ipmi_smi *intf = m->private;
seq_printf(m, "sent_invalid_commands: %u\n",
ipmi_get_stat(intf, sent_invalid_commands));
@ -2554,7 +2557,7 @@ static const struct file_operations smi_stats_proc_ops = {
.release = single_release,
};
int ipmi_smi_add_proc_entry(ipmi_smi_t smi, char *name,
int ipmi_smi_add_proc_entry(struct ipmi_smi *smi, char *name,
const struct file_operations *proc_ops,
void *data)
{
@ -2589,7 +2592,7 @@ int ipmi_smi_add_proc_entry(ipmi_smi_t smi, char *name,
}
EXPORT_SYMBOL(ipmi_smi_add_proc_entry);
static int add_proc_entries(ipmi_smi_t smi, int num)
static int add_proc_entries(struct ipmi_smi *smi, int num)
{
int rv = 0;
@ -2616,7 +2619,7 @@ static int add_proc_entries(ipmi_smi_t smi, int num)
return rv;
}
static void remove_proc_entries(ipmi_smi_t smi)
static void remove_proc_entries(struct ipmi_smi *smi)
{
struct ipmi_proc_entry *entry;
@ -2965,7 +2968,7 @@ cleanup_bmc_device(struct kref *ref)
/*
* Must be called with intf->bmc_reg_mutex held.
*/
static void __ipmi_bmc_unregister(ipmi_smi_t intf)
static void __ipmi_bmc_unregister(struct ipmi_smi *intf)
{
struct bmc_device *bmc = intf->bmc;
@ -2985,7 +2988,7 @@ static void __ipmi_bmc_unregister(ipmi_smi_t intf)
intf->bmc_registered = false;
}
static void ipmi_bmc_unregister(ipmi_smi_t intf)
static void ipmi_bmc_unregister(struct ipmi_smi *intf)
{
mutex_lock(&intf->bmc_reg_mutex);
__ipmi_bmc_unregister(intf);
@ -2995,7 +2998,7 @@ static void ipmi_bmc_unregister(ipmi_smi_t intf)
/*
* Must be called with intf->bmc_reg_mutex held.
*/
static int __ipmi_bmc_register(ipmi_smi_t intf,
static int __ipmi_bmc_register(struct ipmi_smi *intf,
struct ipmi_device_id *id,
bool guid_set, guid_t *guid, int intf_num)
{
@ -3157,7 +3160,7 @@ static int __ipmi_bmc_register(ipmi_smi_t intf,
}
static int
send_guid_cmd(ipmi_smi_t intf, int chan)
send_guid_cmd(struct ipmi_smi *intf, int chan)
{
struct kernel_ipmi_msg msg;
struct ipmi_system_interface_addr si;
@ -3184,7 +3187,7 @@ send_guid_cmd(ipmi_smi_t intf, int chan)
-1, 0);
}
static void guid_handler(ipmi_smi_t intf, struct ipmi_recv_msg *msg)
static void guid_handler(struct ipmi_smi *intf, struct ipmi_recv_msg *msg)
{
struct bmc_device *bmc = intf->bmc;
@ -3219,7 +3222,7 @@ static void guid_handler(ipmi_smi_t intf, struct ipmi_recv_msg *msg)
wake_up(&intf->waitq);
}
static void __get_guid(ipmi_smi_t intf)
static void __get_guid(struct ipmi_smi *intf)
{
int rv;
struct bmc_device *bmc = intf->bmc;
@ -3240,7 +3243,7 @@ static void __get_guid(ipmi_smi_t intf)
}
static int
send_channel_info_cmd(ipmi_smi_t intf, int chan)
send_channel_info_cmd(struct ipmi_smi *intf, int chan)
{
struct kernel_ipmi_msg msg;
unsigned char data[1];
@ -3270,7 +3273,7 @@ send_channel_info_cmd(ipmi_smi_t intf, int chan)
}
static void
channel_handler(ipmi_smi_t intf, struct ipmi_recv_msg *msg)
channel_handler(struct ipmi_smi *intf, struct ipmi_recv_msg *msg)
{
int rv = 0;
int ch;
@ -3342,7 +3345,7 @@ channel_handler(ipmi_smi_t intf, struct ipmi_recv_msg *msg)
/*
* Must be holding intf->bmc_reg_mutex to call this.
*/
static int __scan_channels(ipmi_smi_t intf, struct ipmi_device_id *id)
static int __scan_channels(struct ipmi_smi *intf, struct ipmi_device_id *id)
{
int rv;
@ -3386,7 +3389,7 @@ static int __scan_channels(ipmi_smi_t intf, struct ipmi_device_id *id)
return 0;
}
static void ipmi_poll(ipmi_smi_t intf)
static void ipmi_poll(struct ipmi_smi *intf)
{
if (intf->handlers->poll)
intf->handlers->poll(intf->send_info);
@ -3402,7 +3405,8 @@ EXPORT_SYMBOL(ipmi_poll_interface);
static void redo_bmc_reg(struct work_struct *work)
{
ipmi_smi_t intf = container_of(work, struct ipmi_smi, bmc_reg_work);
struct ipmi_smi *intf = container_of(work, struct ipmi_smi,
bmc_reg_work);
if (!intf->in_shutdown)
bmc_get_device_id(intf, NULL, NULL, NULL, NULL);
@ -3417,8 +3421,7 @@ int ipmi_register_smi(const struct ipmi_smi_handlers *handlers,
{
int i, j;
int rv;
ipmi_smi_t intf;
ipmi_smi_t tintf;
struct ipmi_smi *intf, *tintf;
struct list_head *link;
struct ipmi_device_id id;
@ -3563,7 +3566,7 @@ int ipmi_register_smi(const struct ipmi_smi_handlers *handlers,
}
EXPORT_SYMBOL(ipmi_register_smi);
static void deliver_smi_err_response(ipmi_smi_t intf,
static void deliver_smi_err_response(struct ipmi_smi *intf,
struct ipmi_smi_msg *msg,
unsigned char err)
{
@ -3575,7 +3578,7 @@ static void deliver_smi_err_response(ipmi_smi_t intf,
handle_one_recv_msg(intf, msg);
}
static void cleanup_smi_msgs(ipmi_smi_t intf)
static void cleanup_smi_msgs(struct ipmi_smi *intf)
{
int i;
struct seq_table *ent;
@ -3615,7 +3618,7 @@ static void cleanup_smi_msgs(ipmi_smi_t intf)
}
}
int ipmi_unregister_smi(ipmi_smi_t intf)
int ipmi_unregister_smi(struct ipmi_smi *intf)
{
struct ipmi_smi_watcher *w;
int intf_num = intf->intf_num;
@ -3661,7 +3664,7 @@ int ipmi_unregister_smi(ipmi_smi_t intf)
}
EXPORT_SYMBOL(ipmi_unregister_smi);
static int handle_ipmb_get_msg_rsp(ipmi_smi_t intf,
static int handle_ipmb_get_msg_rsp(struct ipmi_smi *intf,
struct ipmi_smi_msg *msg)
{
struct ipmi_ipmb_addr ipmb_addr;
@ -3722,7 +3725,7 @@ static int handle_ipmb_get_msg_rsp(ipmi_smi_t intf,
return 0;
}
static int handle_ipmb_get_msg_cmd(ipmi_smi_t intf,
static int handle_ipmb_get_msg_cmd(struct ipmi_smi *intf,
struct ipmi_smi_msg *msg)
{
struct cmd_rcvr *rcvr;
@ -3835,7 +3838,7 @@ static int handle_ipmb_get_msg_cmd(ipmi_smi_t intf,
return rv;
}
static int handle_lan_get_msg_rsp(ipmi_smi_t intf,
static int handle_lan_get_msg_rsp(struct ipmi_smi *intf,
struct ipmi_smi_msg *msg)
{
struct ipmi_lan_addr lan_addr;
@ -3900,7 +3903,7 @@ static int handle_lan_get_msg_rsp(ipmi_smi_t intf,
return 0;
}
static int handle_lan_get_msg_cmd(ipmi_smi_t intf,
static int handle_lan_get_msg_cmd(struct ipmi_smi *intf,
struct ipmi_smi_msg *msg)
{
struct cmd_rcvr *rcvr;
@ -3999,7 +4002,7 @@ static int handle_lan_get_msg_cmd(ipmi_smi_t intf,
* the OEM. See IPMI 2.0 specification, Chapter 6 and
* Chapter 22, sections 22.6 and 22.24 for more details.
*/
static int handle_oem_get_msg_cmd(ipmi_smi_t intf,
static int handle_oem_get_msg_cmd(struct ipmi_smi *intf,
struct ipmi_smi_msg *msg)
{
struct cmd_rcvr *rcvr;
@ -4118,7 +4121,7 @@ static void copy_event_into_recv_msg(struct ipmi_recv_msg *recv_msg,
recv_msg->msg.data_len = msg->rsp_size - 3;
}
static int handle_read_event_rsp(ipmi_smi_t intf,
static int handle_read_event_rsp(struct ipmi_smi *intf,
struct ipmi_smi_msg *msg)
{
struct ipmi_recv_msg *recv_msg, *recv_msg2;
@ -4221,7 +4224,7 @@ static int handle_read_event_rsp(ipmi_smi_t intf,
return rv;
}
static int handle_bmc_rsp(ipmi_smi_t intf,
static int handle_bmc_rsp(struct ipmi_smi *intf,
struct ipmi_smi_msg *msg)
{
struct ipmi_recv_msg *recv_msg;
@ -4267,7 +4270,7 @@ static int handle_bmc_rsp(ipmi_smi_t intf,
* 0 if the message should be freed, or -1 if the message should not
* be freed or requeued.
*/
static int handle_one_recv_msg(ipmi_smi_t intf,
static int handle_one_recv_msg(struct ipmi_smi *intf,
struct ipmi_smi_msg *msg)
{
int requeue;
@ -4425,7 +4428,7 @@ static int handle_one_recv_msg(ipmi_smi_t intf,
/*
* If there are messages in the queue or pretimeouts, handle them.
*/
static void handle_new_recv_msgs(ipmi_smi_t intf)
static void handle_new_recv_msgs(struct ipmi_smi *intf)
{
struct ipmi_smi_msg *smi_msg;
unsigned long flags = 0;
@ -4485,7 +4488,7 @@ static void handle_new_recv_msgs(ipmi_smi_t intf)
static void smi_recv_tasklet(unsigned long val)
{
unsigned long flags = 0; /* keep us warning-free. */
ipmi_smi_t intf = (ipmi_smi_t) val;
struct ipmi_smi *intf = (struct ipmi_smi *) val;
int run_to_completion = intf->run_to_completion;
struct ipmi_smi_msg *newmsg = NULL;
@ -4527,7 +4530,7 @@ static void smi_recv_tasklet(unsigned long val)
}
/* Handle a new message from the lower layer. */
void ipmi_smi_msg_received(ipmi_smi_t intf,
void ipmi_smi_msg_received(struct ipmi_smi *intf,
struct ipmi_smi_msg *msg)
{
unsigned long flags = 0; /* keep us warning-free. */
@ -4608,7 +4611,7 @@ void ipmi_smi_msg_received(ipmi_smi_t intf,
}
EXPORT_SYMBOL(ipmi_smi_msg_received);
void ipmi_smi_watchdog_pretimeout(ipmi_smi_t intf)
void ipmi_smi_watchdog_pretimeout(struct ipmi_smi *intf)
{
if (intf->in_shutdown)
return;
@ -4619,7 +4622,7 @@ void ipmi_smi_watchdog_pretimeout(ipmi_smi_t intf)
EXPORT_SYMBOL(ipmi_smi_watchdog_pretimeout);
static struct ipmi_smi_msg *
smi_from_recv_msg(ipmi_smi_t intf, struct ipmi_recv_msg *recv_msg,
smi_from_recv_msg(struct ipmi_smi *intf, struct ipmi_recv_msg *recv_msg,
unsigned char seq, long seqid)
{
struct ipmi_smi_msg *smi_msg = ipmi_alloc_smi_msg();
@ -4639,7 +4642,7 @@ smi_from_recv_msg(ipmi_smi_t intf, struct ipmi_recv_msg *recv_msg,
return smi_msg;
}
static void check_msg_timeout(ipmi_smi_t intf, struct seq_table *ent,
static void check_msg_timeout(struct ipmi_smi *intf, struct seq_table *ent,
struct list_head *timeouts,
unsigned long timeout_period,
int slot, unsigned long *flags,
@ -4721,7 +4724,7 @@ static void check_msg_timeout(ipmi_smi_t intf, struct seq_table *ent,
}
}
static unsigned int ipmi_timeout_handler(ipmi_smi_t intf,
static unsigned int ipmi_timeout_handler(struct ipmi_smi *intf,
unsigned long timeout_period)
{
struct list_head timeouts;
@ -4788,7 +4791,7 @@ static unsigned int ipmi_timeout_handler(ipmi_smi_t intf,
return waiting_msgs;
}
static void ipmi_request_event(ipmi_smi_t intf)
static void ipmi_request_event(struct ipmi_smi *intf)
{
/* No event requests when in maintenance mode. */
if (intf->maintenance_mode_enable)
@ -4804,7 +4807,7 @@ static atomic_t stop_operation;
static void ipmi_timeout(struct timer_list *unused)
{
ipmi_smi_t intf;
struct ipmi_smi *intf;
int nt = 0;
if (atomic_read(&stop_operation))
@ -4839,7 +4842,7 @@ static void ipmi_timeout(struct timer_list *unused)
mod_timer(&ipmi_timer, jiffies + IPMI_TIMEOUT_JIFFIES);
}
static void need_waiter(ipmi_smi_t intf)
static void need_waiter(struct ipmi_smi *intf)
{
/* Racy, but worst case we start the timer twice. */
if (!timer_pending(&ipmi_timer))
@ -4910,8 +4913,8 @@ static void dummy_recv_done_handler(struct ipmi_recv_msg *msg)
/*
* Inside a panic, send a message and wait for a response.
*/
static void ipmi_panic_request_and_wait(ipmi_smi_t intf,
struct ipmi_addr *addr,
static void ipmi_panic_request_and_wait(struct ipmi_smi *intf,
struct ipmi_addr *addr,
struct kernel_ipmi_msg *msg)
{
struct ipmi_smi_msg smi_msg;
@ -4942,7 +4945,8 @@ static void ipmi_panic_request_and_wait(ipmi_smi_t intf,
ipmi_poll(intf);
}
static void event_receiver_fetcher(ipmi_smi_t intf, struct ipmi_recv_msg *msg)
static void event_receiver_fetcher(struct ipmi_smi *intf,
struct ipmi_recv_msg *msg)
{
if ((msg->addr.addr_type == IPMI_SYSTEM_INTERFACE_ADDR_TYPE)
&& (msg->msg.netfn == IPMI_NETFN_SENSOR_EVENT_RESPONSE)
@ -4954,7 +4958,7 @@ static void event_receiver_fetcher(ipmi_smi_t intf, struct ipmi_recv_msg *msg)
}
}
static void device_id_fetcher(ipmi_smi_t intf, struct ipmi_recv_msg *msg)
static void device_id_fetcher(struct ipmi_smi *intf, struct ipmi_recv_msg *msg)
{
if ((msg->addr.addr_type == IPMI_SYSTEM_INTERFACE_ADDR_TYPE)
&& (msg->msg.netfn == IPMI_NETFN_APP_RESPONSE)
@ -4969,7 +4973,7 @@ static void device_id_fetcher(ipmi_smi_t intf, struct ipmi_recv_msg *msg)
}
}
static void send_panic_events(ipmi_smi_t intf, char *str)
static void send_panic_events(struct ipmi_smi *intf, char *str)
{
struct kernel_ipmi_msg msg;
unsigned char data[16];
@ -5121,7 +5125,7 @@ static int panic_event(struct notifier_block *this,
unsigned long event,
void *ptr)
{
ipmi_smi_t intf;
struct ipmi_smi *intf;
struct ipmi_user *user;
if (has_panicked)

View File

@ -123,7 +123,7 @@ enum si_stat_indexes {
struct smi_info {
int intf_num;
ipmi_smi_t intf;
struct ipmi_smi *intf;
struct si_sm_data *si_sm;
const struct si_sm_handlers *handlers;
spinlock_t si_lock;
@ -1143,8 +1143,8 @@ irqreturn_t ipmi_si_irq_handler(int irq, void *data)
return IRQ_HANDLED;
}
static int smi_start_processing(void *send_info,
ipmi_smi_t intf)
static int smi_start_processing(void *send_info,
struct ipmi_smi *intf)
{
struct smi_info *new_smi = send_info;
int enable = 0;

View File

@ -193,7 +193,7 @@ typedef void (*ssif_i2c_done)(struct ssif_info *ssif_info, int result,
unsigned char *data, unsigned int len);
struct ssif_info {
ipmi_smi_t intf;
struct ipmi_smi *intf;
int intf_num;
spinlock_t lock;
struct ipmi_smi_msg *waiting_msg;
@ -315,7 +315,7 @@ static void ipmi_ssif_unlock_cond(struct ssif_info *ssif_info,
static void deliver_recv_msg(struct ssif_info *ssif_info,
struct ipmi_smi_msg *msg)
{
ipmi_smi_t intf = ssif_info->intf;
struct ipmi_smi *intf = ssif_info->intf;
if (!intf) {
ipmi_free_smi_msg(msg);
@ -452,7 +452,7 @@ static void start_recv_msg_fetch(struct ssif_info *ssif_info,
static void handle_flags(struct ssif_info *ssif_info, unsigned long *flags)
{
if (ssif_info->msg_flags & WDT_PRE_TIMEOUT_INT) {
ipmi_smi_t intf = ssif_info->intf;
struct ipmi_smi *intf = ssif_info->intf;
/* Watchdog pre-timeout */
ssif_inc_stat(ssif_info, watchdog_pretimeouts);
start_clear_flags(ssif_info, flags);
@ -1113,8 +1113,8 @@ static void dec_usecount(void *send_info)
i2c_put_adapter(ssif_info->client->adapter);
}
static int ssif_start_processing(void *send_info,
ipmi_smi_t intf)
static int ssif_start_processing(void *send_info,
struct ipmi_smi *intf)
{
struct ssif_info *ssif_info = send_info;