]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: usbip: removed unnecessary for loop
authorKurt Kanzenbach <ly80toro@cip.cs.fau.de>
Thu, 4 Apr 2013 14:03:10 +0000 (16:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Apr 2013 21:22:51 +0000 (14:22 -0700)
This for loop is not needed, since STUB_BUSID_OTHER is defined as 0.
In Addition added a comment if STUB_BUSID_OTHER changes sometime.

Signed-off-by: Kurt Kanzenbach <ly80toro@cip.cs.fau.de>
Signed-off-by: Stefan Reif <ke42caxa@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/usbip/stub_main.c

index 629bfcbcb9b0788bf5c1df2fd37d138e5faa6e4a..33027cce6700506e6abaca6db07d5f8cf594a6cd 100644 (file)
@@ -38,11 +38,11 @@ static spinlock_t busid_table_lock;
 
 static void init_busid_table(void)
 {
-       int i;
-
+       /*
+        * This also sets the bus_table[i].status to
+        * STUB_BUSID_OTHER, which is 0.
+        */
        memset(busid_table, 0, sizeof(busid_table));
-       for (i = 0; i < MAX_BUSID; i++)
-               busid_table[i].status = STUB_BUSID_OTHER;
 
        spin_lock_init(&busid_table_lock);
 }