linux_dsm_epyc7002/arch/mips/txx9/generic
Julia Lawall 3c2b023978 MIPS: TXx9: 7segled: use permission-specific DEVICE_ATTR variants
Use DEVICE_ATTR_WO for write only attributes.  This simplifies the
source code, improves readbility, and reduces the chance of
inconsistencies.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@wo@
declarer name DEVICE_ATTR;
identifier x,x_store;
@@

DEVICE_ATTR(x, \(0200\|S_IWUSR\), NULL, x_store);

@script:ocaml@
x << wo.x;
x_store << wo.x_store;
@@

if not (x^"_store" = x_store) then Coccilib.include_match false

@@
declarer name DEVICE_ATTR_WO;
identifier wo.x,wo.x_store;
@@

- DEVICE_ATTR(x, \(0200\|S_IWUSR\), NULL, x_store);
+ DEVICE_ATTR_WO(x);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: kernel-janitors@vger.kernel.org
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/14463/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2017-01-03 16:34:32 +01:00
..
7segled.c MIPS: TXx9: 7segled: use permission-specific DEVICE_ATTR variants 2017-01-03 16:34:32 +01:00
irq_tx3927.c [MIPS] TXx9: Make tx3927-specific code more independent 2008-07-30 21:54:39 +01:00
irq_tx4927.c MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
irq_tx4938.c MIPS: Convert the irq functions to the new names 2011-03-29 14:48:07 +02:00
irq_tx4939.c MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
Makefile MIPS: TXx9: Migrate to new platform makefile style. 2010-08-05 13:25:55 +01:00
mem_tx4927.c MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
pci.c MIPS: PCI: Reduce stack frame usage 2016-10-04 16:13:57 +02:00
setup_tx3927.c MIPS: TXx9: tx39xx: Move GPIO setup from .mem_setup() to .arch_init() 2016-10-04 16:13:57 +02:00
setup_tx4927.c MIPS: TXx9: tx49xx: Move GPIO setup from .mem_setup() to .arch_init() 2016-10-04 16:13:57 +02:00
setup_tx4938.c MIPS: TXx9: tx49xx: Move GPIO setup from .mem_setup() to .arch_init() 2016-10-04 16:13:57 +02:00
setup_tx4939.c tx4939: use __ethtool_get_ksettings 2016-02-25 22:06:45 -05:00
setup.c MIPS: TXx9: Convert to Common Clock Framework 2016-10-04 16:13:57 +02:00
smsc_fdc37m81x.c MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
spi_eeprom.c spi: Drop owner assignment from spi_drivers 2015-10-28 10:30:17 +09:00