ID:355 - Fix ``obsolete use of designated initializer with ‘:’'' warning

Commit fixes compiler warning ``obsolete use of designated initializer with
‘:’''. Use of ``fieldname: value'' has been obsolete since GCC 2.5.
This commit is contained in:
Zdenek Styblik 2014-12-29 08:37:58 +01:00
parent ce02ffaf2a
commit 70984dcad5
10 changed files with 128 additions and 126 deletions

View File

@ -130,43 +130,41 @@ struct bitfield_data {
const char * name; const char * name;
const char * desc; const char * desc;
uint32_t mask; uint32_t mask;
}; } mc_enables_bf[] = {
struct bitfield_data mc_enables_bf[] = {
{ {
name: "recv_msg_intr", .name = "recv_msg_intr",
desc: "Receive Message Queue Interrupt", .desc = "Receive Message Queue Interrupt",
mask: 1<<0, .mask = 1<<0,
}, },
{ {
name: "event_msg_intr", .name = "event_msg_intr",
desc: "Event Message Buffer Full Interrupt", .desc = "Event Message Buffer Full Interrupt",
mask: 1<<1, .mask = 1<<1,
}, },
{ {
name: "event_msg", .name = "event_msg",
desc: "Event Message Buffer", .desc = "Event Message Buffer",
mask: 1<<2, .mask = 1<<2,
}, },
{ {
name: "system_event_log", .name = "system_event_log",
desc: "System Event Logging", .desc = "System Event Logging",
mask: 1<<3, .mask = 1<<3,
}, },
{ {
name: "oem0", .name = "oem0",
desc: "OEM 0", .desc = "OEM 0",
mask: 1<<5, .mask = 1<<5,
}, },
{ {
name: "oem1", .name = "oem1",
desc: "OEM 1", .desc = "OEM 1",
mask: 1<<6, .mask = 1<<6,
}, },
{ {
name: "oem2", .name = "oem2",
desc: "OEM 2", .desc = "OEM 2",
mask: 1<<7, .mask = 1<<7,
}, },
{ NULL }, { NULL },
}; };

View File

@ -42,34 +42,34 @@ static int ipmi_oem_ibm(struct ipmi_intf * intf);
static struct ipmi_oem_handle ipmi_oem_list[] = { static struct ipmi_oem_handle ipmi_oem_list[] = {
{ {
name: "supermicro", .name = "supermicro",
desc: "Supermicro IPMIv1.5 BMC with OEM LAN authentication support", .desc = "Supermicro IPMIv1.5 BMC with OEM LAN authentication support",
setup: ipmi_oem_supermicro, .setup = ipmi_oem_supermicro,
}, },
{ {
name: "intelwv2", .name = "intelwv2",
desc: "Intel SE7501WV2 IPMIv1.5 BMC with extra LAN communication support", .desc = "Intel SE7501WV2 IPMIv1.5 BMC with extra LAN communication support",
}, },
{ {
name: "intelplus", .name = "intelplus",
desc: "Intel IPMI 2.0 BMC with RMCP+ communication support", .desc = "Intel IPMI 2.0 BMC with RMCP+ communication support",
}, },
{ {
name: "icts", .name = "icts",
desc: "IPMI 2.0 ICTS compliance support", .desc = "IPMI 2.0 ICTS compliance support",
}, },
{ {
name: "ibm", .name = "ibm",
desc: "IBM OEM support", .desc = "IBM OEM support",
setup: ipmi_oem_ibm, .setup = ipmi_oem_ibm,
}, },
{ {
name: "i82571spt", .name = "i82571spt",
desc: "Intel 82571 MAC with integrated RMCP+ support in super pass-through mode", .desc = "Intel 82571 MAC with integrated RMCP+ support in super pass-through mode",
}, },
{ {
name: "kontron", .name = "kontron",
desc: "Kontron OEM big buffer support" .desc = "Kontron OEM big buffer support"
}, },
{ 0 } { 0 }
}; };

View File

