aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorHal Rosenstock <hal.rosenstock@gmail.com>2007-08-03 13:45:17 -0400
committerRoland Dreier <rolandd@cisco.com>2007-08-03 13:45:17 -0400
commit8fc394b1971241999ef9b022feabf6a164791e3f (patch)
tree078b960d6adb100e68b030f9c8333bf34aa6f5ed /drivers/infiniband
parent86dfbecdea733a6e940b958e94a85af45b89a0b9 (diff)
IB/mad: agent_send_response() should be void
Nothing looks at the return value of agent_send_response(), so there's no point in returning anything. Signed-off-by: Hal Rosenstock <hal.rosenstock@gmail.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/core/agent.c24
-rw-r--r--drivers/infiniband/core/agent.h6
2 files changed, 13 insertions, 17 deletions
diff --git a/drivers/infiniband/core/agent.c b/drivers/infiniband/core/agent.c
index db2633e4aae6..ae7c2880e624 100644
--- a/drivers/infiniband/core/agent.c
+++ b/drivers/infiniband/core/agent.c
@@ -78,15 +78,14 @@ ib_get_agent_port(struct ib_device *device, int port_num)
78 return entry; 78 return entry;
79} 79}
80 80
81int agent_send_response(struct ib_mad *mad, struct ib_grh *grh, 81void agent_send_response(struct ib_mad *mad, struct ib_grh *grh,
82 struct ib_wc *wc, struct ib_device *device, 82 struct ib_wc *wc, struct ib_device *device,
83 int port_num, int qpn) 83 int port_num, int qpn)
84{ 84{
85 struct ib_agent_port_private *port_priv; 85 struct ib_agent_port_private *port_priv;
86 struct ib_mad_agent *agent; 86 struct ib_mad_agent *agent;
87 struct ib_mad_send_buf *send_buf; 87 struct ib_mad_send_buf *send_buf;
88 struct ib_ah *ah; 88 struct ib_ah *ah;
89 int ret;
90 struct ib_mad_send_wr_private *mad_send_wr; 89 struct ib_mad_send_wr_private *mad_send_wr;
91 90
92 if (device->node_type == RDMA_NODE_IB_SWITCH) 91 if (device->node_type == RDMA_NODE_IB_SWITCH)
@@ -96,23 +95,21 @@ int agent_send_response(struct ib_mad *mad, struct ib_grh *grh,
96 95
97 if (!port_priv) { 96 if (!port_priv) {
98 printk(KERN_ERR SPFX "Unable to find port agent\n"); 97 printk(KERN_ERR SPFX "Unable to find port agent\n");
99 return -ENODEV; 98 return;
100 } 99 }
101 100
102 agent = port_priv->agent[qpn]; 101 agent = port_priv->agent[qpn];
103 ah = ib_create_ah_from_wc(agent->qp->pd, wc, grh, port_num); 102 ah = ib_create_ah_from_wc(agent->qp->pd, wc, grh, port_num);
104 if (IS_ERR(ah)) { 103 if (IS_ERR(ah)) {
105 ret = PTR_ERR(ah); 104 printk(KERN_ERR SPFX "ib_create_ah_from_wc error\n");
106 printk(KERN_ERR SPFX "ib_create_ah_from_wc error:%d\n", ret); 105 return;
107 return ret;
108 } 106 }
109 107
110 send_buf = ib_create_send_mad(agent, wc->src_qp, wc->pkey_index, 0, 108 send_buf = ib_create_send_mad(agent, wc->src_qp, wc->pkey_index, 0,
111 IB_MGMT_MAD_HDR, IB_MGMT_MAD_DATA, 109 IB_MGMT_MAD_HDR, IB_MGMT_MAD_DATA,
112 GFP_KERNEL); 110 GFP_KERNEL);
113 if (IS_ERR(send_buf)) { 111 if (IS_ERR(send_buf)) {
114 ret = PTR_ERR(send_buf); 112 printk(KERN_ERR SPFX "ib_create_send_mad error\n");
115 printk(KERN_ERR SPFX "ib_create_send_mad error:%d\n", ret);
116 goto err1; 113 goto err1;
117 } 114 }
118 115
@@ -126,16 +123,15 @@ int agent_send_response(struct ib_mad *mad, struct ib_grh *grh,
126 mad_send_wr->send_wr.wr.ud.port_num = port_num; 123 mad_send_wr->send_wr.wr.ud.port_num = port_num;
127 } 124 }
128 125
129 if ((ret = ib_post_send_mad(send_buf, NULL))) { 126 if (ib_post_send_mad(send_buf, NULL)) {
130 printk(KERN_ERR SPFX "ib_post_send_mad error:%d\n", ret); 127 printk(KERN_ERR SPFX "ib_post_send_mad error\n");
131 goto err2; 128 goto err2;
132 } 129 }
133 return 0; 130 return;
134err2: 131err2:
135 ib_free_send_mad(send_buf); 132 ib_free_send_mad(send_buf);
136err1: 133err1:
137 ib_destroy_ah(ah); 134 ib_destroy_ah(ah);
138 return ret;
139} 135}
140 136
141static void agent_send_handler(struct ib_mad_agent *mad_agent, 137static void agent_send_handler(struct ib_mad_agent *mad_agent,
diff --git a/drivers/infiniband/core/agent.h b/drivers/infiniband/core/agent.h
index 86d72fab37b0..fb9ed1489f95 100644
--- a/drivers/infiniband/core/agent.h
+++ b/drivers/infiniband/core/agent.h
@@ -46,8 +46,8 @@ extern int ib_agent_port_open(struct ib_device *device, int port_num);
46 46
47extern int ib_agent_port_close(struct ib_device *device, int port_num); 47extern int ib_agent_port_close(struct ib_device *device, int port_num);
48 48
49extern int agent_send_response(struct ib_mad *mad, struct ib_grh *grh, 49extern void agent_send_response(struct ib_mad *mad, struct ib_grh *grh,
50 struct ib_wc *wc, struct ib_device *device, 50 struct ib_wc *wc, struct ib_device *device,
51 int port_num, int qpn); 51 int port_num, int qpn);
52 52
53#endif /* __AGENT_H_ */ 53#endif /* __AGENT_H_ */