qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paul Brook <paul@codesourcery.com>
To: qemu-devel@nongnu.org
Cc: Paul Bolle <pebolle@tiscali.nl>
Subject: Re: [Qemu-devel] [PATCH] [TRIVIAL] usb-linux: remove unreachable default in switch statement
Date: Mon, 8 Mar 2010 13:31:26 +0000	[thread overview]
Message-ID: <201003081331.27047.paul@codesourcery.com> (raw)
In-Reply-To: <1268053115.2130.4.camel@localhost.localdomain>

> Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
> ---
>  usb-linux.c |    3 ---
>  1 files changed, 0 insertions(+), 3 deletions(-)
> 
> diff --git a/usb-linux.c b/usb-linux.c
> index a9c15c6..23155dd 100644
> --- a/usb-linux.c
> +++ b/usb-linux.c
> @@ -846,9 +846,6 @@ static int usb_linux_update_endp_table(USBHostDevice
>  *s) case 0x03:
>                  type = USBDEVFS_URB_TYPE_INTERRUPT;
>                  break;
> -            default:
> -                DPRINTF("usb_host: malformed endpoint type\n");
> -                type = USBDEVFS_URB_TYPE_BULK;
>              }
>              s->endp_table[(devep & 0xf) - 1].type = type;
>              s->endp_table[(devep & 0xf) - 1].halted = 0;
> 

I'd be tempted to replace it by an abort(). If it's provable redundant then 
the compiler will remove it anyway. If not then we at least get a noisy 
failure when someone breaks it.

Paul

  reply	other threads:[~2010-03-08 13:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-08 12:58 [Qemu-devel] [PATCH] [TRIVIAL] usb-linux: remove unreachable default in switch statement Paul Bolle
2010-03-08 13:31 ` Paul Brook [this message]
2010-03-17 15:59 ` Anthony Liguori
2010-03-17 16:14   ` Paul Bolle
2010-03-17 16:39     ` Anthony Liguori
2010-03-17 17:08       ` Paul Brook
2010-03-17 17:15         ` Anthony Liguori
2010-03-17 17:43           ` Paul Brook
2010-03-17 20:15             ` Blue Swirl
2010-03-17 20:41               ` Anthony Liguori
2010-03-17 20:56                 ` Paul Bolle
2010-03-17 20:59                   ` Anthony Liguori
2010-03-17 21:05                     ` Blue Swirl

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=201003081331.27047.paul@codesourcery.com \
    --to=paul@codesourcery.com \
    --cc=pebolle@tiscali.nl \
    --cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).