Date: Tue, 17 Apr 2012 22:24:38 +0200 From: Dimitry Andric <dim@FreeBSD.org> To: John Baldwin <jhb@freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, Scott Long <scottl@freebsd.org>, Stefan Farfeleder <stefanf@freebsd.org>, David Xu <davidxu@freebsd.org>, svn-src-head@freebsd.org Subject: Re: svn commit: r233700 - head/sys/kern Message-ID: <4F8DD186.6060306@FreeBSD.org> In-Reply-To: <201204020752.52596.jhb@freebsd.org> References: <201203301257.q2UCvE4l042042@svn.freebsd.org> <20120330133045.GD1423@mole.fafoe.narf.at> <4F760E5F.5030300@FreeBSD.org> <201204020752.52596.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4F8DD186.6060306>