From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: SF Markus Elfring <elfring@users.sourceforge.net>,
linux-usb@vger.kernel.org,
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: Re: [PATCH] USB-FHCI: Use a signed return type for fhci_create_ep()
Date: Sat, 19 Dec 2015 23:46:26 +0300 [thread overview]
Message-ID: <5675C222.6080707@cogentembedded.com> (raw)
In-Reply-To: <5675BAE0.2010304@users.sourceforge.net>
Hello.
On 12/19/2015 11:15 PM, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Sat, 19 Dec 2015 21:10:20 +0100
>
> The return type "u32" was used by the fhci_create_ep() function even though
> it will eventually return a negative error code.
> Improve this implementation detail by using the type "s32" instead.
>
> This issue was detected by using the Coccinelle software.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
> drivers/usb/host/fhci-tds.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/host/fhci-tds.c b/drivers/usb/host/fhci-tds.c
> index f82ad5d..c1ae172 100644
> --- a/drivers/usb/host/fhci-tds.c
> +++ b/drivers/usb/host/fhci-tds.c
> @@ -149,7 +149,7 @@ void fhci_ep0_free(struct fhci_usb *usb)
> * data_mem The data memory partition(BUS)
> * ring_len TD ring length
> */
> -u32 fhci_create_ep(struct fhci_usb *usb, enum fhci_mem_alloc data_mem,
> +s32 fhci_create_ep(struct fhci_usb *usb, enum fhci_mem_alloc data_mem,
Should be just *int*, I think.
[...]
MBR, Sergei
prev parent reply other threads:[~2015-12-19 20:46 UTC|newest]
Thread overview: 8+ 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:27 ` Dan Carpenter
2015-12-19 20:55 ` SF Markus Elfring
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:51 ` [PATCH v2 1/2] USB-FHCI: Use a signed return type for fhci_create_ep() SF Markus Elfring
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 ` Sergei Shtylyov [this message]
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=5675C222.6080707@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=elfring@users.sourceforge.net \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox