From owner-svn-src-head@FreeBSD.ORG Wed Jul 27 14:41:22 2011 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 BC2FD106566B; Wed, 27 Jul 2011 14:41:22 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id 541578FC0A; Wed, 27 Jul 2011 14:41:22 +0000 (UTC) Received: by gyf3 with SMTP id 3so1380897gyf.13 for ; Wed, 27 Jul 2011 07:41:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=FmxLelklfaDYaKNlYz+OjwUukO1OdCLquioCCh1IwyI=; b=NhmWhivhyKOy+S/X5fFHZ8KX5ppzHNRCv2nyUX/SjAosOGroFTmdSH1LMTMrHLtovm 6UezbPknz8Ds68AxDq0dox+ojME8uYA12pDZ/IJDUZ8Rfz367Wb7Ly3zqLzz3uXcroSK Y2yNx/2Pzx4yRm7orAQ2LUivz8CYQgLdJ3blA= MIME-Version: 1.0 Received: by 10.151.86.11 with SMTP id o11mr89365ybl.386.1311777681614; Wed, 27 Jul 2011 07:41:21 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.150.197.5 with HTTP; Wed, 27 Jul 2011 07:41:21 -0700 (PDT) In-Reply-To: <1311687058.3848.44.camel@buffy.york.ac.uk> References: <201107220939.p6M9dnsR008517@svn.freebsd.org> <1311687058.3848.44.camel@buffy.york.ac.uk> Date: Wed, 27 Jul 2011 22:41:21 +0800 X-Google-Sender-Auth: v0_Il4_iKJ2ails1_vLG8mYJb3M Message-ID: From: Adrian Chadd To: Gavin Atkinson Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r224267 - head/sys/dev/ath/ath_dfs/null 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, 27 Jul 2011 14:41:22 -0000 Hm, nope. I'll double-check this against the reference code and commit a fi= x. Thanks for picking it up! adrian On 26 July 2011 21:30, Gavin Atkinson wrote: > On Fri, 2011-07-22 at 09:39 +0000, Adrian Chadd wrote: >> Author: adrian >> Date: Fri Jul 22 09:39:49 2011 >> New Revision: 224267 >> URL: http://svn.freebsd.org/changeset/base/224267 >> >> Log: >> =A0 Implement a basic radar parameter API in the dfs_null module. >> >> =A0 Since no actual radar data is ever handled, this won't >> =A0 do anything. It's mostly here as a reference for those who >> =A0 wish to experiment with radar detection. >> >> Modified: >> =A0 head/sys/dev/ath/ath_dfs/null/dfs_null.c > > [...] > >> + =A0 =A0 =A0 =A0 =A0 =A0 indata =3D malloc(insize, M_TEMP, M_NOWAIT); >> + =A0 =A0 =A0 =A0 =A0 =A0 if (indata =3D=3D NULL) { >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 error =3D ENOMEM; >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 goto bad; > > Here you return positive errors to indicate a failure... > >> + =A0 =A0 =A0 =A0 =A0 =A0 case DFS_SET_THRESH: >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (insize < sizeof(HAL_PHYERR= _PARAM)) { >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 error =3D -EIN= VAL; >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 break; >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 } > [...] >> + =A0 =A0 =A0 =A0 =A0 =A0 default: >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 error =3D -EINVAL; >> + =A0 =A0 } > [...] >> + =A0 =A0 if (outdata && copyout(outdata, ad->ad_out_data, ad->ad_out_si= ze)) >> + =A0 =A0 =A0 =A0 =A0 =A0 error =3D -EFAULT; > > And for these, you return negative error values. =A0Is this inconsistency > intentional? > > Thanks, > > Gavin >