From owner-svn-src-all@FreeBSD.ORG Tue Apr 17 20:24:42 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7A2B1065674; Tue, 17 Apr 2012 20:24:42 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 8E9948FC18; Tue, 17 Apr 2012 20:24:42 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:920:4d88:e4b9:4d05] (unknown [IPv6:2001:7b8:3a7:0:920:4d88:e4b9:4d05]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id CB1F75C37; Tue, 17 Apr 2012 22:24:41 +0200 (CEST) Message-ID: <4F8DD186.6060306@FreeBSD.org> Date: Tue, 17 Apr 2012 22:24:38 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120410 Thunderbird/12.0 MIME-Version: 1.0 To: John Baldwin References: <201203301257.q2UCvE4l042042@svn.freebsd.org> <20120330133045.GD1423@mole.fafoe.narf.at> <4F760E5F.5030300@FreeBSD.org> <201204020752.52596.jhb@freebsd.org> In-Reply-To: <201204020752.52596.jhb@freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, Scott Long , Stefan Farfeleder , David Xu , svn-src-head@freebsd.org Subject: Re: svn commit: r233700 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Apr 2012 20:24:43 -0000 On 2012-04-02 13:52, John Baldwin wrote: ... >> It seems the for loop walks the list until the end, then tacks 'sc' onto >> it. >> >> So to 'fix' the warning, and make the meaning more explicit, we should >> probably rewrite that fragment as: >> >> LIST_INIT(&(sc->ha_ccb)); >> /* Link us into the HA list */ >> for (ha =&Asr_softc_list; *ha; ha =&((*ha)->ha_next)) >> ; >> *(ha) = sc; >> >> Is this OK? > > Can we just make that code use a STAILQ() instead of doing it obscurely by > hand? That would be a more invasive change, and since this driver is essentially unmaintained, I'd like to change as little as possible. :) Another solution is to just silence the warning for this driver.