Skip to content

Commit

Permalink
staging: usbip: removed unnecessary for loop
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kurt Kanzenbach authored and Greg Kroah-Hartman committed Apr 5, 2013
1 parent 2183b77 commit 521e1e7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/staging/usbip/stub_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 521e1e7

Please sign in to comment.