Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1702211 > unrolled thread
| Started by | Julia Lawall <Julia.Lawall@lip6.fr> |
|---|---|
| First post | 2017-08-02 18:00 +0200 |
| Last post | 2017-08-02 21:00 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] usb: gadget: fsl_qe_udc: constify qe_ep0_desc Julia Lawall <Julia.Lawall@lip6.fr> - 2017-08-02 18:00 +0200
RE: [PATCH] usb: gadget: fsl_qe_udc: constify qe_ep0_desc Leo Li <leoyang.li@nxp.com> - 2017-08-02 21:00 +0200
| From | Julia Lawall <Julia.Lawall@lip6.fr> |
|---|---|
| Date | 2017-08-02 18:00 +0200 |
| Subject | [PATCH] usb: gadget: fsl_qe_udc: constify qe_ep0_desc |
| Message-ID | <ua4dY-3lq-11@gated-at.bofh.it> |
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,
[toc] | [next] | [standalone]
| From | Leo Li <leoyang.li@nxp.com> |
|---|---|
| Date | 2017-08-02 21:00 +0200 |
| Message-ID | <ua72a-5hv-1@gated-at.bofh.it> |
| In reply to | #1702211 |
> -----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>; Greg
> Kroah-Hartman <gregkh@linuxfoundation.org>; linux-usb@vger.kernel.org;
> linuxppc-dev@lists.ozlabs.org; linux-kernel@vger.kernel.org; Bhumika Goyal
> <bhumirks@gmail.com>
> Subject: [PATCH] usb: gadget: fsl_qe_udc: constify qe_ep0_desc
>
> 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>
Acked-by: Li Yang <leoyang.li@nxp.com>
>
> ---
> 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,
>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web