Skip to content

Commit 8ca817c

Browse files
mauelshaMike Snitzer
authored andcommitted
dm: avoid spaces before function arguments or in favour of tabs
Signed-off-by: Heinz Mauelshagen <[email protected]> Signed-off-by: Mike Snitzer <[email protected]>
1 parent beecc84 commit 8ca817c

14 files changed

+84
-87
lines changed

drivers/md/dm-bio-prison-v1.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ static void __setup_new_cell(struct dm_cell_key *key,
7878
struct bio *holder,
7979
struct dm_bio_prison_cell *cell)
8080
{
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);
8484
}
8585

8686
static int cmp_keys(struct dm_cell_key *lhs,

drivers/md/dm-cache-target.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -181,14 +181,14 @@ static void continue_after_commit(struct batcher *b, struct continuation *k)
181181
*/
182182
static void issue_after_commit(struct batcher *b, struct bio *bio)
183183
{
184-
bool commit_scheduled;
184+
bool commit_scheduled;
185185

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);
190190

191-
if (commit_scheduled)
191+
if (commit_scheduled)
192192
async_commit(b);
193193
}
194194

drivers/md/dm-ebs-target.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ static void __ebs_process_bios(struct work_struct *ws)
242242
* <offset>: offset in 512 bytes sectors into <dev_path>
243243
* <ebs>: emulated block size in units of 512 bytes exposed to the upper layer
244244
* [<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
246246
*/
247247
static int ebs_ctr(struct dm_target *ti, unsigned int argc, char **argv)
248248
{

drivers/md/dm-exception-store.h

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -44,36 +44,36 @@ struct dm_exception_store_type {
4444
const char *name;
4545
struct module *module;
4646

47-
int (*ctr) (struct dm_exception_store *store, char *options);
47+
int (*ctr)(struct dm_exception_store *store, char *options);
4848

4949
/*
5050
* Destroys this object when you've finished with it.
5151
*/
52-
void (*dtr) (struct dm_exception_store *store);
52+
void (*dtr)(struct dm_exception_store *store);
5353

5454
/*
5555
* The target shouldn't read the COW device until this is
5656
* called. As exceptions are read from the COW, they are
5757
* reported back via the callback.
5858
*/
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);
6363

6464
/*
6565
* Find somewhere to store the next exception.
6666
*/
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);
6969

7070
/*
7171
* Update the metadata with this exception.
7272
*/
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);
7777

7878
/*
7979
* Returns 0 if the exception store is empty.
@@ -83,30 +83,30 @@ struct dm_exception_store_type {
8383
* still-to-be-merged chunk and returns the number of
8484
* consecutive previous ones.
8585
*/
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);
8888

8989
/*
9090
* Clear the last n exceptions.
9191
* nr_merged must be <= the value returned by prepare_merge.
9292
*/
93-
int (*commit_merge) (struct dm_exception_store *store, int nr_merged);
93+
int (*commit_merge)(struct dm_exception_store *store, int nr_merged);
9494

9595
/*
9696
* The snapshot is invalid, note this in the metadata.
9797
*/
98-
void (*drop_snapshot) (struct dm_exception_store *store);
98+
void (*drop_snapshot)(struct dm_exception_store *store);
9999

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);
103103

104104
/*
105105
* Return how full the snapshot is.
106106
*/
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);
110110

111111
/* For internal device-mapper use only. */
112112
struct list_head list;

drivers/md/dm-ioctl.c

Lines changed: 25 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ struct hash_cell {
5454
};
5555

5656
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;
6161
};
6262

6363

@@ -661,36 +661,34 @@ static int list_devices(struct file *filp, struct dm_ioctl *param, size_t param_
661661

662662
static void list_version_get_needed(struct target_type *tt, void *needed_param)
663663
{
664-
size_t *needed = needed_param;
664+
size_t *needed = needed_param;
665665

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;
669669
}
670670

671671
static void list_version_get_info(struct target_type *tt, void *param)
672672
{
673-
struct vers_iter *info = param;
673+
struct vers_iter *info = param;
674674

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+
}
678680

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);
682683

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);
691689

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);
694692
}
695693

696694
static int __list_versions(struct dm_ioctl *param, size_t param_size, const char *name)
@@ -2095,9 +2093,9 @@ static const struct file_operations _ctl_fops = {
20952093

20962094
static struct miscdevice _dm_misc = {
20972095
.minor = MAPPER_CTRL_MINOR,
2098-
.name = DM_NAME,
2096+
.name = DM_NAME,
20992097
.nodename = DM_DIR "/" DM_CONTROL_NODE,
2100-
.fops = &_ctl_fops
2098+
.fops = &_ctl_fops
21012099
};
21022100

21032101
MODULE_ALIAS_MISCDEV(MAPPER_CTRL_MINOR);

drivers/md/dm-kcopyd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ static int run_pages_job(struct kcopyd_job *job)
608608
* of successful jobs.
609609
*/
610610
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 *))
612612
{
613613
struct kcopyd_job *job;
614614
int r, count = 0;

drivers/md/dm-path-selector.h

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -53,44 +53,43 @@ struct path_selector_type {
5353
/*
5454
* Constructs a path selector object, takes custom arguments
5555
*/
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);
5858

5959
/*
6060
* Add an opaque path object, along with some selector specific
6161
* path args (eg, path priority).
6262
*/
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);
6565

6666
/*
6767
* Chooses a path for this io, if no paths are available then
6868
* NULL will be returned.
6969
*/
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);
7271

7372
/*
7473
* Notify the selector that a path has failed.
7574
*/
76-
void (*fail_path) (struct path_selector *ps, struct dm_path *p);
75+
void (*fail_path)(struct path_selector *ps, struct dm_path *p);
7776

7877
/*
7978
* Ask selector to reinstate a path.
8079
*/
81-
int (*reinstate_path) (struct path_selector *ps, struct dm_path *p);
80+
int (*reinstate_path)(struct path_selector *ps, struct dm_path *p);
8281

8382
/*
8483
* Table content based on parameters added in ps_add_path_fn
8584
* or path selector status
8685
*/
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);
8988

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);
9493
};
9594

9695
/* Register a path selector */

drivers/md/dm-ps-queue-length.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ static int ql_add_path(struct path_selector *ps, struct dm_path *path,
123123

124124
/*
125125
* 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.
128128
*/
129129
if (argc > 1) {
130130
*error = "queue-length ps: incorrect number of arguments";

drivers/md/dm-ps-service-time.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,11 @@ static int st_add_path(struct path_selector *ps, struct dm_path *path,
121121

122122
/*
123123
* 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
127127
* 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>
129129
* If not given, minimum value '1' is used.
130130
* If '0' is given, the path isn't selected while
131131
* other paths having a positive value are available.

drivers/md/dm-raid1.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ static void do_reads(struct mirror_set *ms, struct bio_list *reads)
595595
* We do different things with the write io depending on the
596596
* state of the region that it's in:
597597
*
598-
* SYNC: increment pending, use kcopyd to write to *all* mirrors
598+
* SYNC: increment pending, use kcopyd to write to *all* mirrors
599599
* RECOVERING: delay the io until recovery completes
600600
* NOSYNC: increment pending, just write to the default mirror
601601
*---------------------------------------------------------------------

0 commit comments

Comments
 (0)