Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1296861
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 2/2] USB-FHCI: Use a signed return type for endpoint_zero_init() |
| Date | 2015-12-22 17:00 +0100 |
| Message-ID | <qIxvY-5Qb-13@gated-at.bofh.it> (permalink) |
| References | <qHw8W-7P7-19@gated-at.bofh.it> <qHwiC-7SO-7@gated-at.bofh.it> <qIxmi-5MK-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 22 Dec 2015 16:24:46 +0100
The return type "u32" was used by the endpoint_zero_init() function
even though it can return a value which corresponds to a negative
error code from a call of the fhci_create_ep() function.
Improve this implementation detail by using the type "int" instead.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/usb/host/fhci-hcd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/host/fhci-hcd.c b/drivers/usb/host/fhci-hcd.c
index c6cebb9..b2889f0 100644
--- a/drivers/usb/host/fhci-hcd.c
+++ b/drivers/usb/host/fhci-hcd.c
@@ -64,11 +64,11 @@ u16 fhci_get_sof_timer_count(struct fhci_usb *usb)
}
/* initialize the endpoint zero */
-static u32 endpoint_zero_init(struct fhci_usb *usb,
+static int endpoint_zero_init(struct fhci_usb *usb,
enum fhci_mem_alloc data_mem,
u32 ring_len)
{
- u32 rc;
+ int rc;
rc = fhci_create_ep(usb, data_mem, ring_len);
if (rc)
--
2.6.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] USB-FHCI: Use a signed return type for fhci_create_ep() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-19 21:20 +0100
Re: [PATCH] USB-FHCI: Use a signed return type for fhci_create_ep() Dan Carpenter <dan.carpenter@oracle.com> - 2015-12-19 21:30 +0100
Re: [PATCH] USB-FHCI: Use a signed return type for fhci_create_ep() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-19 22:00 +0100
Re: [PATCH] USB-FHCI: Use a signed return type for fhci_create_ep() Dan Carpenter <dan.carpenter@oracle.com> - 2015-12-19 22:10 +0100
[PATCH v2 0/2] USB-FHCI: Use return type "int" for two functions SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-22 16:50 +0100
[PATCH v2 1/2] USB-FHCI: Use a signed return type for fhci_create_ep() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-22 17:00 +0100
[PATCH v2 2/2] USB-FHCI: Use a signed return type for endpoint_zero_init() SF Markus Elfring <elfring@users.sourceforge.net> - 2015-12-22 17:00 +0100
Re: [PATCH] USB-FHCI: Use a signed return type for fhci_create_ep() Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2015-12-19 21:50 +0100
csiph-web