@ -123,13 +123,13 @@ static int openipmi_setup(struct ipmi_event_intf * eintf);
static int openipmi_wait(struct ipmi_event_intf * eintf); static int openipmi_wait(struct ipmi_event_intf * eintf);
static int openipmi_read(struct ipmi_event_intf * eintf); static int openipmi_read(struct ipmi_event_intf * eintf);
static struct ipmi_event_intf openipmi_event_intf = { static struct ipmi_event_intf openipmi_event_intf = {
name: "open", .name = "open",
desc: "OpenIPMI asyncronous notification of events", .desc = "OpenIPMI asyncronous notification of events",
prefix: "", .prefix = "",
setup: openipmi_setup, .setup = openipmi_setup,
wait: openipmi_wait, .wait = openipmi_wait,
read: openipmi_read, .read = openipmi_read,
log: log_event, .log = log_event,
}; };
#endif #endif
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
@ -140,13 +140,13 @@ static int selwatch_wait(struct ipmi_event_intf * eintf);
static int selwatch_read(struct ipmi_event_intf * eintf); static int selwatch_read(struct ipmi_event_intf * eintf);
static int selwatch_check(struct ipmi_event_intf * eintf); static int selwatch_check(struct ipmi_event_intf * eintf);
static struct ipmi_event_intf selwatch_event_intf = { static struct ipmi_event_intf selwatch_event_intf = {
name: "sel", .name = "sel",
desc: "Poll SEL for notification of events", .desc = "Poll SEL for notification of events",
setup: selwatch_setup, .setup = selwatch_setup,
wait: selwatch_wait, .wait = selwatch_wait,
read: selwatch_read, .read = selwatch_read,
check: selwatch_check, .check = selwatch_check,
log: log_event, .log = log_event,
}; };
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */

View File

@ -276,11 +276,11 @@ ipmi_dummyipmi_send_cmd(struct ipmi_intf *intf, struct ipmi_rq *req)
} }
struct ipmi_intf ipmi_dummy_intf = { struct ipmi_intf ipmi_dummy_intf = {
name: "dummy", .name = "dummy",
desc: "Linux DummyIPMI Interface", .desc = "Linux DummyIPMI Interface",
open: ipmi_dummyipmi_open, .open = ipmi_dummyipmi_open,
close: ipmi_dummyipmi_close, .close = ipmi_dummyipmi_close,
sendrecv: ipmi_dummyipmi_send_cmd, .sendrecv = ipmi_dummyipmi_send_cmd,
my_addr: IPMI_BMC_SLAVE_ADDR, .my_addr = IPMI_BMC_SLAVE_ADDR,
target_addr: IPMI_BMC_SLAVE_ADDR, .target_addr = IPMI_BMC_SLAVE_ADDR,
}; };

View File

@ -121,11 +121,11 @@ static struct ipmi_rs * ipmi_imb_send_cmd(struct ipmi_intf * intf, struct ipmi_r
} }
struct ipmi_intf ipmi_imb_intf = { struct ipmi_intf ipmi_imb_intf = {
name: "imb", .name = "imb",
desc: "Intel IMB Interface", .desc = "Intel IMB Interface",
open: ipmi_imb_open, .open = ipmi_imb_open,
close: ipmi_imb_close, .close = ipmi_imb_close,
sendrecv: ipmi_imb_send_cmd, .sendrecv = ipmi_imb_send_cmd,
target_addr: IPMI_BMC_SLAVE_ADDR, .target_addr = IPMI_BMC_SLAVE_ADDR,
}; };

View File

