From owner-svn-src-head@FreeBSD.ORG Tue Aug 13 06:21:37 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 80381682; Tue, 13 Aug 2013 06:21:37 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6D5D82BFC; Tue, 13 Aug 2013 06:21:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7D6Lb4q056694; Tue, 13 Aug 2013 06:21:37 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7D6LbuP056693; Tue, 13 Aug 2013 06:21:37 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201308130621.r7D6LbuP056693@svn.freebsd.org> From: Alexander Motin Date: Tue, 13 Aug 2013 06:21:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254269 - head/sys/geom/raid X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Aug 2013 06:21:37 -0000 Author: mav Date: Tue Aug 13 06:21:36 2013 New Revision: 254269 URL: http://svnweb.freebsd.org/changeset/base/254269 Log: Fix reasonable but safe Clang warnings. Modified: head/sys/geom/raid/tr_raid5.c Modified: head/sys/geom/raid/tr_raid5.c ============================================================================== --- head/sys/geom/raid/tr_raid5.c Tue Aug 13 03:10:39 2013 (r254268) +++ head/sys/geom/raid/tr_raid5.c Tue Aug 13 06:21:36 2013 (r254269) @@ -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_R4P0)) { /* 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);