mirror_ubuntu-kernels/drivers/infiniband/hw
Bhumika Goyal 238f43a797 IB/qib: add const to bin_attribute structures
Add const to bin_attribute structures as they are only passed to the
functions sysfs_{remove/create}_bin_file. The arguments passed are of
type const, so declare the structures to be const.

Done using Coccinelle.

@m disable optional_qualifier@
identifier s;
position p;
@@
static struct bin_attribute s@p={...};

@okay1@
position p;
identifier m.s;
@@
(
sysfs_create_bin_file(...,&s@p,...)
|
sysfs_remove_bin_file(...,&s@p,...)
)

@bad@
position p!={m.p,okay1.p};
identifier m.s;
@@
s@p

@change depends on !bad disable optional_qualifier@
identifier m.s;
@@
static
+const
struct bin_attribute s={...};

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
2017-08-18 14:06:09 -04:00
..
bnxt_re RDMA/bnxt_re: fix spelling mistake: "Deallocte" -> "Deallocate" 2017-08-18 11:31:30 -04:00
cxgb3 IB/cxgb3: Fix error codes in iwch_alloc_mr() 2017-07-20 11:20:49 -04:00
cxgb4 cxgb4: Remove some dead code 2017-08-17 18:06:37 -04:00
hfi1 IB/hfi1: fix spelling mistake in variable name continious 2017-08-18 11:29:22 -04:00
hns IB/hns: Fix for checkpatch.pl comment style warnings 2017-07-17 21:21:29 -04:00
i40iw i40iw: fix spelling mistake: "allloc_buf" -> "alloc_buf" 2017-08-18 14:01:10 -04:00
mlx4 IB/mlx4: Fix CM REQ retries in paravirt mode 2017-07-20 11:20:50 -04:00
mlx5 IB/mlx5: Fix a warning message 2017-07-20 11:20:49 -04:00
mthca infiniband: mthca: constify pci_device_id. 2017-08-18 14:01:07 -04:00
nes infiniband: nes: constify pci_device_id. 2017-08-18 14:01:08 -04:00
ocrdma RDMA/ocrdma: Fix error codes in ocrdma_create_srq() 2017-07-20 11:20:49 -04:00
qedr RDMA/qedr: Prevent memory overrun in verbs' user responses 2017-07-20 11:20:50 -04:00
qib IB/qib: add const to bin_attribute structures 2017-08-18 14:06:09 -04:00
usnic IB/core: Rename struct ib_ah_attr to rdma_ah_attr 2017-05-01 14:32:43 -04:00
vmw_pvrdma infiniband: pvrdma: constify pci_device_id. 2017-08-18 14:01:08 -04:00
Makefile RDMA/bnxt_re: Add bnxt_re driver build support 2017-02-14 09:51:28 -05:00