aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ipath/ipath_verbs.c
diff options
context:
space:
mode:
authorRoland Dreier <rolandd@cisco.com>2006-04-19 14:40:12 -0400
committerRoland Dreier <rolandd@cisco.com>2006-04-19 14:40:12 -0400
commit5494c22ba293a37534591d793f73e445a66196b5 (patch)
tree6e3d5d25eed0ac80a32e85a834012ea6dde6d3d3 /drivers/infiniband/hw/ipath/ipath_verbs.c
parentac2ae4c9770de9450a8e881082a54bbb6f09534e (diff)
IB/ipath: Fix whitespace
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_verbs.c')
-rw-r--r--drivers/infiniband/hw/ipath/ipath_verbs.c110
1 files changed, 55 insertions, 55 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_verbs.c b/drivers/infiniband/hw/ipath/ipath_verbs.c
index e3be4921087e..8d2558a01f35 100644
--- a/drivers/infiniband/hw/ipath/ipath_verbs.c
+++ b/drivers/infiniband/hw/ipath/ipath_verbs.c
@@ -1125,26 +1125,26 @@ static void __exit ipath_verbs_cleanup(void)
1125 1125
1126static ssize_t show_rev(struct class_device *cdev, char *buf) 1126static ssize_t show_rev(struct class_device *cdev, char *buf)
1127{ 1127{
1128 struct ipath_ibdev *dev = 1128 struct ipath_ibdev *dev =
1129 container_of(cdev, struct ipath_ibdev, ibdev.class_dev); 1129 container_of(cdev, struct ipath_ibdev, ibdev.class_dev);
1130 int vendor, boardrev, majrev, minrev; 1130 int vendor, boardrev, majrev, minrev;
1131 1131
1132 ipath_layer_query_device(dev->dd, &vendor, &boardrev, 1132 ipath_layer_query_device(dev->dd, &vendor, &boardrev,
1133 &majrev, &minrev); 1133 &majrev, &minrev);
1134 return sprintf(buf, "%d.%d\n", majrev, minrev); 1134 return sprintf(buf, "%d.%d\n", majrev, minrev);
1135} 1135}
1136 1136
1137static ssize_t show_hca(struct class_device *cdev, char *buf) 1137static ssize_t show_hca(struct class_device *cdev, char *buf)
1138{ 1138{
1139 struct ipath_ibdev *dev = 1139 struct ipath_ibdev *dev =
1140 container_of(cdev, struct ipath_ibdev, ibdev.class_dev); 1140 container_of(cdev, struct ipath_ibdev, ibdev.class_dev);
1141 int ret; 1141 int ret;
1142 1142
1143 ret = ipath_layer_get_boardname(dev->dd, buf, 128); 1143 ret = ipath_layer_get_boardname(dev->dd, buf, 128);
1144 if (ret < 0) 1144 if (ret < 0)
1145 goto bail; 1145 goto bail;
1146 strcat(buf, "\n"); 1146 strcat(buf, "\n");
1147 ret = strlen(buf); 1147 ret = strlen(buf);
1148 1148
1149bail: 1149bail:
1150 return ret; 1150 return ret;
@@ -1152,40 +1152,40 @@ bail:
1152 1152
1153static ssize_t show_stats(struct class_device *cdev, char *buf) 1153static ssize_t show_stats(struct class_device *cdev, char *buf)
1154{ 1154{
1155 struct ipath_ibdev *dev = 1155 struct ipath_ibdev *dev =
1156 container_of(cdev, struct ipath_ibdev, ibdev.class_dev); 1156 container_of(cdev, struct ipath_ibdev, ibdev.class_dev);
1157 int i; 1157 int i;
1158 int len; 1158 int len;
1159 1159
1160 len = sprintf(buf, 1160 len = sprintf(buf,
1161 "RC resends %d\n" 1161 "RC resends %d\n"
1162 "RC QACKs %d\n" 1162 "RC QACKs %d\n"
1163 "RC ACKs %d\n" 1163 "RC ACKs %d\n"
1164 "RC SEQ NAKs %d\n" 1164 "RC SEQ NAKs %d\n"
1165 "RC RDMA seq %d\n" 1165 "RC RDMA seq %d\n"
1166 "RC RNR NAKs %d\n" 1166 "RC RNR NAKs %d\n"
1167 "RC OTH NAKs %d\n" 1167 "RC OTH NAKs %d\n"
1168 "RC timeouts %d\n" 1168 "RC timeouts %d\n"
1169 "RC RDMA dup %d\n" 1169 "RC RDMA dup %d\n"
1170 "piobuf wait %d\n" 1170 "piobuf wait %d\n"
1171 "no piobuf %d\n" 1171 "no piobuf %d\n"
1172 "PKT drops %d\n" 1172 "PKT drops %d\n"
1173 "WQE errs %d\n", 1173 "WQE errs %d\n",
1174 dev->n_rc_resends, dev->n_rc_qacks, dev->n_rc_acks, 1174 dev->n_rc_resends, dev->n_rc_qacks, dev->n_rc_acks,
1175 dev->n_seq_naks, dev->n_rdma_seq, dev->n_rnr_naks, 1175 dev->n_seq_naks, dev->n_rdma_seq, dev->n_rnr_naks,
1176 dev->n_other_naks, dev->n_timeouts, 1176 dev->n_other_naks, dev->n_timeouts,
1177 dev->n_rdma_dup_busy, dev->n_piowait, 1177 dev->n_rdma_dup_busy, dev->n_piowait,
1178 dev->n_no_piobuf, dev->n_pkt_drops, dev->n_wqe_errs); 1178 dev->n_no_piobuf, dev->n_pkt_drops, dev->n_wqe_errs);
1179 for (i = 0; i < ARRAY_SIZE(dev->opstats); i++) { 1179 for (i = 0; i < ARRAY_SIZE(dev->opstats); i++) {
1180 const struct ipath_opcode_stats *si = &dev->opstats[i]; 1180 const struct ipath_opcode_stats *si = &dev->opstats[i];
1181 1181
1182 if (!si->n_packets && !si->n_bytes) 1182 if (!si->n_packets && !si->n_bytes)
1183 continue; 1183 continue;
1184 len += sprintf(buf + len, "%02x %llu/%llu\n", i, 1184 len += sprintf(buf + len, "%02x %llu/%llu\n", i,
1185 (unsigned long long) si->n_packets, 1185 (unsigned long long) si->n_packets,
1186 (unsigned long long) si->n_bytes); 1186 (unsigned long long) si->n_bytes);
1187 } 1187 }
1188 return len; 1188 return len;
1189} 1189}
1190 1190
1191static CLASS_DEVICE_ATTR(hw_rev, S_IRUGO, show_rev, NULL); 1191static CLASS_DEVICE_ATTR(hw_rev, S_IRUGO, show_rev, NULL);
@@ -1194,25 +1194,25 @@ static CLASS_DEVICE_ATTR(board_id, S_IRUGO, show_hca, NULL);
1194static CLASS_DEVICE_ATTR(stats, S_IRUGO, show_stats, NULL); 1194static CLASS_DEVICE_ATTR(stats, S_IRUGO, show_stats, NULL);
1195 1195
1196static struct class_device_attribute *ipath_class_attributes[] = { 1196static struct class_device_attribute *ipath_class_attributes[] = {
1197 &class_device_attr_hw_rev, 1197 &class_device_attr_hw_rev,
1198 &class_device_attr_hca_type, 1198 &class_device_attr_hca_type,
1199 &class_device_attr_board_id, 1199 &class_device_attr_board_id,
1200 &class_device_attr_stats 1200 &class_device_attr_stats
1201}; 1201};
1202 1202
1203static int ipath_verbs_register_sysfs(struct ib_device *dev) 1203static int ipath_verbs_register_sysfs(struct ib_device *dev)
1204{ 1204{
1205 int i; 1205 int i;
1206 int ret; 1206 int ret;
1207 1207
1208 for (i = 0; i < ARRAY_SIZE(ipath_class_attributes); ++i) 1208 for (i = 0; i < ARRAY_SIZE(ipath_class_attributes); ++i)
1209 if (class_device_create_file(&dev->class_dev, 1209 if (class_device_create_file(&dev->class_dev,
1210 ipath_class_attributes[i])) { 1210 ipath_class_attributes[i])) {
1211 ret = 1; 1211 ret = 1;
1212 goto bail; 1212 goto bail;
1213 } 1213 }
1214 1214
1215 ret = 0; 1215 ret = 0;
1216 1216
1217bail: 1217bail:
1218 return ret; 1218 return ret;