Skip to content

Commit 1011e83

Browse files
committed
Remove lots of unnecessary white space.
Now that I am using white-space mode in Emacs I can see all of this, and I don't like it :-) Signed-off-by: NeilBrown <neilb@suse.de>
1 parent e6dd89d commit 1011e83

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+68
-201
lines changed

Assemble.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,7 +1262,7 @@ int Assemble(struct supertype *st, char *mddev,
12621262
inargv, auto_assem);
12631263
if (num_devs < 0)
12641264
return 1;
1265-
1265+
12661266
if (!st || !st->sb || !content)
12671267
return 2;
12681268

@@ -1897,4 +1897,3 @@ int assemble_container_content(struct supertype *st, int mdfd,
18971897
}
18981898
}
18991899
#endif
1900-

Build.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424

2525
#include "mdadm.h"
2626

27-
#define REGISTER_DEV _IO (MD_MAJOR, 1)
28-
#define START_MD _IO (MD_MAJOR, 2)
29-
#define STOP_MD _IO (MD_MAJOR, 3)
27+
#define REGISTER_DEV _IO (MD_MAJOR, 1)
28+
#define START_MD _IO (MD_MAJOR, 2)
29+
#define STOP_MD _IO (MD_MAJOR, 3)
3030

3131
int Build(char *mddev, struct mddev_dev *devlist,
3232
struct shape *s, struct context *c)

