Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp740226imm; Sat, 8 Sep 2018 08:05:15 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbtzW0pP8nPUsI9NBM8ke97G2nCKcVXwj/c2wajJr/+0MPTTVjgNfJYsbRX/xKGifbQGLBf X-Received: by 2002:a63:2bc9:: with SMTP id r192-v6mr13820024pgr.386.1536419115591; Sat, 08 Sep 2018 08:05:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536419115; cv=none; d=google.com; s=arc-20160816; b=NYedNE7yZD9i+er8ZJ083Yf6IIGw4KWgt2sBdbHlrmgQDjZK4z2E/R0aV8IhNtAa5K P7+h/J/PRToIHaV6w1S0RdRc83+o0UPcLSgBRzhyGZT1m1s080OixkpCiK89xwUF3Swv vEEiBZnthpzSPkM8c8sF5llcevDClWKvZC4rev/++MLIXxdsIM0ixvKqCD8YikOH8SyD aVYw1Ev8IwLcuBpR6RPhD6Fm5Keq0aycpXybX6A+RwDbKaJBxbj2UezqxLVQx33ZKS98 r/COKCZfM9zTGaJcgvcb4dlYsedDWuThEO5KmVuifvBhOnPDVq4Id7eEpQv+x2pgB93I 9VsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=Pj7Kd1/gqF+ugIbZp65oBUSCAa5JDmldtMrmra3C/Es=; b=mn6oOoXptma9hiRmp3JMr5C34535+7FofL8UuvJgTs3dex2peLx3MyWlA6AurGnoWD z2KK+7mgjO8v+U/yw+zgcxAG0tZoi10k2iQEy23WI3woGsDVLUUBthi0AdAo5Qw8ggNp afcQ4LkhIEKOjFBEx1DULXhsrWywXI+SwLE0cOZZnWtrxGbU/d2lSPlAskTdUBMF1guT Zt7t6/yGs9O5IaY9MmGrpFnDKXAxPqxekg55XPeKI4txWYnlPg5tkY+FNi0Ephn71ueo nijmpxfdG5OIFqQvUxi3+aF+6kULEBekDAxQU6i2GgbFSp2HUytCKbi13vY51pNbmot8 yLGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RMgdYgL7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bc5-v6si10329922plb.278.2018.09.08.08.04.22; Sat, 08 Sep 2018 08:05:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RMgdYgL7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726938AbeIHTqg (ORCPT + 99 others); Sat, 8 Sep 2018 15:46:36 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:39177 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726351AbeIHTqg (ORCPT ); Sat, 8 Sep 2018 15:46:36 -0400 Received: by mail-lf1-f67.google.com with SMTP id v77-v6so14234029lfa.6; Sat, 08 Sep 2018 08:00:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Pj7Kd1/gqF+ugIbZp65oBUSCAa5JDmldtMrmra3C/Es=; b=RMgdYgL7yJMX/JIkQxOTae9LJ9/3elBVeKVAU1zvnTWqCnSbkFxKUO9Fu+YyFjJtkc Z8rvD1IeUUtci3a+Meo+YWp+WTw74osmvkHfbLB8OhN+Ji7w0TyCZ+WJnV7GHEtaZRIX i0NkRi5NaJur1svBQC5XP957Ir//MjsJgisFym0QRuVgadATbfFJ8TqMo682/3EF9APg MUmlWuXQHyvyKcbIhgPRq6I+MTK+6PY+YNNpd05HmaelO1eAoljfWNfEeL5r2iVMnPXN Z3Y8y4EIe6PCBhICoe2zGFSuu3/8WCPBRSOHUZrHv3R8EFT3Nv6S6b9sHneCi5tKClK+ +RTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Pj7Kd1/gqF+ugIbZp65oBUSCAa5JDmldtMrmra3C/Es=; b=soyNtMqn9VU2oT0EWjuOfy5eRip63O4/ODbrJdR8gTkhVQI3OaL18u2Rh2ppvYeidt rzuYzFVdKkQroOdeKiazdO3NrZSEDJTooS6hzw5SRsaI2ZtqL1IUZUyT1AcCYI4riaKj eRnbQRtj37VPABPz+yrKQETgAx80foNqWN3c71YzZiuw4t5cqIPx9rbtI3MnxcX7Q5yV 3T5/tJtqlPZs12ZqEH1PuRZH9ubdKnWlxqpgY2DGBhbEfKjFbmFZK4HrSxkz1WUOyvB+ XGJSseGAwma6wkXMMu+zJcwjgPIDX50lCfRZLydCTTFoa7enFlyTGIPcvShSchCdcDO7 oCmA== X-Gm-Message-State: APzg51BClfmHxvBxJbxZpp7J5cnJL/tMDOhywIKhTBfV/x3mneaYq2mZ xhXARmd9fW/yWK4mfxvNn3Q7YaB9K30= X-Received: by 2002:a19:d78d:: with SMTP id q13-v6mr8034718lfi.27.1536418829657; Sat, 08 Sep 2018 08:00:29 -0700 (PDT) Received: from [192.168.10.160] (91-159-62-202.elisa-laajakaista.fi. [91.159.62.202]) by smtp.gmail.com with ESMTPSA id n22-v6sm1775053lfh.59.2018.09.08.08.00.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 08 Sep 2018 08:00:28 -0700 (PDT) Subject: Re: [PATCH] ethernet: hnae: add unlikely() to assert() To: David Miller 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 References: <20180907172650.29408-1-igor.stoppa@huawei.com> <20180907.144659.284526279757617907.davem@davemloft.net> From: Igor Stoppa Message-ID: Date: Sat, 8 Sep 2018 18:00:27 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180907.144659.284526279757617907.davem@davemloft.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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