Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1716396

Re: [PATCH 0/6] drivers: make device_attribute const

From "Rafael J. Wysocki" <rafael@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH 0/6] drivers: make device_attribute const
Date 2017-08-21 14:30 +0200
Message-ID <ugU0a-4jm-23@gated-at.bofh.it> (permalink)
References <ugTnr-3Rl-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Aug 21, 2017 at 1:43 PM, Bhumika Goyal <bhumirks@gmail.com> 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@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

It would be better to send these patches separately, because they
touch code maintained by different people and I guess no one will take
the whole series.

I'll take care of the ACPI one, but the rest needs to go in via their
proper trees.

Thanks,
Rafael

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/6] drivers:  make device_attribute const Bhumika Goyal <bhumirks@gmail.com> - 2017-08-21 13:50 +0200
  [PATCH 2/6] nbd: make device_attribute const Bhumika Goyal <bhumirks@gmail.com> - 2017-08-21 13:50 +0200
  [PATCH 3/6] hid: make device_attribute const Bhumika Goyal <bhumirks@gmail.com> - 2017-08-21 13:50 +0200
  [PATCH 4/6] qlogic:  make device_attribute const Bhumika Goyal <bhumirks@gmail.com> - 2017-08-21 13:50 +0200
    Re: [PATCH 4/6] qlogic: make device_attribute const David Miller <davem@davemloft.net> - 2017-08-21 19:30 +0200
      Re: [PATCH 4/6] qlogic: make device_attribute const Bhumika Goyal <bhumirks@gmail.com> - 2017-08-21 19:30 +0200
  Re: [PATCH 0/6] drivers: make device_attribute const "Rafael J. Wysocki" <rafael@kernel.org> - 2017-08-21 14:30 +0200
    Re: [PATCH 0/6] drivers: make device_attribute const Bhumika Goyal <bhumirks@gmail.com> - 2017-08-21 15:00 +0200
  Re: [PATCH 0/6] drivers: make device_attribute const Bhumika Goyal <bhumirks@gmail.com> - 2017-08-21 15:00 +0200

csiph-web