Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2827913imu; Sun, 23 Dec 2018 08:41:28 -0800 (PST) X-Google-Smtp-Source: ALg8bN7xWevPQs6ADbtUGqUArZ0pRQ0uWulkBAjfjEfXWr8imCU7dF7LZ3YP8LbJh1/69JaNKdy7 X-Received: by 2002:a63:89c2:: with SMTP id v185mr8918236pgd.97.1545583288696; Sun, 23 Dec 2018 08:41:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545583288; cv=none; d=google.com; s=arc-20160816; b=PUcN5THAzI9hrDoZLuv3PSGaqETgMnrvAxOCWKk4T4Btim4fEAtwBV7n39y0xa4JUv mNic1cDhxhBkaAQ+aESTx7CIy6voKY8/Cg9RCWiZP6YDuPhRXm8PcsrlNwx5/g8uqYDN fRJPU2e9oADq+ABPYxfZtkJNTpw+WR0ca2ii3dneFTqapuMPBOX5EdBqMyr88/jroz5r B+sbwyC6pjkGoosJLm5rsMdQKbTSp+i/yEvC41zPrN1Y/te3y1WGC+3bapF7sJXw1fFV SQWdwdAzXv1aOGX0k5n3RhqoI8eF1YIkNnRp0tIpSbaD10OQlQp5ExylNAd5Rm8GeAfE Nb9g== 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=dGqXJcXKDb9rIxWg63gQNPC41cWKOZpJZXRZbqvj2wU=; b=KRH2A8UzrkbP9rtGekX7DrjZgGypSpm4NmifolkLVGuJm2NXr9FIwAEy+X7vWlqfLa 4TaNHJ4VlJj+W+3U+lNl1l64e/sEVP9f76Ym/0U5u/sjiywXp4IHRr7oFHeLeNTPJmi3 Pe7mIhv7MrAMElDdM+zFnozeifVeICXRRtx2WwBKvx8J6qa6IPnCY8/YUMDKAag/hXJ5 MxOvyhOa0sJeuoclVzb+HMgvzjRmy973j45wijfs24XewwekrZcPZZG5SM+pbP+ePy+l XPzfChIfrIrU4O9GEx/ZYCFkPG3Uee/XvSDYShzhX23kdrhk/fUM01vAUw6EzSbyGErn QQeA== 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 r27si26060587pgl.494.2018.12.23.08.41.13; Sun, 23 Dec 2018 08:41:28 -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 S1727589AbeLWJfD (ORCPT + 99 others); Sun, 23 Dec 2018 04:35:03 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:44293 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727328AbeLWJeE (ORCPT ); Sun, 23 Dec 2018 04:34:04 -0500 X-IronPort-AV: E=Sophos;i="5.56,386,1539640800"; d="scan'208";a="289991778" 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:54 +0100 From: Julia Lawall To: Boris Ostrovsky Cc: kernel-janitors@vger.kernel.org, Juergen Gross , Stefano Stabellini , xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org Subject: [PATCH 13/20] xenbus: drop useless LIST_HEAD Date: Sun, 23 Dec 2018 09:57:08 +0100 Message-Id: <1545555435-24576-14-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 is never used. The declarations were introduced with the file, but the declared variables were not used. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier x; @@ - LIST_HEAD(x); ... when != x // Fixes: 1107ba885e46 ("xen: add xenfs to allow usermode <-> Xen interaction") Signed-off-by: Julia Lawall --- Successfully 0-day tested on 151 configurations. drivers/xen/xenbus/xenbus_dev_frontend.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/xen/xenbus/xenbus_dev_frontend.c b/drivers/xen/xenbus/xenbus_dev_frontend.c index c3e201025ef0..25c53545ea01 100644 --- a/drivers/xen/xenbus/xenbus_dev_frontend.c +++ b/drivers/xen/xenbus/xenbus_dev_frontend.c @@ -465,7 +465,6 @@ static int xenbus_write_watch(unsigned msg_type, struct xenbus_file_priv *u) struct watch_adapter *watch; char *path, *token; int err, rc; - LIST_HEAD(staging_q); path = u->u.buffer + sizeof(u->u.msg); token = memchr(path, 0, u->u.msg.len); @@ -523,7 +522,6 @@ static ssize_t xenbus_file_write(struct file *filp, uint32_t msg_type; int rc = len; int ret; - LIST_HEAD(staging_q); /* * We're expecting usermode to be writing properly formed