Remove all "if zeros"
PATCH 1/1 Remove all "if zeros"
No more random encounters of "if zeros".
Remove all "if 0" code blocks.
Signed-off-by Mateusz Kusiak <[email protected]>
--- Assemble.c | 6 ----- Detail.c | 7 ------ super-intel.c | 28 ---------------------- super1.c | 20 ---------------- sysfs.c | 66 --------------------------------------------------- 5 files changed, 127 deletions(-)
Assemble.c +0 -6
@@ -1806,12 +1806,6 @@ try_again: i, mddev, devices[j].devname); } } -#if 0 -if (!(super.disks[i].i.disk.state & (1 <<MD_DISK_FAULTY ))) { -pr_err ("devices %d of %s is not marked FAULTY in superblock, but cannot be found\n" , - i, mddev); - } -#endif }if (c->force && !clean && !is_container (content->array.level) && !enough(content->array.level, content->array.raid_disks,
Detail.c +0 -7
@@ -603,13 +603,6 @@ int Detail(char *dev, struct context *c) }if ((st && st->sb) && (info && info->reshape_active)) { -#if 0 -This is pretty boring -printf (" Reshape pos'n : %llu%s\n" , - (unsigned long long ) info->reshape_progress <<9 , -human_size ((unsigned long long ) - info->reshape_progress <<9 )); -#endif if (info->delta_disks !=0 ) printf(" Delta Devices : %d, (%d->%d)\n", info->delta_disks,
super-intel.c +0 -28
@@ -2976,34 +2976,6 @@ static void uuid_from_super_imsm(struct supertype *st, int uuid[4])memcpy (uuid, buf,4 *4 ); } -#if 0 -static void -get_imsm_numerical_version (struct imsm_super *mpb,int *m,int *p) -{ -__u8 *v =get_imsm_version (mpb); -__u8 *end = mpb->sig +MAX_SIGNATURE_LENGTH ; -char major[] = {0 ,0 ,0 }; -char minor[] = {0 ,0 ,0 }; -char patch[] = {0 ,0 ,0 }; -char *ver_parse[] = { major, minor, patch }; -int i, j; - - i = j =0 ; -while (*v !='\0' && v < end) { -if (*v !='.' && j <2 ) - ver_parse[i][j++] = *v; -else { - i++; - j =0 ; - } - v++; - } - - *m =strtol (minor,NULL ,0 ); - *p =strtol (patch,NULL ,0 ); -} -#endif -static __u32 migr_strip_blocks_resync (struct imsm_dev *dev) {/* migr_strip_size when repairing or initializing parity */
super1.c +0 -20
@@ -544,26 +544,6 @@ static void examine_super1(struct supertype *st, char *homehost)break ; }printf ("\n" ); -#if 0 -/* This turns out to just be confusing */ -printf (" Array Slot : %d (" ,__le32_to_cpu (sb->dev_number)); -for (i =__le32_to_cpu (sb->max_dev); i >0 ; i--) -if (__le16_to_cpu (sb->dev_roles[i-1 ]) !=MD_DISK_ROLE_SPARE ) -break ; -for (d =0 ; d < i; d++) { -int role =__le16_to_cpu (sb->dev_roles[d]); -if (d) -printf (", " ); -if (role ==MD_DISK_ROLE_SPARE ) -printf ("empty" ); -else -if (role ==MD_DISK_ROLE_FAULTY ) -printf ("failed" ); -else -printf ("%d" , role); - } -printf (")\n" ); -#endif printf (" Device Role : " ); role =role_from_sb (sb);if (role >=MD_DISK_ROLE_FAULTY )
sysfs.c +0 -66
72 lines not on this page · raw message
Signature · 1 line
2.26.2
Quoted 4 lines · On Mon, 18 Dec 2023 16:03:51 +0100 Mateusz Kusiak <[email protected]>…
No more random encounters of "if zeros".
Remove all "if 0" code blocks.Signed-off-by Mateusz Kusiak <[email protected]>
Thanks for cleanup. Applied!
Thanks,
Mariusz