[openib-general] [PATCH] use C99 struct initilization syntax in SDP
Tom Duffy
tduffy at sun.com
Fri Feb 11 10:10:51 PST 2005
use C99, otherwise sparse complains
Signed-off-by: Tom Duffy <tduffy at sun.com>
Index: drivers/infiniband/ulp/sdp/sdp_proc.c
===================================================================
--- drivers/infiniband/ulp/sdp/sdp_proc.c (revision 1766)
+++ drivers/infiniband/ulp/sdp/sdp_proc.c (working copy)
@@ -81,40 +81,40 @@ static int _sdp_proc_read_parse(char *pa
*/
static struct sdpc_proc_ent _file_entry_list[SDP_PROC_ENTRIES] = {
{
- entry: NULL,
- type: SDP_PROC_ENTRY_MAIN_BUFF,
- name: "buffer_pool",
- read: sdp_proc_dump_buff_pool,
+ .entry = NULL,
+ .type = SDP_PROC_ENTRY_MAIN_BUFF,
+ .name = "buffer_pool",
+ .read = sdp_proc_dump_buff_pool,
},
{
- entry: NULL,
- type: SDP_PROC_ENTRY_MAIN_CONN,
- name: "conn_main",
- read: sdp_proc_dump_conn_main,
+ .entry = NULL,
+ .type = SDP_PROC_ENTRY_MAIN_CONN,
+ .name = "conn_main",
+ .read = sdp_proc_dump_conn_main,
},
{
- entry: NULL,
- type: SDP_PROC_ENTRY_DATA_CONN,
- name: "conn_data",
- read: sdp_proc_dump_conn_data,
+ .entry = NULL,
+ .type = SDP_PROC_ENTRY_DATA_CONN,
+ .name = "conn_data",
+ .read = sdp_proc_dump_conn_data,
},
{
- entry: NULL,
- type: SDP_PROC_ENTRY_RDMA_CONN,
- name: "conn_rdma",
- read: sdp_proc_dump_conn_rdma,
+ .entry = NULL,
+ .type = SDP_PROC_ENTRY_RDMA_CONN,
+ .name = "conn_rdma",
+ .read = sdp_proc_dump_conn_rdma,
},
{
- entry: NULL,
- type: SDP_PROC_ENTRY_OPT_CONN,
- name: "opt_conn",
- read: sdp_proc_dump_conn_sopt,
+ .entry = NULL,
+ .type = SDP_PROC_ENTRY_OPT_CONN,
+ .name = "opt_conn",
+ .read = sdp_proc_dump_conn_sopt,
},
{
- entry: NULL,
- type: SDP_PROC_ENTRY_ROOT_TABLE,
- name: "devices",
- read: sdp_proc_dump_device,
+ .entry = NULL,
+ .type = SDP_PROC_ENTRY_ROOT_TABLE,
+ .name = "devices",
+ .read = sdp_proc_dump_device,
},
} ;
Index: drivers/infiniband/ulp/sdp/sdp_inet.c
===================================================================
--- drivers/infiniband/ulp/sdp/sdp_inet.c (revision 1766)
+++ drivers/infiniband/ulp/sdp/sdp_inet.c (working copy)
@@ -1622,24 +1521,24 @@ static int _sdp_inet_shutdown(struct soc
/* */
/* --------------------------------------------------------------------- */
struct proto_ops _lnx_stream_ops = {
- family: AF_INET_SDP,
- release: _sdp_inet_release,
- bind: _sdp_inet_bind,
- connect: _sdp_inet_connect,
- listen: _sdp_inet_listen,
- accept: _sdp_inet_accept,
- sendmsg: sdp_inet_send,
- recvmsg: sdp_inet_recv,
- getname: _sdp_inet_getname,
- poll: _sdp_inet_poll,
- setsockopt: _sdp_inet_setopt,
- getsockopt: _sdp_inet_getopt,
- shutdown: _sdp_inet_shutdown,
- ioctl: _sdp_inet_ioctl,
- sendpage: sock_no_sendpage,
- socketpair: sock_no_socketpair,
- mmap: sock_no_mmap,
- owner: THIS_MODULE,
+ .family = AF_INET_SDP,
+ .release = _sdp_inet_release,
+ .bind = _sdp_inet_bind,
+ .connect = _sdp_inet_connect,
+ .listen = _sdp_inet_listen,
+ .accept = _sdp_inet_accept,
+ .sendmsg = sdp_inet_send,
+ .recvmsg = sdp_inet_recv,
+ .getname = _sdp_inet_getname,
+ .poll = _sdp_inet_poll,
+ .setsockopt = _sdp_inet_setopt,
+ .getsockopt = _sdp_inet_getopt,
+ .shutdown = _sdp_inet_shutdown,
+ .ioctl = _sdp_inet_ioctl,
+ .sendpage = sock_no_sendpage,
+ .socketpair = sock_no_socketpair,
+ .mmap = sock_no_mmap,
+ .owner = THIS_MODULE,
}; /* _lnx_stream_ops */
@@ -1695,9 +1594,9 @@ static int _sdp_inet_create(struct socke
/* */
/* --------------------------------------------------------------------- */
static struct net_proto_family _sdp_proto = {
- family: AF_INET_SDP,
- create: _sdp_inet_create,
- owner: THIS_MODULE,
+ .family = AF_INET_SDP,
+ .create = _sdp_inet_create,
+ .owner = THIS_MODULE,
}; /* _pf_family */
/* --------------------------------------------------------------------- */
More information about the general
mailing list