Date: Tue, 26 Jul 2011 14:30:58 +0100 From: Gavin Atkinson <gavin@FreeBSD.org> To: Adrian Chadd <adrian@FreeBSD.org> 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 Message-ID: <1311687058.3848.44.camel@buffy.york.ac.uk> In-Reply-To: <201107220939.p6M9dnsR008517@svn.freebsd.org> References: <201107220939.p6M9dnsR008517@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1311687058.3848.44.camel>