linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] drivers:  make device_attribute const
@ 2017-08-21 11:43 Bhumika Goyal
  2017-08-21 11:43 ` [PATCH 1/6] ACPI: " Bhumika Goyal
                   ` (7 more replies)
  0 siblings, 8 replies; 18+ messages in thread
From: Bhumika Goyal @ 2017-08-21 11:43 UTC (permalink / raw)
  To: julia.lawall, rjw, lenb, jbacik, jikos, benjamin.tissoires,
	manish.chopra, rahul.verma, Dept-GELinuxNICDev, harish.patil,
	cascardo, don, dvhart, andy, sre, linux-acpi, linux-kernel,
	linux-block, nbd-general, linux-input, netdev,
	platform-driver-x86, linux-pm
  Cc: Bhumika Goyal

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(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2017-09-06  8:57 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-21 11:43 [PATCH 0/6] drivers: make device_attribute const Bhumika Goyal
2017-08-21 11:43 ` [PATCH 1/6] ACPI: " Bhumika Goyal
2017-08-28 20:56   ` Rafael J. Wysocki
2017-08-21 11:43 ` [PATCH 2/6] nbd: " Bhumika Goyal
2017-08-28 21:21   ` Jens Axboe
2017-08-21 11:43 ` [PATCH 3/6] hid: " Bhumika Goyal
2017-09-06  8:57   ` Jiri Kosina
2017-08-21 11:43 ` [PATCH 4/6] qlogic: " Bhumika Goyal
2017-08-21 17:25   ` David Miller
2017-08-21 17:26     ` Bhumika Goyal
2017-08-21 11:43 ` [PATCH 5/6] platform/x86: " Bhumika Goyal
2017-08-21 13:22   ` Thadeu Lima de Souza Cascardo
2017-08-30 19:18   ` Andy Shevchenko
2017-08-21 11:43 ` [PATCH 6/6] power: supply: " Bhumika Goyal
2017-08-29  8:44   ` Sebastian Reichel
2017-08-21 12:28 ` [PATCH 0/6] drivers: " Rafael J. Wysocki
2017-08-21 12:57   ` Bhumika Goyal
2017-08-21 12:55 ` Bhumika Goyal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).