Re: [Nbd] [PATCH 0/6] drivers: make device_attribute const
- To: Julia Lawall <julia.lawall@...3043...>, rjw@...3025..., Len Brown <lenb@...1285...>, jbacik@...2204..., jikos@...1285..., benjamin.tissoires@...696..., manish.chopra@...3044..., rahul.verma@...3044..., Dept-GELinuxNICDev@...3044..., harish.patil@...3044..., cascardo@...3045..., don@...3046..., dvhart@...1270..., Andy Shevchenko <andy@...1270...>, sre@...1285..., linux-acpi@...25..., linux-kernel@...25..., linux-block@...25..., nbd-general@lists.sourceforge.net, linux-input@...25..., netdev@...25..., Platform Driver <platform-driver-x86@...25...>, linux-pm@...25...
- Cc: Bhumika Goyal <bhumirks@...17...>
- Subject: Re: [Nbd] [PATCH 0/6] drivers: make device_attribute const
- From: Bhumika Goyal <bhumirks@...17...>
- Date: Mon, 21 Aug 2017 18:25:15 +0530
- Message-id: <CAOH+1jFeD-V-hcnnmKN+9oEbYkf_FrCW74xrPTA3_WABmuH=AA@...18...>
- In-reply-to: <1503315792-14837-1-git-send-email-bhumirks@...17...>
- References: <1503315792-14837-1-git-send-email-bhumirks@...17...>
On Mon, Aug 21, 2017 at 5:13 PM, Bhumika Goyal <bhumirks@...17...> wrote:
> Make these const. Done using Coccinelle.
>
> @match disable optional_qualifier@
> identifier s;
> @@
> static struct device_attribute s = {...};
>
> @ref@
> position p;
> identifier match.s;
> @@
> s@...3042...
>
> @good1@
> identifier match.s;
> expression e1;
> position ref.p;
> @@
> device_remove_file(e1,&s@...3042...,...)
>
> @good2@
> identifier match.s;
> expression e1;
> position ref.p;
> @@
> device_create_file(e1,&s@...3042...,...)
>
>
> @bad depends on !good1 && !good2@
> position ref.p;
> identifier match.s;
> @@
> s@...3042...
>
> @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
>
Hello all,
The patches are all independent, so please take what seems relevant.
Thanks,
Bhumika
> 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
>
Reply to: