Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Sep 2013 10:10:01 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r255564 - stable/9/sys/geom/raid
Message-ID:  <201309141010.r8EAA1Sb029363@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Sat Sep 14 10:10:01 2013
New Revision: 255564
URL: http://svnweb.freebsd.org/changeset/base/255564

Log:
  MFC r254269, r254271:
  Fix reasonable but safe Clang warnings.

Modified:
  stable/9/sys/geom/raid/tr_raid5.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/geom/raid/tr_raid5.c
==============================================================================
--- stable/9/sys/geom/raid/tr_raid5.c	Sat Sep 14 10:08:09 2013	(r255563)
+++ stable/9/sys/geom/raid/tr_raid5.c	Sat Sep 14 10:10:01 2013	(r255564)
@@ -106,7 +106,8 @@ g_raid_tr_taste_raid5(struct g_raid_tr_o
 	trs = (struct g_raid_tr_raid5_object *)tr;
 	qual = tr->tro_volume->v_raid_level_qualifier;
 	if (tr->tro_volume->v_raid_level == G_RAID_VOLUME_RL_RAID4 &&
-	    qual >= 0 && qual <= 1) {
+	    (qual == G_RAID_VOLUME_RLQ_R4P0 ||
+	     qual == G_RAID_VOLUME_RLQ_R4PN)) {
 		/* RAID4 */
 	} else if ((tr->tro_volume->v_raid_level == G_RAID_VOLUME_RL_RAID5 ||
 	     tr->tro_volume->v_raid_level == G_RAID_VOLUME_RL_RAID5E ||
@@ -114,7 +115,10 @@ g_raid_tr_taste_raid5(struct g_raid_tr_o
 	     tr->tro_volume->v_raid_level == G_RAID_VOLUME_RL_RAID5R ||
 	     tr->tro_volume->v_raid_level == G_RAID_VOLUME_RL_RAID6 ||
 	     tr->tro_volume->v_raid_level == G_RAID_VOLUME_RL_RAIDMDF) &&
-	    qual >= 0 && qual <= 3) {
+	    (qual == G_RAID_VOLUME_RLQ_R5RA ||
+	     qual == G_RAID_VOLUME_RLQ_R5RS ||
+	     qual == G_RAID_VOLUME_RLQ_R5LA ||
+	     qual == G_RAID_VOLUME_RLQ_R5LS)) {
 		/* RAID5/5E/5EE/5R/6/MDF */
 	} else
 		return (G_RAID_TR_TASTE_FAIL);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201309141010.r8EAA1Sb029363>