@@ -214,8 +214,8 @@ static const struct attribute_group port_linkcontrol_group = {
214
214
* Congestion control table size followed by table entries
215
215
*/
216
216
static ssize_t cc_table_bin_read (struct file * filp , struct kobject * kobj ,
217
- struct bin_attribute * bin_attr , char * buf ,
218
- loff_t pos , size_t count )
217
+ const struct bin_attribute * bin_attr ,
218
+ char * buf , loff_t pos , size_t count )
219
219
{
220
220
struct qib_pportdata * ppd = qib_get_pportdata_kobj (kobj );
221
221
int ret ;
@@ -241,16 +241,16 @@ static ssize_t cc_table_bin_read(struct file *filp, struct kobject *kobj,
241
241
242
242
return count ;
243
243
}
244
- static BIN_ATTR_RO (cc_table_bin , PAGE_SIZE ) ;
244
+ static const BIN_ATTR_RO (cc_table_bin , PAGE_SIZE ) ;
245
245
246
246
/*
247
247
* Congestion settings: port control, control map and an array of 16
248
248
* entries for the congestion entries - increase, timer, event log
249
249
* trigger threshold and the minimum injection rate delay.
250
250
*/
251
251
static ssize_t cc_setting_bin_read (struct file * filp , struct kobject * kobj ,
252
- struct bin_attribute * bin_attr , char * buf ,
253
- loff_t pos , size_t count )
252
+ const struct bin_attribute * bin_attr ,
253
+ char * buf , loff_t pos , size_t count )
254
254
{
255
255
struct qib_pportdata * ppd = qib_get_pportdata_kobj (kobj );
256
256
int ret ;
@@ -274,9 +274,9 @@ static ssize_t cc_setting_bin_read(struct file *filp, struct kobject *kobj,
274
274
275
275
return count ;
276
276
}
277
- static BIN_ATTR_RO (cc_setting_bin , PAGE_SIZE ) ;
277
+ static const BIN_ATTR_RO (cc_setting_bin , PAGE_SIZE ) ;
278
278
279
- static struct bin_attribute * port_ccmgta_attributes [] = {
279
+ static const struct bin_attribute * const port_ccmgta_attributes [] = {
280
280
& bin_attr_cc_setting_bin ,
281
281
& bin_attr_cc_table_bin ,
282
282
NULL ,
@@ -295,7 +295,7 @@ static umode_t qib_ccmgta_is_bin_visible(struct kobject *kobj,
295
295
static const struct attribute_group port_ccmgta_attribute_group = {
296
296
.name = "CCMgtA" ,
297
297
.is_bin_visible = qib_ccmgta_is_bin_visible ,
298
- .bin_attrs = port_ccmgta_attributes ,
298
+ .bin_attrs_new = port_ccmgta_attributes ,
299
299
};
300
300
301
301
/* Start sl2vl */
0 commit comments