From owner-svn-src-all@FreeBSD.ORG Tue Jul 26 13:41:53 2011 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 5C5A0106566B; Tue, 26 Jul 2011 13:41:53 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from ixe-mta-27.emailfiltering.com (ixe-mta-27-tx.emailfiltering.com [194.116.199.158]) by mx1.freebsd.org (Postfix) with ESMTP id 5F47A8FC15; Tue, 26 Jul 2011 13:41:52 +0000 (UTC) Received: from mail-gw11.york.ac.uk ([144.32.129.150]) by ixe-mta-27.emailfiltering.com with emfmta (version 4.8.2.32) by TLS id 1203548846 for adrian@FreeBSD.org; e1b884cc25bd50d1; Tue, 26 Jul 2011 14:31:01 +0100 Received: from buffy-128.york.ac.uk ([144.32.128.160]:31623 helo=buffy.york.ac.uk) by mail-gw11.york.ac.uk with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1Qlhiu-0001Zj-HN; Tue, 26 Jul 2011 14:31:00 +0100 Received: from buffy.york.ac.uk (localhost [127.0.0.1]) by buffy.york.ac.uk (8.14.4/8.14.4) with ESMTP id p6QDV0VL034342; Tue, 26 Jul 2011 14:31:00 +0100 (BST) (envelope-from gavin@FreeBSD.org) Received: (from ga9@localhost) by buffy.york.ac.uk (8.14.4/8.14.4/Submit) id p6QDUxB9034341; Tue, 26 Jul 2011 14:30:59 +0100 (BST) (envelope-from gavin@FreeBSD.org) X-Authentication-Warning: buffy.york.ac.uk: ga9 set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson To: Adrian Chadd In-Reply-To: <201107220939.p6M9dnsR008517@svn.freebsd.org> References: <201107220939.p6M9dnsR008517@svn.freebsd.org> Content-Type: text/plain; charset="ASCII" Content-Transfer-Encoding: quoted-printable Date: Tue, 26 Jul 2011 14:30:58 +0100 Message-ID: <1311687058.3848.44.camel@buffy.york.ac.uk> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port 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-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, 26 Jul 2011 13:41:53 -0000 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 >=20 > Log: > Implement a basic radar parameter API in the dfs_null module. > =20 > Since no actual radar data is ever handled, this won't > do anything. It's mostly here as a reference for those who > wish to experiment with radar detection. >=20 > Modified: > head/sys/dev/ath/ath_dfs/null/dfs_null.c [...] > + indata =3D malloc(insize, M_TEMP, M_NOWAIT); > + if (indata =3D=3D NULL) { > + error =3D ENOMEM; > + goto bad; Here you return positive errors to indicate a failure... > + case DFS_SET_THRESH: > + if (insize < sizeof(HAL_PHYERR_PARAM)) { > + error =3D -EINVAL; > + break; > + } [...] > + default: > + error =3D -EINVAL; > + } [...] > + if (outdata && copyout(outdata, ad->ad_out_data, ad->ad_out_size)) > + error =3D -EFAULT; And for these, you return negative error values. Is this inconsistency intentional? Thanks, Gavin