From patchwork Thu Dec 29 21:07:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 709570 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3tqMd06tGVz9sCX for ; Fri, 30 Dec 2016 08:07:48 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=cogentembedded-com.20150623.gappssmtp.com header.i=@cogentembedded-com.20150623.gappssmtp.com header.b="L/IpkH14"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751112AbcL2VHn (ORCPT ); Thu, 29 Dec 2016 16:07:43 -0500 Received: from mail-lf0-f50.google.com ([209.85.215.50]:33922 "EHLO mail-lf0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750921AbcL2VHm (ORCPT ); Thu, 29 Dec 2016 16:07:42 -0500 Received: by mail-lf0-f50.google.com with SMTP id y21so227340990lfa.1 for ; Thu, 29 Dec 2016 13:07:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cogentembedded-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:organization:user-agent :mime-version:content-transfer-encoding; bh=K/i8M6PG1ZysPGjDIignYoCIiD4HbwuppMLf/VGYh6I=; b=L/IpkH14UHWTERxyBipdX4OkCPVYcz6K1jip9wd906SmMXyJaRkX1YNsGW/Mqks85H 8Ll34yJcgpQjqLO/ZItu1o9Jz32NLkw2uh9xkjclu4u1a1DWcuTy2yrCNKsp93x+2wzY 74M7iO50/AdkMglcHDBhqeMANHzZhVsitEvfT7k8cIFP3CEkuAXkh8QyCeiescEAr75/ erQG7HKZzrAbsBNSM/Y6eli9VZlae4EL/W6SRoQPDWxfbc66VhORYxB/tNIzSVYjvP8v 2phJR8/h4FU2XfbaT9bLMFrqIrRZkuwjAEBAHWL5CtpV6J8j8OU5BW0V0qFxH/YO9Z5b K72g== 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:organization :user-agent:mime-version:content-transfer-encoding; bh=K/i8M6PG1ZysPGjDIignYoCIiD4HbwuppMLf/VGYh6I=; b=LJCSpiwjL08Wpn9ezz1ajcbjQmMtSTxZPJMtF90XQaSDpPqj2oIIkV9tcPvtKkHJ89 IGRx80fXWaju2pTMy54muEl4XeUrSiDE9QptQQMUN33p9vaYLL2w6brSIOf+evOzIc1+ 0wg5ZX6b/cWU/ZPCyeX8V15qlItuKtp2C7QtnrHL6sV2wjio66TG1wbM0gm5PvFTURih obl1vf3jH0UEyx52SdUflxY9NHZrxol+BTnzC7dCjZ/JNV1ghE/ZqIvRRRP0WQ5ujp/u BEEtWKlnh6Rp+MS+CpX+IB4FRPf3eVKmJQNbY9Vgtm43wkJuyprM0tsblMdISRv1z2w3 4aRw== X-Gm-Message-State: AIkVDXK33TR7viJYAu3aPWVr+t6N4mX+O6i28NUN26PYn+fIjCHY74fSsIoCtm3e2o17MQ== X-Received: by 10.25.40.212 with SMTP id o203mr15168656lfo.1.1483045660527; Thu, 29 Dec 2016 13:07:40 -0800 (PST) Received: from wasted.cogentembedded.com ([31.173.84.156]) by smtp.gmail.com with ESMTPSA id j32sm13313575lfi.0.2016.12.29.13.07.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Dec 2016 13:07:39 -0800 (PST) From: Sergei Shtylyov To: netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org Cc: ben.hutchings@codethink.co.uk Subject: [PATCH] sh_eth: fix branch prediction in sh_eth_interrupt() Date: Fri, 30 Dec 2016 00:07:38 +0300 Message-ID: <2810883.6xQhqSTVDe@wasted.cogentembedded.com> Organization: Cogent Embedded Inc. User-Agent: KMail/4.14.10 (Linux/4.8.13-100.fc23.x86_64; KDE/4.14.20; x86_64; ; ) MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org IIUC, likely()/unlikely() should apply to the whole *if* statement's expression, not a part of it -- fix such expression in sh_eth_interrupt() accordingly... Fixes: 283e38db65e7 ("sh_eth: Fix serialisation of interrupt disable with interrupt & NAPI handlers") Signed-off-by: Sergei Shtylyov --- The patch is against DaveM's 'net-next.git' repo; I'm not sure if it should be targeted to the 'net.git' repo instead... drivers/net/ethernet/renesas/sh_eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: net-next/drivers/net/ethernet/renesas/sh_eth.c =================================================================== --- net-next.orig/drivers/net/ethernet/renesas/sh_eth.c +++ net-next/drivers/net/ethernet/renesas/sh_eth.c @@ -1656,7 +1656,7 @@ static irqreturn_t sh_eth_interrupt(int else goto out; - if (!likely(mdp->irq_enabled)) { + if (unlikely(!mdp->irq_enabled)) { sh_eth_write(ndev, 0, EESIPR); goto out; }