[PATCH 0/3] constify pinctrl_ops and pinmux_ops structures

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Constify pinctrl_ops and pinmux_ops structures.  The complete semantic
patch used to make this change is as follows:

// <smpl>
@initialize:ocaml@
@@

let check file =
  let second = List.nth (Str.split (Str.regexp "linux-next/") file) 1 in
  let doto =
    "/var/julia/linux-next/" ^ (Filename.chop_extension second) ^ ".o" in
  Sys.file_exists doto

@r disable optional_qualifier@
identifier i;
position p;
@@

static struct pinctrl_ops i@p = { ... };

@script:ocaml@
p << r.p;
@@

if not (check (List.hd p).file) then Coccilib.include_match false

@ok@
identifier r.i;
struct pinctrl_desc e;
position p;
@@

e.pctlops = &i@p;

@bad@
position p != {r.p,ok.p};
identifier r.i;
struct pinctrl_ops e;
@@

e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@

static
+const
 struct pinctrl_ops i = { ... };

// --------------------------------------------------------------------

@r1 disable optional_qualifier@
identifier i;
position p;
@@

static struct pinmux_ops i@p = { ... };

@script:ocaml@
p << r1.p;
@@

if not (check (List.hd p).file) then Coccilib.include_match false

@ok1@
identifier r1.i;
struct pinctrl_desc e;
position p;
@@

e.pmxops = &i@p;

@bad1@
position p != {r1.p,ok1.p};
identifier r1.i;
struct pinmux_ops e;
@@

e@i@p

@depends on !bad1 disable optional_qualifier@
identifier r1.i;
@@

static
+const
 struct pinmux_ops i = { ... };
// </smpl>

---

 drivers/pinctrl/bcm/pinctrl-bcm281xx.c |    4 ++--
 drivers/pinctrl/bcm/pinctrl-ns2-mux.c  |    4 ++--
 drivers/pinctrl/bcm/pinctrl-nsp-mux.c  |    4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux