@@ -27,8 +27,8 @@ static struct hfi1_pportdata *hfi1_get_pportdata_kobj(struct kobject *kobj)
27
27
* Congestion control table size followed by table entries
28
28
*/
29
29
static ssize_t cc_table_bin_read (struct file * filp , struct kobject * kobj ,
30
- struct bin_attribute * bin_attr , char * buf ,
31
- loff_t pos , size_t count )
30
+ const struct bin_attribute * bin_attr ,
31
+ char * buf , loff_t pos , size_t count )
32
32
{
33
33
int ret ;
34
34
struct hfi1_pportdata * ppd = hfi1_get_pportdata_kobj (kobj );
@@ -57,15 +57,15 @@ static ssize_t cc_table_bin_read(struct file *filp, struct kobject *kobj,
57
57
58
58
return count ;
59
59
}
60
- static BIN_ATTR_RO (cc_table_bin , PAGE_SIZE ) ;
60
+ static const BIN_ATTR_RO (cc_table_bin , PAGE_SIZE ) ;
61
61
62
62
/*
63
63
* Congestion settings: port control, control map and an array of 16
64
64
* entries for the congestion entries - increase, timer, event log
65
65
* trigger threshold and the minimum injection rate delay.
66
66
*/
67
67
static ssize_t cc_setting_bin_read (struct file * filp , struct kobject * kobj ,
68
- struct bin_attribute * bin_attr ,
68
+ const struct bin_attribute * bin_attr ,
69
69
char * buf , loff_t pos , size_t count )
70
70
{
71
71
struct hfi1_pportdata * ppd = hfi1_get_pportdata_kobj (kobj );
@@ -93,9 +93,9 @@ static ssize_t cc_setting_bin_read(struct file *filp, struct kobject *kobj,
93
93
94
94
return count ;
95
95
}
96
- static BIN_ATTR_RO (cc_setting_bin , PAGE_SIZE ) ;
96
+ static const BIN_ATTR_RO (cc_setting_bin , PAGE_SIZE ) ;
97
97
98
- static struct bin_attribute * port_cc_bin_attributes [] = {
98
+ static const struct bin_attribute * const port_cc_bin_attributes [] = {
99
99
& bin_attr_cc_setting_bin ,
100
100
& bin_attr_cc_table_bin ,
101
101
NULL
@@ -134,7 +134,7 @@ static struct attribute *port_cc_attributes[] = {
134
134
static const struct attribute_group port_cc_group = {
135
135
.name = "CCMgtA" ,
136
136
.attrs = port_cc_attributes ,
137
- .bin_attrs = port_cc_bin_attributes ,
137
+ .bin_attrs_new = port_cc_bin_attributes ,
138
138
};
139
139
140
140
/* Start sc2vl */
0 commit comments