Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2331689imm; Fri, 7 Sep 2018 14:49:22 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZTRxASmHbKUubbEExe3V2uYULYDEc8JrkAW6DEXTIuyXeJCsUB/xv3r71FEn3fIZb7vctG X-Received: by 2002:a17:902:bd44:: with SMTP id b4-v6mr10095258plx.144.1536356962560; Fri, 07 Sep 2018 14:49:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536356962; cv=none; d=google.com; s=arc-20160816; b=CoP7Cxzp1f6cskVvrDUE2hAbJnL21CgFxXOsaQiYz3pFxgJafiDIA8Mhe3YTQ78s+D tTomXZlgkvKM11qYmxb9EFE3WAG8fLfZtaBM7tk9bAtzPAjkHwoXCv709izRE5CwQv7V zP3dqLFptbSTXAhJKOEk1Qi1zYFmKR004nwuQsFzKrfqZK+3SufdxVIWbij6wVqM3s5k e+v5vGSKUB/bfJA1Jr8kAkcYJhkKCo3+YT/P14EzEtZKSm1DnDGY/jZRWKN+mkhKeSHo l2GoqXHXmrsqfHkZ2HtOWbTBvOHimu8iLvGzQsusmQsOaUuCdiGcQylMNV+97MI3PX7I rWvA== 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:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=12/JwuJPoSoylqY4a5yvxwLywx6fO7XdqDapaodGtPU=; b=teuEzA7sVrI8eKvkSKW7OfgXqeDBuj65WTJTpzQqXURERT5eN0vu/QWR5EyxOIViB9 5pLtOky8HB3SM1qoYAAfsFxkaO0GlGY7Ow4oSRAeOy5u1I+I1mO2F1IPZ5xRSvJdWGxB 29Fp7GoYiDqvZnrgm2M0uz2/1aFL6js2cN+/WKmDXEvVRjGP2PDFv9ARhP9BxSy5VAQx jBZ9UVW0Ju2wmUq2sncTwkixYFjP2STar7DC1/96PADeDn2YxpDWJP8wuqCSXDid4Abg OI3M3nMZHEAP7f+o3KZYmZx2nVY5kaUC7JhVGn8hTxzzBd+Sdq0XIqEnzzviCXDuCuLm GxXQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 91-v6si8898731ply.405.2018.09.07.14.49.07; Fri, 07 Sep 2018 14:49:22 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731283AbeIHCaA (ORCPT + 99 others); Fri, 7 Sep 2018 22:30:00 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:53280 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728406AbeIHC37 (ORCPT ); Fri, 7 Sep 2018 22:29:59 -0400 Received: from localhost (unknown [207.32.164.225]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 05889147BB32C; Fri, 7 Sep 2018 14:47:02 -0700 (PDT) Date: Fri, 07 Sep 2018 14:46:59 -0700 (PDT) Message-Id: <20180907.144659.284526279757617907.davem@davemloft.net> To: igor.stoppa@gmail.com 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 Subject: Re: [PATCH] ethernet: hnae: add unlikely() to assert() From: David Miller In-Reply-To: <20180907172650.29408-1-igor.stoppa@huawei.com> References: <20180907172650.29408-1-igor.stoppa@huawei.com> X-Mailer: Mew version 6.7 on Emacs 26 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Fri, 07 Sep 2018 14:47:03 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.