From: Julia Lawall <julia@diku.dk>
To: perex@perex.cz, ricardo@scarybox.net,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [PATCH 4/4] sound/usb: use unsigned for loop index
Date: Sun, 11 May 2008 14:52:09 +0200 (CEST) [thread overview]
Message-ID: <Pine.LNX.4.64.0805111451380.29620@ask.diku.dk> (raw)
From: Julia Lawall <julia@diku.dk>
A few more cases in the spirit of the patch "Trivial: Replacement of always
>0 ints with unsigned ints" submitted by Ricardo Martins <ricardo@scarybox.net>
The transformation was made using the following semantic patch
(http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@r exists@ // find anything that might decrement the variable
identifier i;
expression E;
position p;
@@
int i@p;
...
(
&i
|
i--
|
--i
|
i-=E
|
i+=E
)
@x disable decl_init@
identifier r.i;
expression E;
position p1 != r.p;
@@
(
volatile int i = 0;
|
volatile int i;
|
+ unsigned
int i@p1 = 0;
|
+ unsigned
int i@p1;
)
<... when != i = E
(
i = 0
|
i = 1
)
...>
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
---
sound/usb/usbaudio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -u -p a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c
--- a/sound/usb/usbaudio.c 2008-04-27 11:41:12.000000000 +0200
+++ b/sound/usb/usbaudio.c 2008-05-11 12:20:14.000000000 +0200
@@ -2835,7 +2835,7 @@ static int parse_audio_endpoints(struct
*/
static void snd_usb_stream_disconnect(struct list_head *head)
{
- int idx;
+ unsigned int idx;
struct snd_usb_stream *as;
struct snd_usb_substream *subs;
reply other threads:[~2008-05-11 12:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=Pine.LNX.4.64.0805111451380.29620@ask.diku.dk \
--to=julia@diku.dk \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=ricardo@scarybox.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®