From owner-freebsd-current@FreeBSD.ORG Fri Aug 31 12:15:10 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B67E1065670 for ; Fri, 31 Aug 2012 12:15:07 +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 BC13A8FC0C for ; Fri, 31 Aug 2012 12:15:07 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id B6FBDB91A; Fri, 31 Aug 2012 08:15:06 -0400 (EDT) From: John Baldwin To: deeptech71@gmail.com Date: Fri, 31 Aug 2012 07:57:16 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: <504068F2.6010300@gmail.com> <50407947.50907@andric.com> <5040801D.9090305@gmail.com> In-Reply-To: <5040801D.9090305@gmail.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201208310757.16906.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 31 Aug 2012 08:15:06 -0400 (EDT) Cc: Dimitry Andric , freebsd-current@freebsd.org Subject: Re: sys/dev/amr build error with Clang X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2012 12:15:10 -0000 On Friday, August 31, 2012 5:13:01 am deeptech71@gmail.com wrote: > Dimitry Andric wrote: > > The one call to get the callout to amr_periodic() started seems to have > > been commented out in r239912: > > > > http://svnweb.freebsd.org/base/head/sys/dev/amr/amr.c?r1=239912&r2=239911&pathrev=239912 > > > > If the function isn't necessary anymore, it could just be deleted, or > > #ifdef'd out. > > I don't use "amr", so I personally don't care whether the use of the function was accidentally commented out or whether the function was accidentally left unused. But on a side-note, to a programmer not familiar with the driver, that case seems like a case of "the use was accidentally commented out". No, read the diff more closely. The call to timeout() to start the timer was already commented out before. That goes back to r65245 (12 years ago). Similar drivers don't use a periodic timer, so it can probably just be removed. The reason for the new Clang warning is that the old timeout(9) API passes the function pointer to untimeout(), whereas callout_stop() just accepts a pointer to the callout structure. -- John Baldwin