@@ -27,8 +27,8 @@ static struct hfi1_pportdata *hfi1_get_pportdata_kobj(struct kobject *kobj)
2727 * Congestion control table size followed by table entries
2828 */
2929static 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 )
3232{
3333 int ret ;
3434 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,
5757
5858 return count ;
5959}
60- static BIN_ATTR_RO (cc_table_bin , PAGE_SIZE ) ;
60+ static const BIN_ATTR_RO (cc_table_bin , PAGE_SIZE ) ;
6161
6262/*
6363 * Congestion settings: port control, control map and an array of 16
6464 * entries for the congestion entries - increase, timer, event log
6565 * trigger threshold and the minimum injection rate delay.
6666 */
6767static 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 ,
6969 char * buf , loff_t pos , size_t count )
7070{
7171 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,
9393
9494 return count ;
9595}
96- static BIN_ATTR_RO (cc_setting_bin , PAGE_SIZE ) ;
96+ static const BIN_ATTR_RO (cc_setting_bin , PAGE_SIZE ) ;
9797
98- static struct bin_attribute * port_cc_bin_attributes [] = {
98+ static const struct bin_attribute * const port_cc_bin_attributes [] = {
9999 & bin_attr_cc_setting_bin ,
100100 & bin_attr_cc_table_bin ,
101101 NULL
@@ -134,7 +134,7 @@ static struct attribute *port_cc_attributes[] = {
134134static const struct attribute_group port_cc_group = {
135135 .name = "CCMgtA" ,
136136 .attrs = port_cc_attributes ,
137- .bin_attrs = port_cc_bin_attributes ,
137+ .bin_attrs_new = port_cc_bin_attributes ,
138138};
139139
140140/* Start sc2vl */
0 commit comments