@@ -214,8 +214,8 @@ static const struct attribute_group port_linkcontrol_group = {
214214 * Congestion control table size followed by table entries
215215 */
216216static 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 )
219219{
220220 struct qib_pportdata * ppd = qib_get_pportdata_kobj (kobj );
221221 int ret ;
@@ -241,16 +241,16 @@ static ssize_t cc_table_bin_read(struct file *filp, struct kobject *kobj,
241241
242242 return count ;
243243}
244- static BIN_ATTR_RO (cc_table_bin , PAGE_SIZE ) ;
244+ static const BIN_ATTR_RO (cc_table_bin , PAGE_SIZE ) ;
245245
246246/*
247247 * Congestion settings: port control, control map and an array of 16
248248 * entries for the congestion entries - increase, timer, event log
249249 * trigger threshold and the minimum injection rate delay.
250250 */
251251static 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 )
254254{
255255 struct qib_pportdata * ppd = qib_get_pportdata_kobj (kobj );
256256 int ret ;
@@ -274,9 +274,9 @@ static ssize_t cc_setting_bin_read(struct file *filp, struct kobject *kobj,
274274
275275 return count ;
276276}
277- static BIN_ATTR_RO (cc_setting_bin , PAGE_SIZE ) ;
277+ static const BIN_ATTR_RO (cc_setting_bin , PAGE_SIZE ) ;
278278
279- static struct bin_attribute * port_ccmgta_attributes [] = {
279+ static const struct bin_attribute * const port_ccmgta_attributes [] = {
280280 & bin_attr_cc_setting_bin ,
281281 & bin_attr_cc_table_bin ,
282282 NULL ,
@@ -295,7 +295,7 @@ static umode_t qib_ccmgta_is_bin_visible(struct kobject *kobj,
295295static const struct attribute_group port_ccmgta_attribute_group = {
296296 .name = "CCMgtA" ,
297297 .is_bin_visible = qib_ccmgta_is_bin_visible ,
298- .bin_attrs = port_ccmgta_attributes ,
298+ .bin_attrs_new = port_ccmgta_attributes ,
299299};
300300
301301/* Start sl2vl */
0 commit comments