diff options
author | Bryan O'Sullivan <bos@pathscale.com> | 2006-07-01 07:36:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-01 12:56:01 -0400 |
commit | 46bbeac922906559ec46454cbc76caf03bc57353 (patch) | |
tree | 4834eacc3c4c0bd9c8b882a377e32511ec3b4a91 | |
parent | 1eb68b990aab4c007e520acae39c74d8116693bc (diff) |
[PATCH] IB/ipath: drop the "stats" sysfs attribute group
This attribute group made it into the original driver, but should not have.
Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Cc: "Michael S. Tsirkin" <mst@mellanox.co.il>
Cc: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_sysfs.c | 83 |
1 files changed, 0 insertions, 83 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_sysfs.c b/drivers/infiniband/hw/ipath/ipath_sysfs.c index 59694f1ef3ad..bb75076c182f 100644 --- a/drivers/infiniband/hw/ipath/ipath_sysfs.c +++ b/drivers/infiniband/hw/ipath/ipath_sysfs.c | |||
@@ -85,81 +85,6 @@ static ssize_t show_num_units(struct device_driver *dev, char *buf) | |||
85 | ipath_count_units(NULL, NULL, NULL)); | 85 | ipath_count_units(NULL, NULL, NULL)); |
86 | } | 86 | } |
87 | 87 | ||
88 | #define DRIVER_STAT(name, attr) \ | ||
89 | static ssize_t show_stat_##name(struct device_driver *dev, \ | ||
90 | char *buf) \ | ||
91 | { \ | ||
92 | return scnprintf( \ | ||
93 | buf, PAGE_SIZE, "%llu\n", \ | ||
94 | (unsigned long long) ipath_stats.sps_ ##attr); \ | ||
95 | } \ | ||
96 | static DRIVER_ATTR(name, S_IRUGO, show_stat_##name, NULL) | ||
97 | |||
98 | DRIVER_STAT(intrs, ints); | ||
99 | DRIVER_STAT(err_intrs, errints); | ||
100 | DRIVER_STAT(errs, errs); | ||
101 | DRIVER_STAT(pkt_errs, pkterrs); | ||
102 | DRIVER_STAT(crc_errs, crcerrs); | ||
103 | DRIVER_STAT(hw_errs, hwerrs); | ||
104 | DRIVER_STAT(ib_link, iblink); | ||
105 | DRIVER_STAT(port0_pkts, port0pkts); | ||
106 | DRIVER_STAT(ether_spkts, ether_spkts); | ||
107 | DRIVER_STAT(ether_rpkts, ether_rpkts); | ||
108 | DRIVER_STAT(sma_spkts, sma_spkts); | ||
109 | DRIVER_STAT(sma_rpkts, sma_rpkts); | ||
110 | DRIVER_STAT(hdrq_full, hdrqfull); | ||
111 | DRIVER_STAT(etid_full, etidfull); | ||
112 | DRIVER_STAT(no_piobufs, nopiobufs); | ||
113 | DRIVER_STAT(ports, ports); | ||
114 | DRIVER_STAT(pkey0, pkeys[0]); | ||
115 | DRIVER_STAT(pkey1, pkeys[1]); | ||
116 | DRIVER_STAT(pkey2, pkeys[2]); | ||
117 | DRIVER_STAT(pkey3, pkeys[3]); | ||
118 | |||
119 | DRIVER_STAT(nports, nports); | ||
120 | DRIVER_STAT(null_intr, nullintr); | ||
121 | DRIVER_STAT(max_pkts_call, maxpkts_call); | ||
122 | DRIVER_STAT(avg_pkts_call, avgpkts_call); | ||
123 | DRIVER_STAT(page_locks, pagelocks); | ||
124 | DRIVER_STAT(page_unlocks, pageunlocks); | ||
125 | DRIVER_STAT(krdrops, krdrops); | ||
126 | |||
127 | static struct attribute *driver_stat_attributes[] = { | ||
128 | &driver_attr_intrs.attr, | ||
129 | &driver_attr_err_intrs.attr, | ||
130 | &driver_attr_errs.attr, | ||
131 | &driver_attr_pkt_errs.attr, | ||
132 | &driver_attr_crc_errs.attr, | ||
133 | &driver_attr_hw_errs.attr, | ||
134 | &driver_attr_ib_link.attr, | ||
135 | &driver_attr_port0_pkts.attr, | ||
136 | &driver_attr_ether_spkts.attr, | ||
137 | &driver_attr_ether_rpkts.attr, | ||
138 | &driver_attr_sma_spkts.attr, | ||
139 | &driver_attr_sma_rpkts.attr, | ||
140 | &driver_attr_hdrq_full.attr, | ||
141 | &driver_attr_etid_full.attr, | ||
142 | &driver_attr_no_piobufs.attr, | ||
143 | &driver_attr_ports.attr, | ||
144 | &driver_attr_pkey0.attr, | ||
145 | &driver_attr_pkey1.attr, | ||
146 | &driver_attr_pkey2.attr, | ||
147 | &driver_attr_pkey3.attr, | ||
148 | &driver_attr_nports.attr, | ||
149 | &driver_attr_null_intr.attr, | ||
150 | &driver_attr_max_pkts_call.attr, | ||
151 | &driver_attr_avg_pkts_call.attr, | ||
152 | &driver_attr_page_locks.attr, | ||
153 | &driver_attr_page_unlocks.attr, | ||
154 | &driver_attr_krdrops.attr, | ||
155 | NULL | ||
156 | }; | ||
157 | |||
158 | static struct attribute_group driver_stat_attr_group = { | ||
159 | .name = "stats", | ||
160 | .attrs = driver_stat_attributes | ||
161 | }; | ||
162 | |||
163 | static ssize_t show_status(struct device *dev, | 88 | static ssize_t show_status(struct device *dev, |
164 | struct device_attribute *attr, | 89 | struct device_attribute *attr, |
165 | char *buf) | 90 | char *buf) |
@@ -716,20 +641,12 @@ int ipath_driver_create_group(struct device_driver *drv) | |||
716 | int ret; | 641 | int ret; |
717 | 642 | ||
718 | ret = sysfs_create_group(&drv->kobj, &driver_attr_group); | 643 | ret = sysfs_create_group(&drv->kobj, &driver_attr_group); |
719 | if (ret) | ||
720 | goto bail; | ||
721 | 644 | ||
722 | ret = sysfs_create_group(&drv->kobj, &driver_stat_attr_group); | ||
723 | if (ret) | ||
724 | sysfs_remove_group(&drv->kobj, &driver_attr_group); | ||
725 | |||
726 | bail: | ||
727 | return ret; | 645 | return ret; |
728 | } | 646 | } |
729 | 647 | ||
730 | void ipath_driver_remove_group(struct device_driver *drv) | 648 | void ipath_driver_remove_group(struct device_driver *drv) |
731 | { | 649 | { |
732 | sysfs_remove_group(&drv->kobj, &driver_stat_attr_group); | ||
733 | sysfs_remove_group(&drv->kobj, &driver_attr_group); | 650 | sysfs_remove_group(&drv->kobj, &driver_attr_group); |
734 | } | 651 | } |
735 | 652 | ||