Grow.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1537,7 +1537,6 @@ int Grow_reshape(char *devname, int fd,
15371537
struct mdinfo info;
15381538
struct mdinfo *sra;
15391539

1540-
15411540
if (ioctl(fd, GET_ARRAY_INFO, &array) < 0) {
15421541
pr_err("%s is not an active md array - aborting\n",
15431542
devname);
@@ -2793,7 +2792,6 @@ static int reshape_array(char *container, int fd, char *devname,
27932792
Manage_subdevs(devname, fd, devlist, verbose,
27942793
0,NULL, 0);
27952794

2796-
27972795
if (reshape.backup_blocks == 0 && data_offset)
27982796
reshape.backup_blocks = reshape.before.data_disks * info->array.chunk_size/512;
27992797
if (reshape.backup_blocks == 0) {

Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,4 +298,3 @@ DISTRO_MAKEFILE := $(wildcard distropkg/Makefile)
298298
ifdef DISTRO_MAKEFILE
299299
include $(DISTRO_MAKEFILE)
300300
endif
301-

Manage.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
#include "md_p.h"
2828
#include <ctype.h>
2929

30-
#define REGISTER_DEV _IO (MD_MAJOR, 1)
31-
#define START_MD _IO (MD_MAJOR, 2)
32-
#define STOP_MD _IO (MD_MAJOR, 3)
30+
#define REGISTER_DEV _IO (MD_MAJOR, 1)
31+
#define START_MD _IO (MD_MAJOR, 2)
32+
#define STOP_MD _IO (MD_MAJOR, 3)
3333

3434
int Manage_ro(char *devname, int fd, int readonly)
3535
{
@@ -1358,7 +1358,7 @@ int Manage_subdevs(char *devname, int fd,
13581358
*/
13591359
close(tfd);
13601360
tfd = dev_open(dv->devname, O_RDONLY);
1361-
}
1361+
}
13621362
if (tfd < 0) {
13631363
if (dv->disposition == 'M')
13641364
continue;

Monitor.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ int Monitor(struct mddev_dev *devlist,
156156
return rv;
157157
}
158158

159-
if (share)
159+
if (share)
160160
if (check_one_sharer(c->scan))
161161
return 1;
162162

@@ -204,7 +204,6 @@ int Monitor(struct mddev_dev *devlist,
204204
}
205205
}
206206

207-
208207
while (! finished) {
209208
int new_found = 0;
210209
struct state *st;
@@ -218,7 +217,7 @@ int Monitor(struct mddev_dev *devlist,
218217
if (check_array(st, mdstat, c->test, &info,
219218
increments, c->prefer))
220219
anydegraded = 1;
221-
220+
222221
/* now check if there are any new devices found in mdstat */
223222
if (c->scan)
224223
new_found = add_new_arrays(mdstat, &statelist, c->test,
@@ -809,12 +808,12 @@ static dev_t container_choose_spare(struct state *from, struct state *to,
809808
close(fd);
810809
return 0;
811810
}
812-
811+
813812
err = st->ss->load_container(st, fd, NULL);
814813
close(fd);
815814
if (err)
816815
return 0;
817-
816+
818817
if (from == to) {
819818
/* We must check if number of active disks has not increased
820819
* since ioctl in main loop. mdmon may have added spare
@@ -855,7 +854,6 @@ static dev_t container_choose_spare(struct state *from, struct state *to,
855854
return dev;
856855
}
857856

858-
859857
static void try_spare_migration(struct state *statelist, struct alert_info *info)
860858
{
861859
struct state *from;
@@ -874,7 +872,7 @@ static void try_spare_migration(struct state *statelist, struct alert_info *info
874872
/* subarray monitored without parent container
875873
* we can't move spares here */
876874
continue;
877-
875+
878876
if (to->parent)
879877
/* member of a container */
880878
to = to->parent;

Query.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,4 +124,3 @@ int Query(char *dev)
124124
}
125125
return 0;
126126
}
127-

config.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@ void free_line(char *line)
147147
dl_free(line);
148148
}
149149

150-
151150
struct conf_dev {
152151
struct conf_dev *next;
153152
char *name;
@@ -417,7 +416,7 @@ void arrayline(char *line)
417416
if (strcasecmp(w, "<ignore>") == 0 ||
418417
strncmp(w, "/dev/md/", 8) == 0 ||
419418
(w[0] != '/' && w[0] != '<') ||
420-
(strncmp(w, "/dev/md", 7) == 0 &&
419+
(strncmp(w, "/dev/md", 7) == 0 &&
421420
is_number(w+7)) ||
422421
(strncmp(w, "/dev/md_d", 9) == 0 &&
423422
is_number(w+9))
@@ -568,7 +567,6 @@ void mailfromline(char *line)
568567
}
569568
}
570569

571-
572570
static char *alert_program = NULL;
573571
void programline(char *line)
574572
{
@@ -987,7 +985,6 @@ int devname_matches(char *name, char *match)
987985
else if (strncmp(match, "/dev/", 5) == 0)
988986
match += 5;
989987

990-
991988
if (strncmp(name, "md", 2) == 0 &&
992989
isdigit(name[2]))
993990
name += 2;

dlink.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ char *strncpy(char *dest, const char *src, size_t n) __THROW;
1111
void *xcalloc(size_t num, size_t size);
1212
#include "dlink.h"
1313

14-
1514
void *dl_head()
1615
{
1716
void *h;

lib.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,6 @@ char *fd2devnm(int fd)
112112
return NULL;
113113
}
114114

115-
116-
117115
/*
118116
* convert a major/minor pair for a block device into a name in /dev, if possible.
119117
* On the first call, walk /dev collecting name.
@@ -233,8 +231,6 @@ char *map_dev_preferred(int major, int minor, int create,
233231
return preferred ? preferred : regular;
234232
}
235233

236-
237-
238234
/* conf_word gets one word from the conf file.
239235
* if "allow_key", then accept words at the start of a line,
240236
* otherwise stop when such a word is found.

managemon.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ static void manage_container(struct mdstat_ent *mdstat,
343343
struct supertype *container)
344344
{
345345
/* Of interest here are:
346-
* - if a new device has been added to the container, we
346+
* - if a new device has been added to the container, we
347347
* add it to the array ignoring any metadata on it.
348348
* - if a device has been removed from the container, we
349349
* remove it from the device list and update the metadata.
@@ -639,7 +639,6 @@ static void manage_new(struct mdstat_ent *mdstat,
639639
GET_LEVEL|GET_CHUNK|GET_DISKS|GET_COMPONENT|
640640
GET_DEGRADED|GET_DEVS|GET_OFFSET|GET_SIZE|GET_STATE);
641641

642-
643642
if (!mdi)
644643
return;
645644
new = xcalloc(1, sizeof(*new));
@@ -769,7 +768,7 @@ static void handle_message(struct supertype *container, struct metadata_update *
769768

770769
if (msg->len == 0) { /* ping_monitor */
771770
int cnt;
772-
771+
773772
cnt = monitor_loop_cnt;
774773
if (cnt & 1)
775774
cnt += 2; /* wait until next pselect */

mapfile.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
#include <sys/file.h>
4747
#include <ctype.h>
4848

49-
5049
#define MAP_READ 0
5150
#define MAP_NEW 1
5251
#define MAP_LOCK 2
@@ -105,7 +104,6 @@ int map_write(struct map_ent *mel)
105104
mapname[0]) == 0;
106105
}
107106

108-
109107
static FILE *lf = NULL;
110108
int map_lock(struct map_ent **melp)
111109
{
@@ -416,11 +414,11 @@ void RebuildMap(void)
416414
* It needs to match what -I or -As would come
417415
* up with.
418416
* That means:
419-
* Check if array is in mdadm.conf
417+
* Check if array is in mdadm.conf
420418
* - if so use that.
421419
* determine trustworthy from homehost etc
422420
* find a unique name based on metadata name.
423-
*
421+
*
424422
*/
425423
struct mddev_ident *match = conf_match(st, info,
426424
NULL, 0,

maps.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424

2525
#include "mdadm.h"
2626

27-
2827
/* name/number mappings */
2928

3029
mapping_t r5layout[] = {
@@ -97,7 +96,6 @@ mapping_t pers[] = {
9796
{ NULL, 0}
9897
};
9998

100-
10199
mapping_t modes[] = {
102100
{ "assemble", ASSEMBLE},
103101
{ "build", BUILD},
@@ -150,4 +148,3 @@ int map_name(mapping_t *map, char *name)
150148
}
151149
return UnSet;
152150
}
153-

md_p.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ typedef struct mdp_superblock_s {
112112
/*
113113
* Constant generic information
114114
*/
115-
__u32 md_magic; /* 0 MD identifier */
115+
__u32 md_magic; /* 0 MD identifier */
116116
__u32 major_version; /* 1 major version to which the set conforms */
117117
__u32 minor_version; /* 2 minor version ... */
118118
__u32 patch_version; /* 3 patchlevel version ... */
@@ -196,4 +196,3 @@ static inline __u64 md_event(mdp_super_t *sb) {
196196
}
197197

198198
#endif
199-

md_u.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,4 +120,3 @@ typedef struct mdu_param_s
120120
} mdu_param_t;
121121

122122
#endif
123-

mdadm.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
#include "md_p.h"
3030
#include <ctype.h>
3131

32-
3332
static int scan_assemble(struct supertype *ss,
3433
struct context *c,
3534
struct mddev_ident *ident);
@@ -40,7 +39,6 @@ static int misc_list(struct mddev_dev *devlist,
4039
char *dump_directory,
4140
struct supertype *ss, struct context *c);
4241

43-
4442
int main(int argc, char *argv[])
4543
{
4644
int mode = 0;
@@ -423,7 +421,6 @@ int main(int argc, char *argv[])
423421
writemostly = 2;
424422
continue;
425423

426-
427424
case O(GROW,'z'):
428425
case O(CREATE,'z'):
429426
case O(BUILD,'z'): /* size */
@@ -1611,7 +1608,7 @@ static int scan_assemble(struct supertype *ss,
16111608
if (a->devname &&
16121609
strcasecmp(a->devname, "<ignore>") == 0)
16131610
continue;
1614-
1611+
16151612
r = Assemble(ss, a->devname,
16161613
a, NULL, c);
16171614
if (r == 0) {

mdadm.conf.5

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,4 +621,3 @@ AUTO +1.x homehost \-all
621621
.SH SEE ALSO
622622
.BR mdadm (8),
623623
.BR md (4).
624-

0 commit comments

Comments
 (0)