[mdadm/f15/master] More compile fixes

Doug Ledford dledford at fedoraproject.org
Sat Mar 26 17:55:53 UTC 2011


commit 78bb9b470397612cc55e6a3fbf28713d3ae19027
Author: Doug Ledford <dledford at redhat.com>
Date:   Sat Mar 26 13:55:43 2011 -0400

    More compile fixes
    
    Signed-off-by: Doug Ledford <dledford at redhat.com>

 mdadm-3.1.5-unused-param.patch |   33 +++++++++++++++++++++++++++++++++
 1 files changed, 33 insertions(+), 0 deletions(-)
---
diff --git a/mdadm-3.1.5-unused-param.patch b/mdadm-3.1.5-unused-param.patch
index 87d56fb..29c0937 100644
--- a/mdadm-3.1.5-unused-param.patch
+++ b/mdadm-3.1.5-unused-param.patch
@@ -61,3 +61,36 @@
  					} while (rv2!=2);
  					/* Incase there are stacked devices, we need to go around again */
  				} while (acnt);
+--- mdadm-3.1.5/super1.c.param	2011-03-26 13:51:30.166019581 -0400
++++ mdadm-3.1.5/super1.c	2011-03-26 13:55:02.995382097 -0400
+@@ -111,7 +111,6 @@ static unsigned int calc_sb_1_csum(struc
+ 	unsigned long long newcsum;
+ 	int size = sizeof(*sb) + __le32_to_cpu(sb->max_dev)*2;
+ 	unsigned int *isuper = (unsigned int*)sb;
+-	int i;
+ 
+ /* make sure I can count... */
+ 	if (offsetof(struct mdp_superblock_1,data_offset) != 128 ||
+@@ -123,7 +122,7 @@ static unsigned int calc_sb_1_csum(struc
+ 	disk_csum = sb->sb_csum;
+ 	sb->sb_csum = 0;
+ 	newcsum = 0;
+-	for (i=0; size>=4; size -= 4 ) {
++	for (; size>=4; size -= 4 ) {
+ 		newcsum += __le32_to_cpu(*isuper);
+ 		isuper++;
+ 	}
+@@ -387,13 +386,10 @@ static void examine_super1(struct supert
+ 	printf("   Array State : ");
+ 	for (d=0; d<__le32_to_cpu(sb->raid_disks) + delta_extra; d++) {
+ 		int cnt = 0;
+-		int me = 0;
+ 		unsigned int i;
+ 		for (i=0; i< __le32_to_cpu(sb->max_dev); i++) {
+ 			unsigned int role = __le16_to_cpu(sb->dev_roles[i]);
+ 			if (role == d) {
+-				if (i == __le32_to_cpu(sb->dev_number))
+-					me = 1;
+ 				cnt++;
+ 			}
+ 		}


More information about the scm-commits mailing list