2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-27 22:53:55 +08:00
linux-next/drivers/pci/pcie
Julia Lawall fc4f57fade PCI/ASPM: Use permission-specific DEVICE_ATTR variants
Use DEVICE_ATTR_RW for read-write attributes.  This simplifies the source
code, improves readability, and reduces the chance of inconsistencies.

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

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

DEVICE_ATTR(x, \(0644\|S_IRUGO|S_IWUSR\), x_show, x_store);

@script:ocaml@
x << rw.x;
x_show << rw.x_show;
x_store << rw.x_store;
@@

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

@@
declarer name DEVICE_ATTR_RW;
identifier rw.x,rw.x_show,rw.x_store;
@@

- DEVICE_ATTR(x, \(0644\|S_IRUGO|S_IWUSR\), x_show, x_store);
+ DEVICE_ATTR_RW(x);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2016-11-14 15:29:45 -06:00
..
aer Merge branch 'pci/aer' into next 2016-10-03 09:42:57 -05:00
aspm.c PCI/ASPM: Use permission-specific DEVICE_ATTR variants 2016-11-14 15:29:45 -06:00
Kconfig PCI: Add Precision Time Measurement (PTM) support 2016-08-15 13:44:08 -05:00
Makefile PCI: Add Precision Time Measurement (PTM) support 2016-08-15 13:44:08 -05:00
pcie-dpc.c PCI: Make DPC explicitly non-modular 2016-08-24 16:52:24 -05:00
pme.c PCI/PME: Make explicitly non-modular 2016-08-24 16:56:12 -05:00
portdrv_acpi.c Merge branches 'pci/dpc', 'pci/resource' and 'pci/thunderbolt' into next 2016-05-03 11:49:21 -05:00
portdrv_bus.c PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
portdrv_core.c PCI: Add runtime PM support for PCIe ports 2016-06-13 14:58:53 -05:00
portdrv_pci.c PCI: portdrv: Make explicitly non-modular 2016-08-23 15:34:23 -05:00
portdrv.h Merge branches 'pci/dpc', 'pci/resource' and 'pci/thunderbolt' into next 2016-05-03 11:49:21 -05:00
ptm.c PCI: Add PTM clock granularity information 2016-08-25 08:32:34 -05:00