Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dm: avoid spaces before function arguments or in favour of tabs

Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>

authored by

Heinz Mauelshagen and committed by
Mike Snitzer
8ca817c4 beecc843

+84 -87
+3 -3
drivers/md/dm-bio-prison-v1.c
··· 78 78 struct bio *holder, 79 79 struct dm_bio_prison_cell *cell) 80 80 { 81 - memcpy(&cell->key, key, sizeof(cell->key)); 82 - cell->holder = holder; 83 - bio_list_init(&cell->bios); 81 + memcpy(&cell->key, key, sizeof(cell->key)); 82 + cell->holder = holder; 83 + bio_list_init(&cell->bios); 84 84 } 85 85 86 86 static int cmp_keys(struct dm_cell_key *lhs,
+6 -6
drivers/md/dm-cache-target.c
··· 181 181 */ 182 182 static void issue_after_commit(struct batcher *b, struct bio *bio) 183 183 { 184 - bool commit_scheduled; 184 + bool commit_scheduled; 185 185 186 - spin_lock_irq(&b->lock); 187 - commit_scheduled = b->commit_scheduled; 188 - bio_list_add(&b->bios, bio); 189 - spin_unlock_irq(&b->lock); 186 + spin_lock_irq(&b->lock); 187 + commit_scheduled = b->commit_scheduled; 188 + bio_list_add(&b->bios, bio); 189 + spin_unlock_irq(&b->lock); 190 190 191 - if (commit_scheduled) 191 + if (commit_scheduled) 192 192 async_commit(b); 193 193 } 194 194
+1 -1
drivers/md/dm-ebs-target.c
··· 242 242 * <offset>: offset in 512 bytes sectors into <dev_path> 243 243 * <ebs>: emulated block size in units of 512 bytes exposed to the upper layer 244 244 * [<ubs>]: underlying block size in units of 512 bytes imposed on the lower layer; 245 - * optional, if not supplied, retrieve logical block size from underlying device 245 + * optional, if not supplied, retrieve logical block size from underlying device 246 246 */ 247 247 static int ebs_ctr(struct dm_target *ti, unsigned int argc, char **argv) 248 248 {
+22 -22
drivers/md/dm-exception-store.h
··· 44 44 const char *name; 45 45 struct module *module; 46 46 47 - int (*ctr) (struct dm_exception_store *store, char *options); 47 + int (*ctr)(struct dm_exception_store *store, char *options); 48 48 49 49 /* 50 50 * Destroys this object when you've finished with it. 51 51 */ 52 - void (*dtr) (struct dm_exception_store *store); 52 + void (*dtr)(struct dm_exception_store *store); 53 53 54 54 /* 55 55 * The target shouldn't read the COW device until this is 56 56 * called. As exceptions are read from the COW, they are 57 57 * reported back via the callback. 58 58 */ 59 - int (*read_metadata) (struct dm_exception_store *store, 60 - int (*callback)(void *callback_context, 61 - chunk_t old, chunk_t new), 62 - void *callback_context); 59 + int (*read_metadata)(struct dm_exception_store *store, 60 + int (*callback)(void *callback_context, 61 + chunk_t old, chunk_t new), 62 + void *callback_context); 63 63 64 64 /* 65 65 * Find somewhere to store the next exception. 66 66 */ 67 - int (*prepare_exception) (struct dm_exception_store *store, 68 - struct dm_exception *e); 67 + int (*prepare_exception)(struct dm_exception_store *store, 68 + struct dm_exception *e); 69 69 70 70 /* 71 71 * Update the metadata with this exception. 72 72 */ 73 - void (*commit_exception) (struct dm_exception_store *store, 74 - struct dm_exception *e, int valid, 75 - void (*callback) (void *, int success), 76 - void *callback_context); 73 + void (*commit_exception)(struct dm_exception_store *store, 74 + struct dm_exception *e, int valid, 75 + void (*callback)(void *, int success), 76 + void *callback_context); 77 77 78 78 /* 79 79 * Returns 0 if the exception store is empty. ··· 83 83 * still-to-be-merged chunk and returns the number of 84 84 * consecutive previous ones. 85 85 */ 86 - int (*prepare_merge) (struct dm_exception_store *store, 87 - chunk_t *last_old_chunk, chunk_t *last_new_chunk); 86 + int (*prepare_merge)(struct dm_exception_store *store, 87 + chunk_t *last_old_chunk, chunk_t *last_new_chunk); 88 88 89 89 /* 90 90 * Clear the last n exceptions. 91 91 * nr_merged must be <= the value returned by prepare_merge. 92 92 */ 93 - int (*commit_merge) (struct dm_exception_store *store, int nr_merged); 93 + int (*commit_merge)(struct dm_exception_store *store, int nr_merged); 94 94 95 95 /* 96 96 * The snapshot is invalid, note this in the metadata. 97 97 */ 98 - void (*drop_snapshot) (struct dm_exception_store *store); 98 + void (*drop_snapshot)(struct dm_exception_store *store); 99 99 100 - unsigned int (*status) (struct dm_exception_store *store, 101 - status_type_t status, char *result, 102 - unsigned int maxlen); 100 + unsigned int (*status)(struct dm_exception_store *store, 101 + status_type_t status, char *result, 102 + unsigned int maxlen); 103 103 104 104 /* 105 105 * Return how full the snapshot is. 106 106 */ 107 - void (*usage) (struct dm_exception_store *store, 108 - sector_t *total_sectors, sector_t *sectors_allocated, 109 - sector_t *metadata_sectors); 107 + void (*usage)(struct dm_exception_store *store, 108 + sector_t *total_sectors, sector_t *sectors_allocated, 109 + sector_t *metadata_sectors); 110 110 111 111 /* For internal device-mapper use only. */ 112 112 struct list_head list;
+25 -27
drivers/md/dm-ioctl.c
··· 54 54 }; 55 55 56 56 struct vers_iter { 57 - size_t param_size; 58 - struct dm_target_versions *vers, *old_vers; 59 - char *end; 60 - uint32_t flags; 57 + size_t param_size; 58 + struct dm_target_versions *vers, *old_vers; 59 + char *end; 60 + uint32_t flags; 61 61 }; 62 62 63 63 ··· 661 661 662 662 static void list_version_get_needed(struct target_type *tt, void *needed_param) 663 663 { 664 - size_t *needed = needed_param; 664 + size_t *needed = needed_param; 665 665 666 - *needed += sizeof(struct dm_target_versions); 667 - *needed += strlen(tt->name) + 1; 668 - *needed += ALIGN_MASK; 666 + *needed += sizeof(struct dm_target_versions); 667 + *needed += strlen(tt->name) + 1; 668 + *needed += ALIGN_MASK; 669 669 } 670 670 671 671 static void list_version_get_info(struct target_type *tt, void *param) 672 672 { 673 - struct vers_iter *info = param; 673 + struct vers_iter *info = param; 674 674 675 - /* Check space - it might have changed since the first iteration */ 676 - if ((char *)info->vers + sizeof(tt->version) + strlen(tt->name) + 1 > 677 - info->end) { 675 + /* Check space - it might have changed since the first iteration */ 676 + if ((char *)info->vers + sizeof(tt->version) + strlen(tt->name) + 1 > info->end) { 677 + info->flags = DM_BUFFER_FULL_FLAG; 678 + return; 679 + } 678 680 679 - info->flags = DM_BUFFER_FULL_FLAG; 680 - return; 681 - } 681 + if (info->old_vers) 682 + info->old_vers->next = (uint32_t) ((void *)info->vers - (void *)info->old_vers); 682 683 683 - if (info->old_vers) 684 - info->old_vers->next = (uint32_t) ((void *)info->vers - 685 - (void *)info->old_vers); 686 - info->vers->version[0] = tt->version[0]; 687 - info->vers->version[1] = tt->version[1]; 688 - info->vers->version[2] = tt->version[2]; 689 - info->vers->next = 0; 690 - strcpy(info->vers->name, tt->name); 684 + info->vers->version[0] = tt->version[0]; 685 + info->vers->version[1] = tt->version[1]; 686 + info->vers->version[2] = tt->version[2]; 687 + info->vers->next = 0; 688 + strcpy(info->vers->name, tt->name); 691 689 692 - info->old_vers = info->vers; 693 - info->vers = align_ptr((void *)(info->vers + 1) + strlen(tt->name) + 1); 690 + info->old_vers = info->vers; 691 + info->vers = align_ptr((void *)(info->vers + 1) + strlen(tt->name) + 1); 694 692 } 695 693 696 694 static int __list_versions(struct dm_ioctl *param, size_t param_size, const char *name) ··· 2093 2095 2094 2096 static struct miscdevice _dm_misc = { 2095 2097 .minor = MAPPER_CTRL_MINOR, 2096 - .name = DM_NAME, 2098 + .name = DM_NAME, 2097 2099 .nodename = DM_DIR "/" DM_CONTROL_NODE, 2098 - .fops = &_ctl_fops 2100 + .fops = &_ctl_fops 2099 2101 }; 2100 2102 2101 2103 MODULE_ALIAS_MISCDEV(MAPPER_CTRL_MINOR);
+1 -1
drivers/md/dm-kcopyd.c
··· 608 608 * of successful jobs. 609 609 */ 610 610 static int process_jobs(struct list_head *jobs, struct dm_kcopyd_client *kc, 611 - int (*fn) (struct kcopyd_job *)) 611 + int (*fn)(struct kcopyd_job *)) 612 612 { 613 613 struct kcopyd_job *job; 614 614 int r, count = 0;
+13 -14
drivers/md/dm-path-selector.h
··· 53 53 /* 54 54 * Constructs a path selector object, takes custom arguments 55 55 */ 56 - int (*create) (struct path_selector *ps, unsigned int argc, char **argv); 57 - void (*destroy) (struct path_selector *ps); 56 + int (*create)(struct path_selector *ps, unsigned int argc, char **argv); 57 + void (*destroy)(struct path_selector *ps); 58 58 59 59 /* 60 60 * Add an opaque path object, along with some selector specific 61 61 * path args (eg, path priority). 62 62 */ 63 - int (*add_path) (struct path_selector *ps, struct dm_path *path, 64 - int argc, char **argv, char **error); 63 + int (*add_path)(struct path_selector *ps, struct dm_path *path, 64 + int argc, char **argv, char **error); 65 65 66 66 /* 67 67 * Chooses a path for this io, if no paths are available then 68 68 * NULL will be returned. 69 69 */ 70 - struct dm_path *(*select_path) (struct path_selector *ps, 71 - size_t nr_bytes); 70 + struct dm_path *(*select_path)(struct path_selector *ps, size_t nr_bytes); 72 71 73 72 /* 74 73 * Notify the selector that a path has failed. 75 74 */ 76 - void (*fail_path) (struct path_selector *ps, struct dm_path *p); 75 + void (*fail_path)(struct path_selector *ps, struct dm_path *p); 77 76 78 77 /* 79 78 * Ask selector to reinstate a path. 80 79 */ 81 - int (*reinstate_path) (struct path_selector *ps, struct dm_path *p); 80 + int (*reinstate_path)(struct path_selector *ps, struct dm_path *p); 82 81 83 82 /* 84 83 * Table content based on parameters added in ps_add_path_fn 85 84 * or path selector status 86 85 */ 87 - int (*status) (struct path_selector *ps, struct dm_path *path, 88 - status_type_t type, char *result, unsigned int maxlen); 86 + int (*status)(struct path_selector *ps, struct dm_path *path, 87 + status_type_t type, char *result, unsigned int maxlen); 89 88 90 - int (*start_io) (struct path_selector *ps, struct dm_path *path, 91 - size_t nr_bytes); 92 - int (*end_io) (struct path_selector *ps, struct dm_path *path, 93 - size_t nr_bytes, u64 start_time); 89 + int (*start_io)(struct path_selector *ps, struct dm_path *path, 90 + size_t nr_bytes); 91 + int (*end_io)(struct path_selector *ps, struct dm_path *path, 92 + size_t nr_bytes, u64 start_time); 94 93 }; 95 94 96 95 /* Register a path selector */
+2 -2
drivers/md/dm-ps-queue-length.c
··· 123 123 124 124 /* 125 125 * Arguments: [<repeat_count>] 126 - * <repeat_count>: The number of I/Os before switching path. 127 - * If not given, default (QL_MIN_IO) is used. 126 + * <repeat_count>: The number of I/Os before switching path. 127 + * If not given, default (QL_MIN_IO) is used. 128 128 */ 129 129 if (argc > 1) { 130 130 *error = "queue-length ps: incorrect number of arguments";
+4 -4
drivers/md/dm-ps-service-time.c
··· 121 121 122 122 /* 123 123 * Arguments: [<repeat_count> [<relative_throughput>]] 124 - * <repeat_count>: The number of I/Os before switching path. 125 - * If not given, default (ST_MIN_IO) is used. 126 - * <relative_throughput>: The relative throughput value of 124 + * <repeat_count>: The number of I/Os before switching path. 125 + * If not given, default (ST_MIN_IO) is used. 126 + * <relative_throughput>: The relative throughput value of 127 127 * the path among all paths in the path-group. 128 - * The valid range: 0-<ST_MAX_RELATIVE_THROUGHPUT> 128 + * The valid range: 0-<ST_MAX_RELATIVE_THROUGHPUT> 129 129 * If not given, minimum value '1' is used. 130 130 * If '0' is given, the path isn't selected while 131 131 * other paths having a positive value are available.
+1 -1
drivers/md/dm-raid1.c
··· 595 595 * We do different things with the write io depending on the 596 596 * state of the region that it's in: 597 597 * 598 - * SYNC: increment pending, use kcopyd to write to *all* mirrors 598 + * SYNC: increment pending, use kcopyd to write to *all* mirrors 599 599 * RECOVERING: delay the io until recovery completes 600 600 * NOSYNC: increment pending, just write to the default mirror 601 601 *---------------------------------------------------------------------
+1 -1
drivers/md/dm-snap-persistent.c
··· 695 695 696 696 static void persistent_commit_exception(struct dm_exception_store *store, 697 697 struct dm_exception *e, int valid, 698 - void (*callback) (void *, int success), 698 + void (*callback)(void *, int success), 699 699 void *callback_context) 700 700 { 701 701 unsigned int i;
+1 -1
drivers/md/dm-snap-transient.c
··· 56 56 57 57 static void transient_commit_exception(struct dm_exception_store *store, 58 58 struct dm_exception *e, int valid, 59 - void (*callback) (void *, int success), 59 + void (*callback)(void *, int success), 60 60 void *callback_context) 61 61 { 62 62 /* Just succeed */
+3 -3
drivers/md/dm-snap.c
··· 123 123 * The merge operation failed if this flag is set. 124 124 * Failure modes are handled as follows: 125 125 * - I/O error reading the header 126 - * => don't load the target; abort. 126 + * => don't load the target; abort. 127 127 * - Header does not have "valid" flag set 128 - * => use the origin; forget about the snapshot. 128 + * => use the origin; forget about the snapshot. 129 129 * - I/O error when reading exceptions 130 - * => don't load the target; abort. 130 + * => don't load the target; abort. 131 131 * (We can't use the intermediate origin state.) 132 132 * - I/O error while merging 133 133 * => stop merging; set merge_failed; process I/O normally.
+1 -1
drivers/md/dm-uevent.c
··· 3 3 * Device Mapper Uevent Support (dm-uevent) 4 4 * 5 5 * Copyright IBM Corporation, 2007 6 - * Author: Mike Anderson <andmike@linux.vnet.ibm.com> 6 + * Author: Mike Anderson <andmike@linux.vnet.ibm.com> 7 7 */ 8 8 #include <linux/list.h> 9 9 #include <linux/slab.h>