Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3315876imu; Sun, 11 Nov 2018 12:12:26 -0800 (PST) X-Google-Smtp-Source: AJdET5dNbChIRX2UCRApMAYKw71ITKEwFMkVCdCCghSu0uAEEcMbIBc4koMcjBKN8RcpfptjKOg/ X-Received: by 2002:a63:9749:: with SMTP id d9mr4702077pgo.415.1541967146070; Sun, 11 Nov 2018 12:12:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541967146; cv=none; d=google.com; s=arc-20160816; b=lUa4mTmnF7o7DFIu/RQo1weu76psmttqmLrBdwOUg387jn+aKHtRv4gX7m4yKXi+oW BpNnnoOdYQba5BYmQ08vc8wcmatjjUlXQ5Y+OW3+V5qDwhiLHmuuttYiLmzHgrqt1eCG vLwIJ+dml/OTDqDilCrp0SWvNHX5nbU6EvuVbWxnFmh+KR4SxdajH6DY4AJVqivc45sl 5d1U9Konn53kZntoqduymtTJN/UoaTxVnv1xjs5QFPjNJKBdTdVgCzr8+Lx8yT1uS7Ke SwE2t8PNkv5WL2fDgkkPUEM3KTcQ0hnp8odFzQtybhbLBDLc86u/Ky6cg5hbIqjJewv7 Co/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition; bh=aTjMS/OjfYd+gwaVQedVGhXcoks41Qdaxudc1ybhYQM=; b=JKmdbhN3tpp1mUzH783/PzARQqWCoWQEu16KkhDfTNp4gyqAGttb4H6F5m3s2B4VFW /NpBoTZlnZG8a0/qXxAQnCxeUUd+4KeXLONyXTk4K77bdaB1dZJXhsuUM1faBuxFWD0n Yp9zzbV+aPpJJctCjaS19Hy3bAN4xEMO906YIUYRa+0y1vFSCwQ279HctS7st+QultBZ WPdqzXThWSbq0YA5XototbDc0rvCtTylJeB8YW1QWOBjiOJuloCuhUJyOi8w48wGYf5i 8o/6hb767JqDZ+fIyKa2QYzVFIy47O1cIFU5CpFUrGI5RRuOsYdJCulU9e2w1iaVVIJC lRgQ== 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 n5-v6si15792986pfb.88.2018.11.11.12.12.11; Sun, 11 Nov 2018 12:12:26 -0800 (PST) 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 S1731688AbeKLGA4 (ORCPT + 99 others); Mon, 12 Nov 2018 01:00:56 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:52488 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730739AbeKLGAz (ORCPT ); Mon, 12 Nov 2018 01:00:55 -0500 Received: from [192.168.4.242] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gLvt3-0000l8-DZ; Sun, 11 Nov 2018 19:59:13 +0000 Received: from ben by deadeye with local (Exim 4.91) (envelope-from ) id 1gLvsR-0001Wm-J4; Sun, 11 Nov 2018 19:58:35 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "David S. Miller" , "Julia Lawall" Date: Sun, 11 Nov 2018 19:49:05 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 123/366] bnx2x: use the right constant In-Reply-To: X-SA-Exim-Connect-IP: 192.168.4.242 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.61-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Julia Lawall commit dd612f18a49b63af8b3a5f572d999bdb197385bc upstream. Nearby code that also tests port suggests that the P0 constant should be used when port is zero. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression e,e1; @@ * e ? e1 : e1 // Fixes: 6c3218c6f7e5 ("bnx2x: Adjust ETS to 578xx") Signed-off-by: Julia Lawall Signed-off-by: David S. Miller Signed-off-by: Ben Hutchings --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c @@ -581,7 +581,7 @@ static void bnx2x_ets_e3b0_nig_disabled( * slots for the highest priority. */ REG_WR(bp, (port) ? NIG_REG_P1_TX_ARB_NUM_STRICT_ARB_SLOTS : - NIG_REG_P1_TX_ARB_NUM_STRICT_ARB_SLOTS, 0x100); + NIG_REG_P0_TX_ARB_NUM_STRICT_ARB_SLOTS, 0x100); /* Mapping between the CREDIT_WEIGHT registers and actual client * numbers */