Skip to content

drivers: make device_attribute const

Bhumika Goyal linux-acpi linux-block linux-input linux-pm lkml netdev platform-driver-x86 1 version Applied

Status from this message: Applied.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 11 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/6ACPI: make device_attribute constdrivers/acpi/battery.c drivers/acpi/sbs.c+2 -21 reply
2/6nbd: make device_attribute constdrivers/block/nbd.c+1 -11 reply
3/6hid: make device_attribute constdrivers/hid/hid-core.c+1 -11 reply
4/6qlogic: make device_attribute constdrivers/net/ethernet/qlogic/netxen/netxen_nic_main.c drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c+5 -52 replies
5/6platform/x86: make device_attribute constdrivers/platform/x86/classmate-laptop.c drivers/platform/x86/intel-rst.c+5 -52 replies
6/6power: supply: make device_attribute constdrivers/power/supply/olpc_battery.c+1 -11 reply

Reviews trailers per patch

1 of 6 patches has a Reviewed-by or Acked-by.

PatchThadeu Lima de Souza Cascardo
1/6
2/6
3/6
4/6
5/6A-b
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/6] drivers: make device_attribute const

Make these const. Done using Coccinelle.

@match disable optional_qualifier@
identifier s;
@@
static struct device_attribute s = {...};

@ref@
position p;
identifier match.s;
@@
s@p

@good1@
identifier match.s;
expression e1;
position ref.p;
@@
device_remove_file(e1,&s@p,...)

@good2@
identifier match.s;
expression e1;
position ref.p;
@@
device_create_file(e1,&s@p,...)

@bad depends on !good1 && !good2@
position ref.p;
identifier match.s;
@@
s@p

@depends on forall !bad disable optional_qualifier@ identifier match.s;
@@
static
+ const
struct device_attribute s;

Bhumika Goyal (6):
ACPI: make device_attribute const
nbd: make device_attribute const
hid: make device_attribute const
qlogic: make device_attribute const
platform/x86: make device_attribute const
power: supply: make device_attribute const

 drivers/acpi/battery.c                               | 2 +-
 drivers/acpi/sbs.c                                   | 2 +-
 drivers/block/nbd.c                                  | 2 +-
 drivers/hid/hid-core.c                               | 2 +-
 drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c | 4 ++--
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c    | 6 +++---
 drivers/platform/x86/classmate-laptop.c              | 6 +++---
 drivers/platform/x86/intel-rst.c                     | 4 ++--
 drivers/power/supply/olpc_battery.c                  | 2 +-
 9 files changed, 15 insertions(+), 15 deletions(-)
Signature · 1 line
1.9.1