diff options
Diffstat (limited to 'drivers/md/dm-ps-round-robin.c')
-rw-r--r-- | drivers/md/dm-ps-round-robin.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/drivers/md/dm-ps-round-robin.c b/drivers/md/dm-ps-round-robin.c index 27f44c5fa04e..0f04b673597a 100644 --- a/drivers/md/dm-ps-round-robin.c +++ b/drivers/md/dm-ps-round-robin.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2003 Sistina Software. * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. @@ -20,13 +21,15 @@ #define RR_MIN_IO 1 #define RR_VERSION "1.2.0" -/*----------------------------------------------------------------- +/* + *--------------------------------------------------------------- * Path-handling code, paths are held in lists - *---------------------------------------------------------------*/ + *--------------------------------------------------------------- + */ struct path_info { struct list_head list; struct dm_path *path; - unsigned repeat_count; + unsigned int repeat_count; }; static void free_paths(struct list_head *paths) @@ -39,10 +42,11 @@ static void free_paths(struct list_head *paths) } } -/*----------------------------------------------------------------- +/* + *--------------------------------------------------------------- * Round-robin selector - *---------------------------------------------------------------*/ - + *--------------------------------------------------------------- + */ struct selector { struct list_head valid_paths; struct list_head invalid_paths; @@ -62,7 +66,7 @@ static struct selector *alloc_selector(void) return s; } -static int rr_create(struct path_selector *ps, unsigned argc, char **argv) +static int rr_create(struct path_selector *ps, unsigned int argc, char **argv) { struct selector *s; @@ -93,7 +97,7 @@ static int rr_status(struct path_selector *ps, struct dm_path *path, if (!path) DMEMIT("0 "); else { - switch(type) { + switch (type) { case STATUSTYPE_INFO: break; case STATUSTYPE_TABLE: @@ -119,7 +123,7 @@ static int rr_add_path(struct path_selector *ps, struct dm_path *path, { struct selector *s = ps->context; struct path_info *pi; - unsigned repeat_count = RR_MIN_IO; + unsigned int repeat_count = RR_MIN_IO; char dummy; unsigned long flags; |