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


Groups > linux.kernel > #1699099

[PATCH 00/11] constify hc_driver structures

From Julia Lawall <Julia.Lawall@lip6.fr>
Newsgroups linux.kernel
Subject [PATCH 00/11] constify hc_driver structures
Date 2017-07-28 23:10 +0200
Message-ID <u8kGd-C9-5@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


The hc_driver structure is only passed as the first argument to
usb_create_hcd, which is declared as const.  Thus the hc_driver structure
itself can be const.

Done with the help of Coccinelle.

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@

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

@ok1@
identifier r.i;
expression e1;
position p;
@@

usb_create_hcd(&i@p,...)

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

e@i@p

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

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

---

 drivers/staging/greybus/usb.c        |    2 +-
 drivers/usb/c67x00/c67x00-hcd.c      |    2 +-
 drivers/usb/host/hwa-hc.c            |    2 +-
 drivers/usb/host/isp116x-hcd.c       |    2 +-
 drivers/usb/host/isp1362-hcd.c       |    2 +-
 drivers/usb/host/max3421-hcd.c       |    2 +-
 drivers/usb/host/r8a66597-hcd.c      |    2 +-
 drivers/usb/host/sl811-hcd.c         |    2 +-
 drivers/usb/host/u132-hcd.c          |    2 +-
 drivers/usb/host/whci/hcd.c          |    2 +-
 drivers/usb/renesas_usbhs/mod_host.c |    2 +-
 11 files changed, 11 insertions(+), 11 deletions(-)

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


Thread

[PATCH 00/11] constify hc_driver structures Julia Lawall <Julia.Lawall@lip6.fr> - 2017-07-28 23:10 +0200
  [PATCH 11/11] c67x00-hcd: constify hc_driver structures Julia Lawall <Julia.Lawall@lip6.fr> - 2017-07-28 23:10 +0200
  [PATCH 01/11] isp1362-hcd: constify hc_driver structures Julia Lawall <Julia.Lawall@lip6.fr> - 2017-07-28 23:10 +0200
  [PATCH 09/11] USB: whci-hcd: constify hc_driver structures Julia Lawall <Julia.Lawall@lip6.fr> - 2017-07-28 23:10 +0200
  [PATCH 06/11] usb: renesas_usbhs: constify hc_driver structures Julia Lawall <Julia.Lawall@lip6.fr> - 2017-07-28 23:10 +0200
    RE: [PATCH 06/11] usb: renesas_usbhs: constify hc_driver structures Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> - 2017-07-31 09:10 +0200
  [PATCH 03/11] usb: r8a66597-hcd: constify hc_driver structures Julia Lawall <Julia.Lawall@lip6.fr> - 2017-07-28 23:10 +0200
  [PATCH 07/11] isp116x-hcd: constify hc_driver structures Julia Lawall <Julia.Lawall@lip6.fr> - 2017-07-28 23:10 +0200
  [PATCH 10/11] greybus: usb: constify hc_driver structures Julia Lawall <Julia.Lawall@lip6.fr> - 2017-07-28 23:10 +0200
    Re: [greybus-dev] [PATCH 10/11] greybus: usb: constify hc_driver  structures Viresh Kumar <viresh.kumar@linaro.org> - 2017-07-31 06:30 +0200
    Re: [PATCH 10/11] greybus: usb: constify hc_driver structures Johan Hovold <johan@kernel.org> - 2017-07-31 09:20 +0200
  [PATCH 04/11] usb: host/sl811-hcd: constify hc_driver structures Julia Lawall <Julia.Lawall@lip6.fr> - 2017-07-28 23:10 +0200
  [PATCH 05/11] usb: host: u132-hcd: constify hc_driver structures Julia Lawall <Julia.Lawall@lip6.fr> - 2017-07-28 23:10 +0200
  [PATCH 02/11] usb: host: max3421-hcd: constify hc_driver structures Julia Lawall <Julia.Lawall@lip6.fr> - 2017-07-28 23:20 +0200

csiph-web