From: SF Markus Elfring <elfring@users.sourceforge.net>
To: linux-usb@vger.kernel.org,
Dan Carpenter <dan.carpenter@oracle.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
kernel-janitors@vger.kernel.org,
Julia Lawall <julia.lawall@lip6.fr>
Subject: [PATCH v2 2/2] USB-FHCI: Use a signed return type for endpoint_zero_init()
Date: Tue, 22 Dec 2015 15:54:26 +0000 [thread overview]
Message-ID: <56797232.1020501@users.sourceforge.net> (raw)
In-Reply-To: <567970D1.3030503@users.sourceforge.net>
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
WARNING: multiple messages have this Message-ID (diff)
From: SF Markus Elfring <elfring@users.sourceforge.net>
To: linux-usb@vger.kernel.org,
Dan Carpenter <dan.carpenter@oracle.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
kernel-janitors@vger.kernel.org,
Julia Lawall <julia.lawall@lip6.fr>
Subject: [PATCH v2 2/2] USB-FHCI: Use a signed return type for endpoint_zero_init()
Date: Tue, 22 Dec 2015 16:54:26 +0100 [thread overview]
Message-ID: <56797232.1020501@users.sourceforge.net> (raw)
In-Reply-To: <567970D1.3030503@users.sourceforge.net>
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
next prev parent reply other threads:[~2015-12-22 15:54 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-19 20:15 [PATCH] USB-FHCI: Use a signed return type for fhci_create_ep() SF Markus Elfring
2015-12-19 20:15 ` SF Markus Elfring
2015-12-19 20:27 ` Dan Carpenter
2015-12-19 20:27 ` Dan Carpenter
2015-12-19 20:55 ` SF Markus Elfring
2015-12-19 20:55 ` SF Markus Elfring
2015-12-19 21:04 ` Dan Carpenter
2015-12-19 21:04 ` Dan Carpenter
2015-12-22 15:48 ` [PATCH v2 0/2] USB-FHCI: Use return type "int" for two functions SF Markus Elfring
2015-12-22 15:48 ` SF Markus Elfring
2015-12-22 15:51 ` [PATCH v2 1/2] USB-FHCI: Use a signed return type for fhci_create_ep() SF Markus Elfring
2015-12-22 15:51 ` SF Markus Elfring
2015-12-22 15:54 ` SF Markus Elfring [this message]
2015-12-22 15:54 ` [PATCH v2 2/2] USB-FHCI: Use a signed return type for endpoint_zero_init() SF Markus Elfring
2015-12-19 20:46 ` [PATCH] USB-FHCI: Use a signed return type for fhci_create_ep() Sergei Shtylyov
2015-12-19 20:46 ` Sergei Shtylyov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56797232.1020501@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=dan.carpenter@oracle.com \
--cc=gregkh@linuxfoundation.org \
--cc=julia.lawall@lip6.fr \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.