Commit 2911c988 authored by Corey Minyard's avatar Corey Minyard

ipmi: Rename ipmi_user_t to struct ipmi_user *

Get rid of that non-compliance in the user files.  Include files
will come later.
Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
parent b7780dab
......@@ -26,7 +26,7 @@
struct ipmi_file_private
{
ipmi_user_t user;
struct ipmi_user *user;
spinlock_t recv_msg_lock;
struct list_head recv_msgs;
struct file *file;
......@@ -140,7 +140,7 @@ static int ipmi_release(struct inode *inode, struct file *file)
return 0;
}
static int handle_send_req(ipmi_user_t user,
static int handle_send_req(struct ipmi_user *user,
struct ipmi_req *req,
int retries,
unsigned int retry_time_ms)
......
......@@ -216,7 +216,7 @@ struct ipmi_user {
struct cmd_rcvr {
struct list_head link;
ipmi_user_t user;
struct ipmi_user *user;
unsigned char netfn;
unsigned char cmd;
unsigned int chans;
......@@ -906,7 +906,7 @@ static void deliver_response(struct ipmi_recv_msg *msg)
* risk. At this moment, simply skip it in that case.
*/
ipmi_user_t user = msg->user;
struct ipmi_user *user = msg->user;
user->handler->ipmi_recv_hndl(msg, user->handler_data);
}
}
......@@ -1079,10 +1079,10 @@ static int intf_err_seq(ipmi_smi_t intf,
int ipmi_create_user(unsigned int if_num,
const struct ipmi_user_hndl *handler,
void *handler_data,
ipmi_user_t *user)
struct ipmi_user **user)
{
unsigned long flags;
ipmi_user_t new_user;
struct ipmi_user *new_user;
int rv = 0;
ipmi_smi_t intf;
......@@ -1206,11 +1206,11 @@ EXPORT_SYMBOL(ipmi_get_smi_info);
static void free_user(struct kref *ref)
{
ipmi_user_t user = container_of(ref, struct ipmi_user, refcount);
struct ipmi_user *user = container_of(ref, struct ipmi_user, refcount);
kfree(user);
}
int ipmi_destroy_user(ipmi_user_t user)
int ipmi_destroy_user(struct ipmi_user *user)
{
ipmi_smi_t intf = user->intf;
int i;
......@@ -1277,7 +1277,7 @@ int ipmi_destroy_user(ipmi_user_t user)
}
EXPORT_SYMBOL(ipmi_destroy_user);
int ipmi_get_version(ipmi_user_t user,
int ipmi_get_version(struct ipmi_user *user,
unsigned char *major,
unsigned char *minor)
{
......@@ -1295,7 +1295,7 @@ int ipmi_get_version(ipmi_user_t user,
}
EXPORT_SYMBOL(ipmi_get_version);
int ipmi_set_my_address(ipmi_user_t user,
int ipmi_set_my_address(struct ipmi_user *user,
unsigned int channel,
unsigned char address)
{
......@@ -1306,7 +1306,7 @@ int ipmi_set_my_address(ipmi_user_t user,
}
EXPORT_SYMBOL(ipmi_set_my_address);
int ipmi_get_my_address(ipmi_user_t user,
int ipmi_get_my_address(struct ipmi_user *user,
unsigned int channel,
unsigned char *address)
{
......@@ -1317,7 +1317,7 @@ int ipmi_get_my_address(ipmi_user_t user,
}
EXPORT_SYMBOL(ipmi_get_my_address);
int ipmi_set_my_LUN(ipmi_user_t user,
int ipmi_set_my_LUN(struct ipmi_user *user,
unsigned int channel,
unsigned char LUN)
{
......@@ -1328,7 +1328,7 @@ int ipmi_set_my_LUN(ipmi_user_t user,
}
EXPORT_SYMBOL(ipmi_set_my_LUN);
int ipmi_get_my_LUN(ipmi_user_t user,
int ipmi_get_my_LUN(struct ipmi_user *user,
unsigned int channel,
unsigned char *address)
{
......@@ -1339,7 +1339,7 @@ int ipmi_get_my_LUN(ipmi_user_t user,
}
EXPORT_SYMBOL(ipmi_get_my_LUN);
int ipmi_get_maintenance_mode(ipmi_user_t user)
int ipmi_get_maintenance_mode(struct ipmi_user *user)
{
int mode;
unsigned long flags;
......@@ -1359,7 +1359,7 @@ static void maintenance_mode_update(ipmi_smi_t intf)
intf->send_info, intf->maintenance_mode_enable);
}
int ipmi_set_maintenance_mode(ipmi_user_t user, int mode)
int ipmi_set_maintenance_mode(struct ipmi_user *user, int mode)
{
int rv = 0;
unsigned long flags;
......@@ -1396,7 +1396,7 @@ int ipmi_set_maintenance_mode(ipmi_user_t user, int mode)
}
EXPORT_SYMBOL(ipmi_set_maintenance_mode);
int ipmi_set_gets_events(ipmi_user_t user, bool val)
int ipmi_set_gets_events(struct ipmi_user *user, bool val)
{
unsigned long flags;
ipmi_smi_t intf = user->intf;
......@@ -1486,7 +1486,7 @@ static int is_cmd_rcvr_exclusive(ipmi_smi_t intf,
return 1;
}
int ipmi_register_for_cmd(ipmi_user_t user,
int ipmi_register_for_cmd(struct ipmi_user *user,
unsigned char netfn,
unsigned char cmd,
unsigned int chans)
......@@ -1525,7 +1525,7 @@ int ipmi_register_for_cmd(ipmi_user_t user,
}
EXPORT_SYMBOL(ipmi_register_for_cmd);
int ipmi_unregister_for_cmd(ipmi_user_t user,
int ipmi_unregister_for_cmd(struct ipmi_user *user,
unsigned char netfn,
unsigned char cmd,
unsigned int chans)
......@@ -2031,7 +2031,7 @@ static int i_ipmi_req_lan(ipmi_smi_t intf,
* messages are supplied, they will be freed, even if an error
* occurs.
*/
static int i_ipmi_request(ipmi_user_t user,
static int i_ipmi_request(struct ipmi_user *user,
ipmi_smi_t intf,
struct ipmi_addr *addr,
long msgid,
......@@ -2126,7 +2126,7 @@ static int check_addr(ipmi_smi_t intf,
return 0;
}
int ipmi_request_settime(ipmi_user_t user,
int ipmi_request_settime(struct ipmi_user *user,
struct ipmi_addr *addr,
long msgid,
struct kernel_ipmi_msg *msg,
......@@ -2158,7 +2158,7 @@ int ipmi_request_settime(ipmi_user_t user,
}
EXPORT_SYMBOL(ipmi_request_settime);
int ipmi_request_supply_msgs(ipmi_user_t user,
int ipmi_request_supply_msgs(struct ipmi_user *user,
struct ipmi_addr *addr,
long msgid,
struct kernel_ipmi_msg *msg,
......@@ -3394,7 +3394,7 @@ static void ipmi_poll(ipmi_smi_t intf)
handle_new_recv_msgs(intf);
}
void ipmi_poll_interface(ipmi_user_t user)
void ipmi_poll_interface(struct ipmi_user *user)
{
ipmi_poll(user->intf);
}
......@@ -3619,7 +3619,7 @@ int ipmi_unregister_smi(ipmi_smi_t intf)
{
struct ipmi_smi_watcher *w;
int intf_num = intf->intf_num;
ipmi_user_t user;
struct ipmi_user *user;
mutex_lock(&smi_watchers_mutex);
mutex_lock(&ipmi_interfaces_mutex);
......@@ -3730,7 +3730,7 @@ static int handle_ipmb_get_msg_cmd(ipmi_smi_t intf,
unsigned char netfn;
unsigned char cmd;
unsigned char chan;
ipmi_user_t user = NULL;
struct ipmi_user *user = NULL;
struct ipmi_ipmb_addr *ipmb_addr;
struct ipmi_recv_msg *recv_msg;
......@@ -3908,7 +3908,7 @@ static int handle_lan_get_msg_cmd(ipmi_smi_t intf,
unsigned char netfn;
unsigned char cmd;
unsigned char chan;
ipmi_user_t user = NULL;
struct ipmi_user *user = NULL;
struct ipmi_lan_addr *lan_addr;
struct ipmi_recv_msg *recv_msg;
......@@ -4007,7 +4007,7 @@ static int handle_oem_get_msg_cmd(ipmi_smi_t intf,
unsigned char netfn;
unsigned char cmd;
unsigned char chan;
ipmi_user_t user = NULL;
struct ipmi_user *user = NULL;
struct ipmi_system_interface_addr *smi_addr;
struct ipmi_recv_msg *recv_msg;
......@@ -4123,7 +4123,7 @@ static int handle_read_event_rsp(ipmi_smi_t intf,
{
struct ipmi_recv_msg *recv_msg, *recv_msg2;
struct list_head msgs;
ipmi_user_t user;
struct ipmi_user *user;
int rv = 0;
int deliver_count = 0;
unsigned long flags;
......@@ -4470,7 +4470,7 @@ static void handle_new_recv_msgs(ipmi_smi_t intf)
* deliver pretimeouts to all the users.
*/
if (atomic_add_unless(&intf->watchdog_pretimeouts_to_deliver, -1, 0)) {
ipmi_user_t user;
struct ipmi_user *user;
rcu_read_lock();
list_for_each_entry_rcu(user, &intf->users, link) {
......@@ -5122,7 +5122,7 @@ static int panic_event(struct notifier_block *this,
void *ptr)
{
ipmi_smi_t intf;
ipmi_user_t user;
struct ipmi_user *user;
if (has_panicked)
return NOTIFY_DONE;
......
......@@ -39,9 +39,9 @@ static int ifnum_to_use = -1;
/* Our local state. */
static int ready;
static ipmi_user_t ipmi_user;
static struct ipmi_user *ipmi_user;
static int ipmi_ifnum;
static void (*specific_poweroff_func)(ipmi_user_t user);
static void (*specific_poweroff_func)(struct ipmi_user *user);
/* Holds the old poweroff function so we can restore it on removal. */
static void (*old_poweroff_func)(void);
......@@ -118,7 +118,7 @@ static const struct ipmi_user_hndl ipmi_poweroff_handler = {
};
static int ipmi_request_wait_for_response(ipmi_user_t user,
static int ipmi_request_wait_for_response(struct ipmi_user *user,
struct ipmi_addr *addr,
struct kernel_ipmi_msg *send_msg)
{
......@@ -138,7 +138,7 @@ static int ipmi_request_wait_for_response(ipmi_user_t user,
}
/* Wait for message to complete, spinning. */
static int ipmi_request_in_rc_mode(ipmi_user_t user,
static int ipmi_request_in_rc_mode(struct ipmi_user *user,
struct ipmi_addr *addr,
struct kernel_ipmi_msg *send_msg)
{
......@@ -178,9 +178,9 @@ static int ipmi_request_in_rc_mode(ipmi_user_t user,
#define IPMI_MOTOROLA_MANUFACTURER_ID 0x0000A1
#define IPMI_MOTOROLA_PPS_IPMC_PRODUCT_ID 0x0051
static void (*atca_oem_poweroff_hook)(ipmi_user_t user);
static void (*atca_oem_poweroff_hook)(struct ipmi_user *user);
static void pps_poweroff_atca(ipmi_user_t user)
static void pps_poweroff_atca(struct ipmi_user *user)
{
struct ipmi_system_interface_addr smi_addr;
struct kernel_ipmi_msg send_msg;
......@@ -208,7 +208,7 @@ static void pps_poweroff_atca(ipmi_user_t user)
return;
}
static int ipmi_atca_detect(ipmi_user_t user)
static int ipmi_atca_detect(struct ipmi_user *user)
{
struct ipmi_system_interface_addr smi_addr;
struct kernel_ipmi_msg send_msg;
......@@ -245,7 +245,7 @@ static int ipmi_atca_detect(ipmi_user_t user)
return !rv;
}
static void ipmi_poweroff_atca(ipmi_user_t user)
static void ipmi_poweroff_atca(struct ipmi_user *user)
{
struct ipmi_system_interface_addr smi_addr;
struct kernel_ipmi_msg send_msg;
......@@ -309,13 +309,13 @@ static void ipmi_poweroff_atca(ipmi_user_t user)
#define IPMI_CPI1_PRODUCT_ID 0x000157
#define IPMI_CPI1_MANUFACTURER_ID 0x0108
static int ipmi_cpi1_detect(ipmi_user_t user)
static int ipmi_cpi1_detect(struct ipmi_user *user)
{
return ((mfg_id == IPMI_CPI1_MANUFACTURER_ID)
&& (prod_id == IPMI_CPI1_PRODUCT_ID));
}
static void ipmi_poweroff_cpi1(ipmi_user_t user)
static void ipmi_poweroff_cpi1(struct ipmi_user *user)
{
struct ipmi_system_interface_addr smi_addr;
struct ipmi_ipmb_addr ipmb_addr;
......@@ -424,7 +424,7 @@ static void ipmi_poweroff_cpi1(ipmi_user_t user)
*/
#define DELL_IANA_MFR_ID {0xA2, 0x02, 0x00}
static int ipmi_dell_chassis_detect(ipmi_user_t user)
static int ipmi_dell_chassis_detect(struct ipmi_user *user)
{
const char ipmi_version_major = ipmi_version & 0xF;
const char ipmi_version_minor = (ipmi_version >> 4) & 0xF;
......@@ -445,7 +445,7 @@ static int ipmi_dell_chassis_detect(ipmi_user_t user)
#define HP_IANA_MFR_ID 0x0b
#define HP_BMC_PROD_ID 0x8201
static int ipmi_hp_chassis_detect(ipmi_user_t user)
static int ipmi_hp_chassis_detect(struct ipmi_user *user)
{
if (mfg_id == HP_IANA_MFR_ID
&& prod_id == HP_BMC_PROD_ID
......@@ -461,13 +461,13 @@ static int ipmi_hp_chassis_detect(ipmi_user_t user)
#define IPMI_NETFN_CHASSIS_REQUEST 0
#define IPMI_CHASSIS_CONTROL_CMD 0x02
static int ipmi_chassis_detect(ipmi_user_t user)
static int ipmi_chassis_detect(struct ipmi_user *user)
{
/* Chassis support, use it. */
return (capabilities & 0x80);
}
static void ipmi_poweroff_chassis(ipmi_user_t user)
static void ipmi_poweroff_chassis(struct ipmi_user *user)
{
struct ipmi_system_interface_addr smi_addr;
struct kernel_ipmi_msg send_msg;
......@@ -517,8 +517,8 @@ static void ipmi_poweroff_chassis(ipmi_user_t user)
/* Table of possible power off functions. */
struct poweroff_function {
char *platform_type;
int (*detect)(ipmi_user_t user);
void (*poweroff_func)(ipmi_user_t user);
int (*detect)(struct ipmi_user *user);
void (*poweroff_func)(struct ipmi_user *user);
};
static struct poweroff_function poweroff_functions[] = {
......
......@@ -125,7 +125,7 @@
static DEFINE_MUTEX(ipmi_watchdog_mutex);
static bool nowayout = WATCHDOG_NOWAYOUT;
static ipmi_user_t watchdog_user;
static struct ipmi_user *watchdog_user;
static int watchdog_ifnum;
/* Default the timeout to 10 seconds. */
......@@ -1060,7 +1060,7 @@ static void ipmi_register_watchdog(int ipmi_intf)
static void ipmi_unregister_watchdog(int ipmi_intf)
{
int rv;
ipmi_user_t loc_user = watchdog_user;
struct ipmi_user *loc_user = watchdog_user;
if (!loc_user)
return;
......
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