From owner-svn-src-all@freebsd.org Thu Apr 21 18:09:18 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 841B5B17323; Thu, 21 Apr 2016 18:09:18 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 499F31CEC; Thu, 21 Apr 2016 18:09:17 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id AADD61FE024; Thu, 21 Apr 2016 20:09:15 +0200 (CEST) Subject: Re: svn commit: r298412 - head/sys/ofed/drivers/infiniband/core To: Pedro Giffuni , Juli Mallett References: <201604211604.u3LG4wmT035874@repo.freebsd.org> <57190C47.8070106@selasky.org> <5719150F.7030200@FreeBSD.org> Cc: Ngie Cooper , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" From: Hans Petter Selasky Message-ID: <5719180F.90509@selasky.org> Date: Thu, 21 Apr 2016 20:12:31 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <5719150F.7030200@FreeBSD.org> 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:09:18 -0000 On 04/21/16 19:59, Pedro Giffuni wrote: > > > 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: Hi, >> 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. > I don't see anyone using __unreachable() yet in the kernel. Do you recommend it over a KASSERT() ? --HPS