From owner-svn-src-head@FreeBSD.ORG Wed Apr 18 13:54:55 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E0611106564A; Wed, 18 Apr 2012 13:54:55 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id B232C8FC16; Wed, 18 Apr 2012 13:54:55 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 263B6B960; Wed, 18 Apr 2012 09:54:55 -0400 (EDT) From: John Baldwin To: Dimitry Andric Date: Wed, 18 Apr 2012 09:54:14 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p13; KDE/4.5.5; amd64; ; ) References: <201203301257.q2UCvE4l042042@svn.freebsd.org> <201204020752.52596.jhb@freebsd.org> <4F8DD186.6060306@FreeBSD.org> In-Reply-To: <4F8DD186.6060306@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201204180954.14236.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 18 Apr 2012 09:54:55 -0400 (EDT) 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-head@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 18 Apr 2012 13:54:56 -0000 On Tuesday, April 17, 2012 4:24:38 pm Dimitry Andric wrote: > 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. http://www.FreeBSD.org/~jhb/patches/asr_stailq.patch -- John Baldwin