From: Oliver Neukum <oliver@neukum.org>
To: Duncan Sands <baldrick@free.fr>, Greg KH <greg@kroah.com>
Cc: linux-usb-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org, Frederic Detienne <fd@cisco.com>
Subject: Re: [linux-usb-devel] [PATCH 7/9] USB usbfs: destroy submitted urbs only on the disconnected interface
Date: Wed, 14 Apr 2004 17:33:11 +0200 [thread overview]
Message-ID: <200404141733.11599.oliver@neukum.org> (raw)
In-Reply-To: <200404141700.43087.baldrick@free.fr>
> > Well, I don't. If you care about it, add a WARN_ON().
> > Checking without consequences is bad.
>
> Hi Oliver, how about this instead?
>
[..]
> - clear_bit(intf->cur_altsetting->desc.bInterfaceNumber, &ps->ifclaimed);
> + if (ifnum < 8*sizeof(ps->ifclaimed))
> + clear_bit(ifnum, &ps->ifclaimed);
> + else
> + warn("interface number %u out of range", ifnum);
> +
I would prefer a real WARN_ON() so that the imbedded people compiling
for size are not affected.
Regards
Oliver
next prev parent reply other threads:[~2004-04-14 15:34 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-14 10:45 Duncan Sands
2004-04-14 13:30 ` [linux-usb-devel] " Oliver Neukum
2004-04-14 13:38 ` Duncan Sands
2004-04-14 15:00 ` Duncan Sands
2004-04-14 15:33 ` Oliver Neukum [this message]
2004-04-14 15:39 ` Duncan Sands
2004-04-14 20:39 ` Oliver Neukum
2004-04-15 8:05 ` Duncan Sands
2004-04-15 8:31 ` Oliver Neukum
2004-04-15 8:47 ` Duncan Sands
2004-04-15 9:08 ` Oliver Neukum
2004-04-15 9:21 ` Duncan Sands
2004-04-14 16:48 ` Alan Stern
2004-04-14 17:09 ` Duncan Sands
2004-04-14 17:55 ` Alan Stern
2004-04-17 18:31 ` Duncan Sands
2004-04-17 18:53 ` Duncan Sands
2004-04-17 19:52 ` Alan Stern
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=200404141733.11599.oliver@neukum.org \
--to=oliver@neukum.org \
--cc=baldrick@free.fr \
--cc=fd@cisco.com \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
/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
all inboxes | Powered by JetHome®