Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2827789imu; Sun, 23 Dec 2018 08:41:14 -0800 (PST) X-Google-Smtp-Source: AFSGD/XBx1j5A7QGopFvHryz8aOF2mYlH5EZtY7qG+knc+PDiw671cnk4MgpgNYRZAxmm+T0yH0x X-Received: by 2002:a62:4bcf:: with SMTP id d76mr10701185pfj.170.1545583274603; Sun, 23 Dec 2018 08:41:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545583274; cv=none; d=google.com; s=arc-20160816; b=nGz6fseM74WpFkrW1JYD74NGQqaj/WhY9kurTLApptLAsm3YkQbfoI5d/i5dNuQq9I TusOQbnwfUXm4bb5pW3+Mv8ebnFw3aVEuIYYj58uaBOy6bonnlS4yyyenIHSrx1AOfp7 jesv5QzNEFjI4EyoOGPX7nGnIxNPMDXYCg1Rf6OsE6Q5WgIaEVkrNR92O8ILLb3+ypAD T+m+NY6UGQhRTn8cLgOMsHqn8bMsaD1xJa1LkPX62faEYJSmNc9UuwoOnNH9bJ4Ow3U7 oIo7OeQzauyjDHN3/S6tX2NCn/p+HLx9XEED31ltQy4Nmt7YAzmrmy837B/Tc6EModbm TV8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=AKTBFqgkZILG0UhMRmhJ8p424AucEvk2MUXOZESMmXo=; b=JvcNKZU4L3NbLBZRjg7kILM43NuaFoFKeL+yN9CgW3aXuPDo6S6BFtqn7iBAhrp5aP 3bTsUw4EAFKXI92+iQ+H9/Ci3jC9s18pdLAgWaNkFP+GUs4k3uhQ+ZzZtFo0YYobpaXM d0tNKG1Y0/0gGAxk9cZI5zXywwyQXLooEQGp32PZK/OBnFd46z40yw4BLi71EYwYZPys dFUKYV/kNk0dGv1skv3renFbJmwIkveNDPOvxIOak67IprAwDZJLzixYNFOJgAPGyDdf VNbSWbgOehcl9eLNcjROmBGniSo/IIn/HYRsN/2LF4np/vdo0FeSG2tKHM/ovtsbpBWn nqFg== 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 f124si27492873pfa.1.2018.12.23.08.40.59; Sun, 23 Dec 2018 08:41:14 -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 S1727486AbeLWJeQ (ORCPT + 99 others); Sun, 23 Dec 2018 04:34:16 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:44311 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727411AbeLWJeI (ORCPT ); Sun, 23 Dec 2018 04:34:08 -0500 X-IronPort-AV: E=Sophos;i="5.56,386,1539640800"; d="scan'208";a="289991784" Received: from palace.lip6.fr ([132.227.105.202]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/AES128-SHA256; 23 Dec 2018 10:33:55 +0100 From: Julia Lawall To: Tariq Toukan Cc: kernel-janitors@vger.kernel.org, "David S. Miller" , netdev@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 19/20] net/mlx4_core: drop useless LIST_HEAD Date: Sun, 23 Dec 2018 09:57:14 +0100 Message-Id: <1545555435-24576-20-git-send-email-Julia.Lawall@lip6.fr> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1545555435-24576-1-git-send-email-Julia.Lawall@lip6.fr> References: <1545555435-24576-1-git-send-email-Julia.Lawall@lip6.fr> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Drop LIST_HEAD where the variable it declares has never been used. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier x; @@ - LIST_HEAD(x); ... when != x // Fixes: c82e9aa0a8bc ("mlx4_core: resource tracking for HCA resources used by guests") Signed-off-by: Julia Lawall --- Successfully 0-day tested on 151 configurations. drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c index 31bd56727022..eb13d3618162 100644 --- a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c +++ b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c @@ -4729,7 +4729,6 @@ static void rem_slave_srqs(struct mlx4_dev *dev, int slave) struct res_srq *tmp; int state; u64 in_param; - LIST_HEAD(tlist); int srqn; int err; @@ -4795,7 +4794,6 @@ static void rem_slave_cqs(struct mlx4_dev *dev, int slave) struct res_cq *tmp; int state; u64 in_param; - LIST_HEAD(tlist); int cqn; int err; @@ -4858,7 +4856,6 @@ static void rem_slave_mrs(struct mlx4_dev *dev, int slave) struct res_mpt *tmp; int state; u64 in_param; - LIST_HEAD(tlist); int mptn; int err; @@ -4926,7 +4923,6 @@ static void rem_slave_mtts(struct mlx4_dev *dev, int slave) struct res_mtt *mtt; struct res_mtt *tmp; int state; - LIST_HEAD(tlist); int base; int err; @@ -5115,7 +5111,6 @@ static void rem_slave_eqs(struct mlx4_dev *dev, int slave) struct res_eq *tmp; int err; int state; - LIST_HEAD(tlist); int eqn; err = move_all_busy(dev, slave, RES_EQ);