diff --git a/mdmon.h b/mdmon.h index aa750c6..0b08c3d 100644 --- a/mdmon.h +++ b/mdmon.h @@ -101,7 +101,7 @@ static inline int is_resync_complete(struct mdinfo *array) break; case 10: l = array->array.layout; - ncopies = (l & 0xff) * ((l >> 8) && 0xff); + ncopies = (l & 0xff) * ((l >> 8) & 0xff); sync_size = array->component_size * array->array.raid_disks; sync_size /= ncopies; break; diff --git a/mdopen.c b/mdopen.c index 5af344b..0ea3874 100644 --- a/mdopen.c +++ b/mdopen.c @@ -318,7 +318,7 @@ int create_mddev(char *dev, char *name, int autof, int trustworthy, else if (num < 0) { /* need to choose a free number. */ char *_devnm = find_free_devnm(use_mdp); - if (devnm == NULL) { + if (_devnm == NULL) { pr_err("No avail md devices - aborting\n"); return -1; } diff --git a/restripe.c b/restripe.c index 359ae86..de85ee4 100644 --- a/restripe.c +++ b/restripe.c @@ -482,7 +482,7 @@ int raid6_check_disks(int data_disks, int start, int chunk_size, } if((Px == 0) && (Qx == 0)) - curr_broken_disk = curr_broken_disk; + curr_broken_disk = prev_broken_disk; if(curr_broken_disk >= data_disks + 2) broken_status = 2; diff --git a/super-intel.c b/super-intel.c index 1304737..e1124ba 100644 --- a/super-intel.c +++ b/super-intel.c @@ -10154,7 +10154,7 @@ enum imsm_reshape_type imsm_analyze_change(struct supertype *st, geo->size = max_size; } - if ((direction == ROLLBACK_METADATA_CHANGES)) { + if (direction == ROLLBACK_METADATA_CHANGES) { /* accept size for rollback only */ } else {