From owner-svn-src-projects@FreeBSD.ORG Mon Dec 2 21:58:10 2013 Return-Path: Delivered-To: svn-src-projects@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 ESMTPS id 8EA086F; Mon, 2 Dec 2013 21:58:10 +0000 (UTC) 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 79FF61CA7; Mon, 2 Dec 2013 21:58:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB2LwAJS011772; Mon, 2 Dec 2013 21:58:10 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB2LwAsZ011771; Mon, 2 Dec 2013 21:58:10 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201312022158.rB2LwAsZ011771@svn.freebsd.org> From: Marcel Moolenaar Date: Mon, 2 Dec 2013 21:58:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r258856 - projects/altix2/sys/ia64/sgisn X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Dec 2013 21:58:10 -0000 Author: marcel Date: Mon Dec 2 21:58:09 2013 New Revision: 258856 URL: http://svnweb.freebsd.org/changeset/base/258856 Log: Fix a "possibly used uninitialized" warning. Modified: projects/altix2/sys/ia64/sgisn/sgisn_pcib.c Modified: projects/altix2/sys/ia64/sgisn/sgisn_pcib.c ============================================================================== --- projects/altix2/sys/ia64/sgisn/sgisn_pcib.c Mon Dec 2 19:49:52 2013 (r258855) +++ projects/altix2/sys/ia64/sgisn/sgisn_pcib.c Mon Dec 2 21:58:09 2013 (r258856) @@ -688,6 +688,7 @@ sgisn_pcib_iommu_map(device_t bus, devic ate = 0; entry = ~0; + bitshft = 0; while (ate < (PCIB_REG_ATE_SIZE / 64) && entry == ~0) { bits = sc->sc_ate[ate]; /* Move to the next long if this one is full. */ @@ -697,7 +698,6 @@ sgisn_pcib_iommu_map(device_t bus, devic } /* If this long is empty, take it (catches count == 64). */ if (bits == 0UL) { - bitshft = 0; entry = ate * 64; break; } @@ -706,7 +706,6 @@ sgisn_pcib_iommu_map(device_t bus, devic ate++; continue; } - bitshft = 0; do { if ((bits & ((1UL << count) - 1UL)) == 0) { entry = ate * 64 + bitshft; @@ -721,8 +720,10 @@ sgisn_pcib_iommu_map(device_t bus, devic bitshft++; } } while (bitshft <= (64 - count)); - if (entry == ~0) + if (entry == ~0) { ate++; + bitshft = 0; + } } if (entry != ~0) { KASSERT(ate < (PCIB_REG_ATE_SIZE / 64), ("foo: ate"));