linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb: gadget: fsl_qe_udc: constify qe_ep0_desc
@ 2017-08-02 15:29 Julia Lawall
  2017-08-02 18:54 ` Leo Li
  0 siblings, 1 reply; 2+ messages in thread
From: Julia Lawall @ 2017-08-02 15:29 UTC (permalink / raw)
  To: Li Yang
  Cc: kernel-janitors, Felipe Balbi, Greg Kroah-Hartman, linux-usb,
	linuxppc-dev, linux-kernel, Bhumika Goyal

qe_ep0_desc is only passed as the second argument to qe_ep_init, which is
const, so qe_ep0_desc can be const too.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
I got a lot of warnings when compiling this file, but none seemed to be
related to the change.

 drivers/usb/gadget/udc/fsl_qe_udc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/udc/fsl_qe_udc.c b/drivers/usb/gadget/udc/fsl_qe_udc.c
index 303328ce..a3e72d6 100644
--- a/drivers/usb/gadget/udc/fsl_qe_udc.c
+++ b/drivers/usb/gadget/udc/fsl_qe_udc.c
@@ -62,7 +62,7 @@
 	"ep3",
 };
 
-static struct usb_endpoint_descriptor qe_ep0_desc = {
+static const struct usb_endpoint_descriptor qe_ep0_desc = {
 	.bLength =		USB_DT_ENDPOINT_SIZE,
 	.bDescriptorType =	USB_DT_ENDPOINT,
 

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

* RE: [PATCH] usb: gadget: fsl_qe_udc: constify qe_ep0_desc
  2017-08-02 15:29 [PATCH] usb: gadget: fsl_qe_udc: constify qe_ep0_desc Julia Lawall
@ 2017-08-02 18:54 ` Leo Li
  0 siblings, 0 replies; 2+ messages in thread
From: Leo Li @ 2017-08-02 18:54 UTC (permalink / raw)
  To: Julia Lawall
  Cc: kernel-janitors@vger.kernel.org, Felipe Balbi, Greg Kroah-Hartman,
	linux-usb@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	linux-kernel@vger.kernel.org, Bhumika Goyal



> -----Original Message-----
> From: Julia Lawall [mailto:Julia.Lawall@lip6.fr]
> Sent: Wednesday, August 02, 2017 10:29 AM
> To: Leo Li <leoyang.li@nxp.com>
> Cc: kernel-janitors@vger.kernel.org; Felipe Balbi <balbi@kernel.org>; Gre=
g
> Kroah-Hartman <gregkh@linuxfoundation.org>; linux-usb@vger.kernel.org;
> linuxppc-dev@lists.ozlabs.org; linux-kernel@vger.kernel.org; Bhumika Goya=
l
> <bhumirks@gmail.com>
> Subject: [PATCH] usb: gadget: fsl_qe_udc: constify qe_ep0_desc
>=20
> qe_ep0_desc is only passed as the second argument to qe_ep_init, which is
> const, so qe_ep0_desc can be const too.
>=20
> Done with the help of Coccinelle.
>=20
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

Acked-by: Li Yang <leoyang.li@nxp.com>

>=20
> ---
> I got a lot of warnings when compiling this file, but none seemed to be r=
elated
> to the change.
>=20
>  drivers/usb/gadget/udc/fsl_qe_udc.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>=20
> diff --git a/drivers/usb/gadget/udc/fsl_qe_udc.c
> b/drivers/usb/gadget/udc/fsl_qe_udc.c
> index 303328ce..a3e72d6 100644
> --- a/drivers/usb/gadget/udc/fsl_qe_udc.c
> +++ b/drivers/usb/gadget/udc/fsl_qe_udc.c
> @@ -62,7 +62,7 @@
>  	"ep3",
>  };
>=20
> -static struct usb_endpoint_descriptor qe_ep0_desc =3D {
> +static const struct usb_endpoint_descriptor qe_ep0_desc =3D {
>  	.bLength =3D		USB_DT_ENDPOINT_SIZE,
>  	.bDescriptorType =3D	USB_DT_ENDPOINT,
>=20

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

end of thread, other threads:[~2017-08-02 18:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-02 15:29 [PATCH] usb: gadget: fsl_qe_udc: constify qe_ep0_desc Julia Lawall
2017-08-02 18:54 ` Leo Li

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