@ -103,19 +103,19 @@ static void ipmi_lan_set_max_rq_data_size(struct ipmi_intf * intf, uint16_t size
static void ipmi_lan_set_max_rp_data_size(struct ipmi_intf * intf, uint16_t size); static void ipmi_lan_set_max_rp_data_size(struct ipmi_intf * intf, uint16_t size);
struct ipmi_intf ipmi_lan_intf = { struct ipmi_intf ipmi_lan_intf = {
name: "lan", .name = "lan",
desc: "IPMI v1.5 LAN Interface", .desc = "IPMI v1.5 LAN Interface",
setup: ipmi_lan_setup, .setup = ipmi_lan_setup,
open: ipmi_lan_open, .open = ipmi_lan_open,
close: ipmi_lan_close, .close = ipmi_lan_close,
sendrecv: ipmi_lan_send_cmd, .sendrecv = ipmi_lan_send_cmd,
sendrsp: ipmi_lan_send_rsp, .sendrsp = ipmi_lan_send_rsp,
recv_sol: ipmi_lan_recv_sol, .recv_sol = ipmi_lan_recv_sol,
send_sol: ipmi_lan_send_sol, .send_sol = ipmi_lan_send_sol,
keepalive: ipmi_lan_keepalive, .keepalive = ipmi_lan_keepalive,
set_max_request_data_size: ipmi_lan_set_max_rq_data_size, .set_max_request_data_size = ipmi_lan_set_max_rq_data_size,
set_max_response_data_size: ipmi_lan_set_max_rp_data_size, .set_max_response_data_size = ipmi_lan_set_max_rp_data_size,
target_addr: IPMI_BMC_SLAVE_ADDR, .target_addr = IPMI_BMC_SLAVE_ADDR,
}; };
static struct ipmi_rq_entry * static struct ipmi_rq_entry *
@ -1552,10 +1552,12 @@ static int
ipmi_lan_keepalive(struct ipmi_intf * intf) ipmi_lan_keepalive(struct ipmi_intf * intf)
{ {
struct ipmi_rs * rsp; struct ipmi_rs * rsp;
struct ipmi_rq req = { msg: { struct ipmi_rq req = {
netfn: IPMI_NETFN_APP, .msg = {
cmd: 1, .netfn = IPMI_NETFN_APP,
}}; .cmd = 1,
}
};
if (!intf->opened) if (!intf->opened)
return 0; return 0;

View File

@ -129,18 +129,18 @@ static void ipmi_lanp_set_max_rp_data_size(struct ipmi_intf * intf, uint16_t siz
static uint8_t bridgePossible = 0; static uint8_t bridgePossible = 0;
struct ipmi_intf ipmi_lanplus_intf = { struct ipmi_intf ipmi_lanplus_intf = {
name: "lanplus", .name = "lanplus",
desc: "IPMI v2.0 RMCP+ LAN Interface", .desc = "IPMI v2.0 RMCP+ LAN Interface",
setup: ipmi_lanplus_setup, .setup = ipmi_lanplus_setup,
open: ipmi_lanplus_open, .open = ipmi_lanplus_open,
close: ipmi_lanplus_close, .close = ipmi_lanplus_close,
sendrecv: ipmi_lanplus_send_ipmi_cmd, .sendrecv = ipmi_lanplus_send_ipmi_cmd,
recv_sol: ipmi_lanplus_recv_sol, .recv_sol = ipmi_lanplus_recv_sol,
send_sol: ipmi_lanplus_send_sol, .send_sol = ipmi_lanplus_send_sol,
keepalive: ipmi_lanplus_keepalive, .keepalive = ipmi_lanplus_keepalive,
set_max_request_data_size: ipmi_lanp_set_max_rq_data_size, .set_max_request_data_size = ipmi_lanp_set_max_rq_data_size,
set_max_response_data_size: ipmi_lanp_set_max_rp_data_size, .set_max_response_data_size = ipmi_lanp_set_max_rp_data_size,
target_addr: IPMI_BMC_SLAVE_ADDR, .target_addr = IPMI_BMC_SLAVE_ADDR,
}; };
@ -3593,10 +3593,12 @@ static int
ipmi_lanplus_keepalive(struct ipmi_intf * intf) ipmi_lanplus_keepalive(struct ipmi_intf * intf)
{ {
struct ipmi_rs * rsp; struct ipmi_rs * rsp;
struct ipmi_rq req = { msg: { struct ipmi_rq req = {
netfn: IPMI_NETFN_APP, .msg = {
cmd: 1, .netfn = IPMI_NETFN_APP,
}}; .cmd = 1,
}
};
if (!intf->opened) if (!intf->opened)
return 0; return 0;

View File

@ -166,11 +166,11 @@ ipmi_openipmi_send_cmd(struct ipmi_intf * intf, struct ipmi_rq * req)
struct ipmi_recv recv; struct ipmi_recv recv;
struct ipmi_addr addr; struct ipmi_addr addr;
struct ipmi_system_interface_addr bmc_addr = { struct ipmi_system_interface_addr bmc_addr = {
addr_type: IPMI_SYSTEM_INTERFACE_ADDR_TYPE, .addr_type = IPMI_SYSTEM_INTERFACE_ADDR_TYPE,
channel: IPMI_BMC_CHANNEL, .channel = IPMI_BMC_CHANNEL,
}; };
struct ipmi_ipmb_addr ipmb_addr = { struct ipmi_ipmb_addr ipmb_addr = {
addr_type: IPMI_IPMB_ADDR_TYPE, .addr_type = IPMI_IPMB_ADDR_TYPE,
}; };
struct ipmi_req _req; struct ipmi_req _req;
static struct ipmi_rs rsp; static struct ipmi_rs rsp;
@ -434,13 +434,13 @@ int ipmi_openipmi_setup(struct ipmi_intf * intf)
} }
struct ipmi_intf ipmi_open_intf = { struct ipmi_intf ipmi_open_intf = {
name: "open", .name = "open",
desc: "Linux OpenIPMI Interface", .desc = "Linux OpenIPMI Interface",
setup: ipmi_openipmi_setup, .setup = ipmi_openipmi_setup,
open: ipmi_openipmi_open, .open = ipmi_openipmi_open,
close: ipmi_openipmi_close, .close = ipmi_openipmi_close,
sendrecv: ipmi_openipmi_send_cmd, .sendrecv = ipmi_openipmi_send_cmd,
set_my_addr: ipmi_openipmi_set_my_addr, .set_my_addr = ipmi_openipmi_set_my_addr,
my_addr: IPMI_BMC_SLAVE_ADDR, .my_addr = IPMI_BMC_SLAVE_ADDR,
target_addr: 0, /* init so -m local_addr does not cause bridging */ .target_addr = 0, /* init so -m local_addr does not cause bridging */
}; };

View File

@ -1015,11 +1015,11 @@ serial_bm_set_my_addr(struct ipmi_intf * intf, uint8_t addr)
* Serial BM interface * Serial BM interface
*/ */
struct ipmi_intf ipmi_serial_bm_intf = { struct ipmi_intf ipmi_serial_bm_intf = {
name: "serial-basic", .name = "serial-basic",
desc: "Serial Interface, Basic Mode", .desc = "Serial Interface, Basic Mode",
setup: serial_bm_setup, .setup = serial_bm_setup,
open: serial_bm_open, .open = serial_bm_open,
close: serial_bm_close, .close = serial_bm_close,
sendrecv: serial_bm_send_request, .sendrecv = serial_bm_send_request,
set_my_addr:serial_bm_set_my_addr .set_my_addr = serial_bm_set_my_addr
}; };

View File

@ -905,11 +905,11 @@ ipmi_serial_term_set_my_addr(struct ipmi_intf * intf, uint8_t addr)
} }
struct ipmi_intf ipmi_serial_term_intf = { struct ipmi_intf ipmi_serial_term_intf = {
name: "serial-terminal", .name = "serial-terminal",
desc: "Serial Interface, Terminal Mode", .desc = "Serial Interface, Terminal Mode",
setup: ipmi_serial_term_setup, .setup = ipmi_serial_term_setup,
open: ipmi_serial_term_open, .open = ipmi_serial_term_open,
close: ipmi_serial_term_close, .close = ipmi_serial_term_close,
sendrecv: ipmi_serial_term_send_cmd, .sendrecv = ipmi_serial_term_send_cmd,
set_my_addr:ipmi_serial_term_set_my_addr .set_my_addr = ipmi_serial_term_set_my_addr
}; };