linux/drivers/net/ethernet/qlogic/netxen
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
..
Makefile ethernet: Fix FSF address in file headers 2013-12-06 12:37:55 -05:00
netxen_nic.h netxen_nic: Fix trivial typos in comments 2015-03-01 13:40:22 -05:00
netxen_nic_ctx.c qlogic: use pci_zalloc_consistent 2014-08-08 15:57:29 -07:00
netxen_nic_ethtool.c net: qlogic: netxen: use new api ethtool_{get|set}_link_ksettings 2017-02-17 14:06:41 -05:00
netxen_nic_hdr.h ethernet: Fix FSF address in file headers 2013-12-06 12:37:55 -05:00
netxen_nic_hw.c ethernet: use net core MTU range checking in more drivers 2016-10-20 14:51:08 -04:00
netxen_nic_hw.h ethernet: Fix FSF address in file headers 2013-12-06 12:37:55 -05:00
netxen_nic_init.c netxen_nic: use spin_[un]lock_bh around tx_clean_lock (2) 2015-05-09 16:44:46 -04:00
netxen_nic_main.c qlogic: netxen: constify bin_attribute structures 2017-02-22 15:39:09 -05:00