Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp758566imm; Fri, 31 Aug 2018 12:25:58 -0700 (PDT) X-Google-Smtp-Source: ANB0VdY+TggwKGEryT6X4GexvE7Ccx+t8oPcJ4tTDV93LS0sqqF719g8kS8edn65D0LZqPnsTqIG X-Received: by 2002:a17:902:28aa:: with SMTP id f39-v6mr17129038plb.150.1535743558690; Fri, 31 Aug 2018 12:25:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535743558; cv=none; d=google.com; s=arc-20160816; b=lZadjqtBUu6EgWINuV5b2zuskyWPgyzB+paa6FUdWJqiTimZutx5NMy7CIe7oYhVfa YzAYytNiKwjnMrYkgXfpOOKj/OsX6H3cRMHoR3UQ12iRXLw4f/YLHaikEsM1ODqSdo84 6xgRUEYwwZ+VaJZgqxPM9O2UgymeiNezFouP9JJbm04lLAFSNYRoJ0OLEkB7wt8yoMHj QDp7yqmBUKA0+aKpHi/RNRa66PdWtOG11Ed5lVgC+rqzzbz+NkV01xV+OjwNTIBbD4pL +fFuMA6naYRZvRV8j5ygQI6Fd8gGLbgSdh4OidQVj12emxfRZQlVk6e2FW0ZnH/m1+s1 jl1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=5/CScGUK/Mr/UvAEUIS935zNUFcvU/PgjkXaci5Uekk=; b=X06rOFrRLoVFyBNNQKvjh/7VpMf2jhrdcabIBmC/HoOUji4ykE74z/SQWVPrhvXviV VOgAwLsVVXCgrMt4OPNPghwkbK3wcEEx5/RkJeMUYplNpuBwYlQ1wYMy3Z/M3wsszG1w XjM7J6NX0xSdakJC8+LSwc31D+4Ig0vzlRZNWKnFVyt51ZBfslEVlEc3n9riIGXGjo2I xwc0Uz6LiGX2NySvwZvjPOITiOvk+y3zFvVvLr45OjrR2glsgdoo4H/cv+IDM4ZUz8Co WthpuEyHIRWCUc+Qhpqf/XzkRfdqf4MhFlC191F10GDMdI96hZCBDmx3B+T5oyszvyQ9 ocTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HhGWiPPM; 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 x1-v6si9782522plv.26.2018.08.31.12.25.42; Fri, 31 Aug 2018 12:25:58 -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=HhGWiPPM; 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 S1727378AbeHaXd2 (ORCPT + 99 others); Fri, 31 Aug 2018 19:33:28 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:35206 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726869AbeHaXd2 (ORCPT ); Fri, 31 Aug 2018 19:33:28 -0400 Received: by mail-lf1-f67.google.com with SMTP id q13-v6so10823731lfc.2; Fri, 31 Aug 2018 12:24:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=5/CScGUK/Mr/UvAEUIS935zNUFcvU/PgjkXaci5Uekk=; b=HhGWiPPMJgpFiqMO+fQrCNSVWE7ShaRYglCH0i/Msr5wjwza77u/WN00S+4527r3XL c0mKOy11+qySiPtKMXcvDGNImG6pd7QlXykiA2pw1km/5OphFvQiwW9eqn4/yPjxm8mT Mp9lMcHMW2AE5OcaVGo/hrxLk7ePO8DMbI6SDPIFvTn/LuAXg34Buhed6qr7lcg0uHgJ ipH3azySPbRP6V8df0yCV9VBF1heZxsIXcsDclO8X1Uxk2+/o/+eawmSi4K6YH9t6Pa/ BRVmKBik1aXu49CWElMmKbCcSNvJ8++O2WUy+j5IDod/s2lIVmrnpHwSRJfbOQpR++VV pxzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=5/CScGUK/Mr/UvAEUIS935zNUFcvU/PgjkXaci5Uekk=; b=S04K8OgCj/Zz4lQxSiWRf/8azDZEkDQiL/5G6fXulj6ROgkcOgoCFBLTinUsRlnt9g 1K1UrpUq4k411Tf5w2efAXaiaSIDhPblaT0Abw8tdkYbUjr5ZqWlC0/U/uyWIxuQpfRX LEcRiWu4GEs/sPl3L13Fm8VcLFXlRYtwnqZrXAbx/il7kq+XsE1Db5fVPW24MdyhfAS7 tqnLSJOLJW15udPchgjH3+98/I+dc75xMhYDguTfL2MOOTIEcpyPd3+oVndrHSUi+T3W Fkqsf+RNAIxEwJGCJVaPAl/aA193e2h0TDkq3RkkYXyzsYOLgd6suoCyJU8PVDpvP7Yi tZsA== X-Gm-Message-State: APzg51Ag4zKR7hbsiEWOh/3pvjJnqeuG6bwoZm5elIK4ZL0/ikR0LUuh sFwOWyN2e8ZE3vbq6mfOv54= X-Received: by 2002:a19:5353:: with SMTP id h80-v6mr11939413lfb.9.1535743472242; Fri, 31 Aug 2018 12:24:32 -0700 (PDT) Received: from Mort.jumbo.freeair (91-159-62-202.elisa-laajakaista.fi. [91.159.62.202]) by smtp.gmail.com with ESMTPSA id h71-v6sm2034796lfg.64.2018.08.31.12.24.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 Aug 2018 12:24:31 -0700 (PDT) From: Igor Stoppa X-Google-Original-From: Igor Stoppa To: Faisal Latif Cc: igor.stoppa@gmail.com, Igor Stoppa , Chien Tung , Roland Dreier , Jason Gunthorpe , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] infiniband: nes: add unlikely() to assert() Date: Fri, 31 Aug 2018 22:24:18 +0300 Message-Id: <20180831192418.12346-1-igor.stoppa@huawei.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Typically the assert is expected to not fail. Signed-off-by: Igor Stoppa Acked-by: Doug Ledford Cc: Faisal Latif Cc: Chien Tung Cc: Roland Dreier Cc: Faisal Latif Cc: Jason Gunthorpe Cc: linux-rdma@vger.kernel.org CC: linux-kernel@vger.kernel.org --- drivers/infiniband/hw/nes/nes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/nes/nes.h b/drivers/infiniband/hw/nes/nes.h index bedaa02749fb..d2d0098f38e0 100644 --- a/drivers/infiniband/hw/nes/nes.h +++ b/drivers/infiniband/hw/nes/nes.h @@ -151,7 +151,7 @@ do { \ #define assert(expr) \ do { \ - if (!(expr)) { \ + if (unlikely(!(expr))) { \ printk(KERN_ERR PFX "Assertion failed! %s, %s, %s, line %d\n", \ #expr, __FILE__, __func__, __LINE__); \ } \ -- 2.17.1