svn commit: r298412 - head/sys/ofed/drivers/infiniband/core

Juli Mallett juli at clockworksquid.com
Thu Apr 21 17:52:57 UTC 2016


On Thu, Apr 21, 2016 at 10:22 AM, Hans Petter Selasky <hps at selasky.org> wrote:
> On 04/21/16 19:12, Ngie Cooper wrote:
>>
>> Please put the "deadcode" back. It will crash now if it's given an
>> invalid address family (or none are configured in the kernel) when it
>> tries to do the memcpy below.
>
>
> If you look a few lines up in the file, not the patch, you'll see that there
> already is a switch case which catches this.
>
> OK?

Then there should be an assertion or something else of that sort (I
forget if we have a __builtin_unreachable()-alike macro in the kernel;
the lint(1)y NOTREACHED isn't as nice as actual code) so that it is
apparent to a human that this case cannot be reached.  The presence of
a do-nothing default case is not typically indicative of unreachable
code.


More information about the svn-src-head mailing list