Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Jul 2011 22:41:21 +0800
From:      Adrian Chadd <adrian@freebsd.org>
To:        Gavin Atkinson <gavin@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:  <CAJ-VmomD9koJckVvymdYwXcvc9zaMpA5XdUA0VLCfBzzogDORQ@mail.gmail.com>
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>

next in thread | previous in thread | raw e-mail | index | archive | help

Hm, nope. I'll double-check this against the reference code and commit a fix.

Thanks for picking it up!


adrian

On 26 July 2011 21:30, Gavin Atkinson <gavin@freebsd.org> 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:
>>   Implement a basic radar parameter API in the dfs_null module.
>>
>>   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.
>>
>> Modified:
>>   head/sys/dev/ath/ath_dfs/null/dfs_null.c
>
> [...]
>
>> +             indata = malloc(insize, M_TEMP, M_NOWAIT);
>> +             if (indata == NULL) {
>> +                     error = ENOMEM;
>> +                     goto bad;
>
> Here you return positive errors to indicate a failure...
>
>> +             case DFS_SET_THRESH:
>> +                     if (insize < sizeof(HAL_PHYERR_PARAM)) {
>> +                             error = -EINVAL;
>> +                             break;
>> +                     }
> [...]
>> +             default:
>> +                     error = -EINVAL;
>> +     }
> [...]
>> +     if (outdata && copyout(outdata, ad->ad_out_data, ad->ad_out_size))
>> +             error = -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?CAJ-VmomD9koJckVvymdYwXcvc9zaMpA5XdUA0VLCfBzzogDORQ>