From owner-svn-src-all@freebsd.org Thu Apr 21 18:13:02 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53E25B17822 for ; Thu, 21 Apr 2016 18:13:02 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm47-vm1.bullet.mail.bf1.yahoo.com (nm47-vm1.bullet.mail.bf1.yahoo.com [216.109.115.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A9BE1271 for ; Thu, 21 Apr 2016 18:13:01 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1461261605; bh=hHSbGOs9yEOQULPsGft246RKEW6hFAo6rDdu5IlgjXQ=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From:Subject; b=inScR5j8Wklrt3GOadcrYTJjdLf783fvpZQizKAQmlxZUxYUwar6+t5SMV3WVTvFPkTD4aXo/Rdcuo6NQQmpbSjtXOz7WNKzYf0GloChJWd/+lfoX92LhBlhWUgpNxgCMjlzrjwmauzJk3Op7wJM9/t7sCyN/2eFi8LpWWbu/lObU7vydIPmjs2kaYFyCLhM/DxpQf5g13zwxL2NAqYcmM5uT54t1guysroGF+3MdHIYhrRF7x5MbgNssFjY0YQazqQO73ZGAE+WIHLJ8UEDcnPrmdFk+JMElOLJ+GkRexydnG+GsWDCqhCToXNL9MWvYrtKTTgpPgWw1kDtt5G6Zw== Received: from [98.139.170.182] by nm47.bullet.mail.bf1.yahoo.com with NNFMP; 21 Apr 2016 18:00:05 -0000 Received: from [98.139.213.13] by tm25.bullet.mail.bf1.yahoo.com with NNFMP; 21 Apr 2016 18:00:05 -0000 Received: from [127.0.0.1] by smtp113.mail.bf1.yahoo.com with NNFMP; 21 Apr 2016 18:00:05 -0000 X-Yahoo-Newman-Id: 424123.97673.bm@smtp113.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: 5m9yDlgVM1mEQR.clensywQ1OoIAsaOj4STvQm.FH5IAeUS jpQezZDFBRXrRvJq4cZdOOh7Fb5ZRZi.elNh4NnML2w4JvFCkLVUq99RNIde 0MPj6YCJrKWVR.yvxPK8xuPhQgvcWobUKIrexS2fb9h_GUERfnlC8x0NtVAu i1nAD7jdwIBds9eRtBxtWkRYjlbmGuya0PnW4wS8EgbHCu_au32YFw7o.egJ M9isV56k88vRrsAqorEPerUeqUFTLcba7KmyFIRj1j9gogTnU2AHqCdFxmwY hT9TI5zrICLqsGpkMtV_zlsc9nL34H82GTjw4mwGGCLosndyoPMJBzTz1rYs Di0lML9TbN.YXnsDsJhz2d7IUDABMDA6T.yxMlHasG_9dTidf8iXTGD2qnmR P5KWOfiD9OCC0CS15ahgY2.MFIDyihUKguzofQ4f6YDRhJQdwP_xX9MHq6xs ASFpawCYHKRpB2o5sC.9K9_W06idC4GwDLWEuiymlIwdoqPGpX7wyvPA7WNe 5HWy3hHmPaNGUgk46DKxmnug_2RXICyCi X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r298412 - head/sys/ofed/drivers/infiniband/core To: Juli Mallett , Hans Petter Selasky References: <201604211604.u3LG4wmT035874@repo.freebsd.org> <57190C47.8070106@selasky.org> Cc: Ngie Cooper , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" From: Pedro Giffuni Message-ID: <5719150F.7030200@FreeBSD.org> Date: Thu, 21 Apr 2016 12:59:43 -0500 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 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: Thu, 21 Apr 2016 18:13:02 -0000 On 21/04/2016 12:52, Juli Mallett wrote: > On Thu, Apr 21, 2016 at 10:22 AM, Hans Petter Selasky 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. We do have __unreachable() in cdefs.h It should work with both GCC and clang. Pedro.