linux-stable/drivers/misc
Bhumika Goyal 57daedf812 MISC: 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>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-28 16:55:48 +02:00
..
altera-stapl
c2port drivers/misc/c2port/c2port-duramar2150.c: checking for NULL instead of IS_ERR() 2017-05-08 17:15:10 -07:00
cb710
cxl cxl: Export library to support IBM XSL 2017-07-03 23:07:03 +10:00
echo
eeprom MISC: add const to bin_attribute structures 2017-08-28 16:55:48 +02:00
genwqe sched/headers: Prepare for new header dependencies before moving code to <linux/sched/signal.h> 2017-03-02 08:42:29 +01:00
ibmasm sched/headers: Prepare to move signal wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h> 2017-03-02 08:42:32 +01:00
lis3lv02d sched/headers: Prepare to move signal wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h> 2017-03-02 08:42:32 +01:00
mei mei: make device_type const 2017-08-28 11:59:39 +02:00
mic virtio: add context flag to find vqs 2017-05-02 23:41:43 +03:00
sgi-gru mm: convert generic code to 5-level paging 2017-03-09 11:48:47 -08:00
sgi-xp sgi-xp: Use designated initializers 2017-05-28 10:22:42 -07:00
ti-st networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
vmw_vmci drivers/misc/vmw_vmci/vmci_queue_pair.c: fix a couple integer overflow tests 2017-05-08 17:15:10 -07:00
ad525x_dpot-i2c.c
ad525x_dpot-spi.c
ad525x_dpot.c
ad525x_dpot.h
apds990x.c misc: apds990x: Use sysfs_match_string() helper 2017-06-13 16:03:22 +02:00
apds9802als.c
aspeed-lpc-ctrl.c drivers/misc: aspeed-lpc-ctrl: fix printk format warning again 2017-04-08 17:37:20 +02:00
aspeed-lpc-snoop.c drivers/misc: (aspeed-lpc-snoop): Add ast2400 to compat 2017-07-17 17:23:16 +02:00
atmel-ssc.c
atmel_tclib.c
bh1770glc.c misc: bh1770glc: move header file out of I2C realm 2017-05-25 18:25:00 +02:00
cs5535-mfgpt.c
ds1682.c MISC: add const to bin_attribute structures 2017-08-28 16:55:48 +02:00
dummy-irq.c Annotate hardware config module parameters in drivers/misc/ 2017-04-20 12:02:32 +01:00
enclosure.c scsi: ses: do not add a device to an enclosure if enclosure_add_links() fails. 2017-07-01 16:52:38 -04:00
fsa9480.c
hmc6352.c
hpilo.c misc: hpilo: constify pci_device_id. 2017-08-28 16:55:48 +02:00
hpilo.h
ics932s401.c
ioc4.c misc: ioc4: constify pci_device_id. 2017-08-28 16:55:48 +02:00
isl29003.c
isl29020.c
Kconfig drivers/misc: add Aspeed LPC snoop driver 2017-06-03 19:15:18 +09:00
kgdbts.c sched/headers: Prepare for new header dependencies before moving code to <linux/sched/task.h> 2017-03-02 08:42:35 +01:00
lattice-ecp3-config.c
lkdtm.h lkdtm: Add -fstack-protector-strong test 2017-08-15 12:27:35 -07:00
lkdtm_bugs.c lkdtm: Add -fstack-protector-strong test 2017-08-15 12:27:35 -07:00
lkdtm_core.c lkdtm: Add -fstack-protector-strong test 2017-08-15 12:27:35 -07:00
lkdtm_heap.c sched/headers: Prepare to remove <linux/cred.h> inclusion from <linux/sched.h> 2017-03-02 08:42:31 +01:00
lkdtm_perms.c
lkdtm_refcount.c lkdtm: Provide timing tests for atomic_t vs refcount_t 2017-07-26 14:38:04 -07:00
lkdtm_rodata.c
lkdtm_usercopy.c sched/headers: Prepare for new header dependencies before moving code to <linux/sched/task_stack.h> 2017-03-02 08:42:36 +01:00
Makefile lkdtm: Provide more complete coverage for REFCOUNT tests 2017-07-26 14:38:03 -07:00
pch_phub.c MISC: add const to bin_attribute structures 2017-08-28 16:55:48 +02:00
pci_endpoint_test.c misc: Add host side PCI driver for PCI test function device 2017-04-28 10:23:19 -05:00
phantom.c
pti.c
qcom-coincell.c
spear13xx_pcie_gadget.c
sram-exec.c misc: sram-exec: Use aligned fncpy instead of memcpy 2017-05-18 17:37:52 +02:00
sram.c
sram.h
ti_dac7512.c
tifm_7xx1.c misc: tifm: constify pci_device_id. 2017-08-28 16:55:48 +02:00
tifm_core.c
tsl2550.c misc: tsl2550: Add OF device ID table 2017-04-08 18:22:59 +02:00
vexpress-syscfg.c sched/headers: Prepare to move signal wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h> 2017-03-02 08:42:32 +01:00
vmw_balloon.c