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: 9491477 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CE45062AB7 for ; Thu, 29 Dec 2016 21:07:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B303E1FF65 for ; Thu, 29 Dec 2016 21:07:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A7AF720007; Thu, 29 Dec 2016 21:07:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 331441FF65 for ; Thu, 29 Dec 2016 21:07:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750959AbcL2VHn (ORCPT ); Thu, 29 Dec 2016 16:07:43 -0500 Received: from mail-lf0-f48.google.com ([209.85.215.48]:36041 "EHLO mail-lf0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750900AbcL2VHm (ORCPT ); Thu, 29 Dec 2016 16:07:42 -0500 Received: by mail-lf0-f48.google.com with SMTP id t196so227714896lff.3 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=Ef15vVpmR0ptle5mgPx0vaogZwI83fPif50VDNXX0E8stVXPssyivqyU6gpJ765YKl Pz7jOF1/b94odBgsFeF5nAknm1NHbXsDcZO+Ue5A03+O5lcSBEMCUHXYRcyPUoh9AOzY 21CMxM7TnjZs9srqPMCNsMnDnoxcMvi2DvHUC0HiE0QQu0z6ivO2vioMZlMdGFRqb4+H 5ELZjTAnYZpfT9ggNOWJQCaYmTlac5Y56v+mWefzwmMmBmjCQK7i9GWVsB3ubsOIp76i /FXpnVnKcm4fODllbxmQ1p0ndxLGG5onc+j6WNyL59UCgHGpX9b282j0DHxLpUoOptwt IkFg== X-Gm-Message-State: AIkVDXLf0nttwl5xVqI3qN6dQVSs5X20FEOfPFH8akdqHQgQVDMrRNg8EuRhtR2IxJCxAw== 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: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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; }