Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3334851imu; Sun, 11 Nov 2018 12:37:19 -0800 (PST) X-Google-Smtp-Source: AJdET5cbyNhFj1yuRThX526OxRsiwoaxY8dDXpym8Pb0KaCdcTyN1oa2YKDAYpaYlvrt9KM27bx2 X-Received: by 2002:a17:902:5e4:: with SMTP id f91-v6mr4253692plf.75.1541968639668; Sun, 11 Nov 2018 12:37:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541968639; cv=none; d=google.com; s=arc-20160816; b=0z/5eZpYUzXnwkdckvLA0+mURQElTw0BEmpQ+mhA8OFOIaCngqf6pKrL/55kFTGFYv FAKVJ1u7kP6GoxBldVw6xeXqF96oH/vK+duHnrETFiNM0y6R2oJjCIEtKIHr8Yx1jxiq gU0pmy+AQ/99j7WPQeq1mc2Kz4An3cnCQsw67a14+mhSm2QwVcCGQlVYCDKm+FPTkXZx dL2aS4cgwvq7DR3jrbqwuAjFe+sy1bcKK0uUv/tlHNlStSqfsqrzNtBzF44OX6VToCT+ IkVPcO4AEDlsK/Kpbfy5ZqUNDQsDKCSFiV1fWdH6BJTE/l38Jyr5T0pwJlEgK1NvvnaJ J1eg== 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=UOZRaawsFr9BKUpwbqcwtuWUrVk/USPDPJx/x7bW+l4=; b=T0gD5UPS4rVfV5rzTvmeBw0EyW4Yy2ONoyBE/h/a5/HB+GpTdpQgq+f2PXLAtFVXmY yv+TVG+e3ReI/EmC4GJEJ/j9eClEks4hZ/ZylrpQbTaSa9OPTXY3GjI6dLj42GWzSR6k 11qqQqtS7r+Q1cwlvygSzZfhTinp2v0rJNl71WZ8/DKkvXtp/t+8MIFtaa/5uYOImaEu JsJgdzPq1sGQ5HMriefmRIskxU7QLQHi2yZ/QgnV9o5MsIggXqzdt+AKlYEWxsdOI6c1 f/sTp9+mIGBQrM/t2MCKkYavECmMOQjy6pAGECXbqdIzjwRQjtJYnTy+j8/FOc1mMSAU /odw== 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 q13si14490178pgj.86.2018.11.11.12.37.04; Sun, 11 Nov 2018 12:37:19 -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 S1730131AbeKLFsL (ORCPT + 99 others); Mon, 12 Nov 2018 00:48:11 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:49698 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729976AbeKLFsK (ORCPT ); Mon, 12 Nov 2018 00:48:10 -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 1gLvsW-0000lF-Cf; Sun, 11 Nov 2018 19:58:40 +0000 Received: from ben by deadeye with local (Exim 4.91) (envelope-from ) id 1gLvsT-0001b8-74; Sun, 11 Nov 2018 19:58:37 +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, "Li, Liang Z" , "David Vrabel" , "David S. Miller" Date: Sun, 11 Nov 2018 19:49:05 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 168/366] xen-netfront: Remove the meaningless code 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: "Li, Liang Z" commit 905726c1c5a3ca620ba7d73c78eddfb91de5ce28 upstream. The function netif_set_real_num_tx_queues() will return -EINVAL if the second parameter < 1, so call this function with the second parameter set to 0 is meaningless. Signed-off-by: Liang Li Reviewed-by: David Vrabel Signed-off-by: David S. Miller Signed-off-by: Ben Hutchings --- drivers/net/xen-netfront.c | 7 ------- 1 file changed, 7 deletions(-) --- a/drivers/net/xen-netfront.c +++ b/drivers/net/xen-netfront.c @@ -1330,10 +1330,6 @@ static struct net_device *xennet_create_ np = netdev_priv(netdev); np->xbdev = dev; - /* No need to use rtnl_lock() before the call below as it - * happens before register_netdev(). - */ - netif_set_real_num_tx_queues(netdev, 0); np->queues = NULL; err = -ENOMEM; @@ -1992,9 +1988,6 @@ abort_transaction_no_dev_fatal: xennet_disconnect_backend(info); kfree(info->queues); info->queues = NULL; - rtnl_lock(); - netif_set_real_num_tx_queues(info->netdev, 0); - rtnl_unlock(); out: return err; }