linux/drivers/net/ethernet/qlogic
Bhumika Goyal ff2924583b qlogic: netxen: constify bin_attribute structures
Declare bin_attribute structures as const as they are only passed as an
arguments to the functions device_remove_bin_file and
device_create_bin_file. These function arguments are of type const, so
bin_attribute structures having this property can be made const too.
Done using Coccinelle:

@r1 disable optional_qualifier @
identifier i;
position p;
@@
static struct bin_attribute i@p = {...};

@ok1@
identifier r1.i;
position p,p1;
@@
(
device_remove_bin_file(...,&i@p)
|
device_create_bin_file(..., &i@p1)
)

@bad@
position p!={r1.p,ok1.p,ok1.p1};
identifier r1.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct bin_attribute i;

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-02-22 15:39:09 -05:00
..
netxen qlogic: netxen: constify bin_attribute structures 2017-02-22 15:39:09 -05:00
qed qed*: Fix link indication race 2017-02-20 17:11:54 -05:00
qede qed*: Fix link indication race 2017-02-20 17:11:54 -05:00
qlcnic qlogic: qlcnic_sysfs: constify bin_attribute structures 2017-02-22 15:39:09 -05:00
qlge net: qlogic: qlge: use new api ethtool_{get|set}_link_ksettings 2017-02-20 11:22:19 -05:00
Kconfig qed: Add support for hardware offloaded FCoE. 2017-02-19 18:10:42 -05:00
Makefile qede: Add basic Network driver 2015-10-27 19:34:47 -07:00
qla3xxx.c net: qlogic: qla3xxx: use new api ethtool_{get|set}_link_ksettings 2017-02-20 10:27:17 -05:00
qla3xxx.h