From mboxrd@z Thu Jan 1 00:00:00 1970 From: Igor Stoppa Subject: Re: [PATCH] ethernet: hnae: add unlikely() to assert() Date: Sat, 8 Sep 2018 18:00:27 +0300 Message-ID: References: <20180907172650.29408-1-igor.stoppa@huawei.com> <20180907.144659.284526279757617907.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: huangdaode@hisilicon.com, igor.stoppa@huawei.com, yisen.zhuang@huawei.com, salil.mehta@huawei.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org To: David Miller Return-path: In-Reply-To: <20180907.144659.284526279757617907.davem@davemloft.net> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On 08/09/18 00:46, David Miller wrote: > From: Igor Stoppa > Date: Fri, 7 Sep 2018 20:26:50 +0300 > >> The assert() condition is likely to be true. > > Worse than that is that drivers should not be definiting their own > private "assert()" macro. > > I'd rather have that fixed instead. We have tons of standard kernel > facilities that do what they are trying to do here, without overloading > the standard C namespace in this way. I've converted into WARN() what passed the compile test. In one case it didn't even compile :-( I could only compile-test. -- igor