Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp7272259ybl; Wed, 15 Jan 2020 19:15:42 -0800 (PST) X-Google-Smtp-Source: APXvYqxjAGvtYEUc1NwwsQwb2z9X0CmcBG0AypqqDo69JCuKNZkpL+QBN2A3toOVW2LXYr4BOTsV X-Received: by 2002:a05:6830:160c:: with SMTP id g12mr416189otr.82.1579144542786; Wed, 15 Jan 2020 19:15:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579144542; cv=none; d=google.com; s=arc-20160816; b=XZAKaz5PefGUaqWdBX6/m6Tg/mdhFWw3xcN+/F9TmOSJb7ckGaf7O6DcgfeNhRp9e0 k+Mn2UnVxObMswUtNEAZhE994XgbEOjquqUwhIIKXdxNnOy2VbA3JHvZp8yGjaR23BwT nne3K5J2qmPPz2n+NQ6cLpqFUVOUEblDKVXB/7WBFJy/kDN1O0EoHA+sDlT8vjlN5ica 5e4r62nD/rwSzkr3QSnAF7RXaNjZSID54pZF615mGYeeGfBHaxZAspTA00e8xvgjd0ZA 0nzbi3urWs5LUADDuO62FOPwgF5CnsB1acpK8T8bdOp14UujKG3cJ/8FvfXZXdlKGkS1 Rnww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature; bh=OSH3RXS+T/dhyzgURBl5qLmzt92xc5WKMppdhPS4Q94=; b=ASBVOiGSJY0RXiRpnDASw4eZs13RQpe7nEAgB3GRlScCfpxprw9/O5CiJ974BjX9ql U9gQnBFF+G4TJoHZFrnlqBJcf9/rSnrYblgml6O78N7mZS5nAK/PHAkQr/mHzr0j6scI f4AdYzfzKFK9ZL+uUcB157I3JisRoH8ruDPyHKmaN7UF8GRgXOW9ft7VCjWxO1pRmGZL 4x/xtCUCYZaV0WcydK+5k3yV6bkUqFZfAISz8wP9S8tRWEiLg0O4CIHXoaTC0XjxwW2+ wbffSFyItbSgneIQbhsCAUqmxJCwaD4jobKlMe9FTDDVKiXZGzR7V2KwFEOm0vm8wq3d /lMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=b7DLcl+o; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h139si9496864oib.85.2020.01.15.19.15.31; Wed, 15 Jan 2020 19:15:42 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=b7DLcl+o; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729369AbgAPCwS (ORCPT + 99 others); Wed, 15 Jan 2020 21:52:18 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:45301 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726552AbgAPCwR (ORCPT ); Wed, 15 Jan 2020 21:52:17 -0500 Received: by mail-wr1-f67.google.com with SMTP id j42so17587888wrj.12; Wed, 15 Jan 2020 18:52:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=OSH3RXS+T/dhyzgURBl5qLmzt92xc5WKMppdhPS4Q94=; b=b7DLcl+owfs2QAWAXm37WDQOAc3UWBvxyGPoWQXhPpdrAHFFiKwgcbb3f3lKGMxA0p IvHrQSh/P6XXw3LzQdM2iGIDmKXC0uQXPndJ6Siuquqzrh5n+XQnTdDGde/YoKpKi613 +iAc9QYrFIzxsp/qYoFCtavZJVXr+EWMNfkKP7Q5MhaZyUwzM6OawLb/UITInPhs4Q6S tYwuaQGNUpgmzC8RUHe+nqGht1WyDhz8zI2O8Hl+JOO/lOs5li7PgBiHC3I7olyJx3ZZ 5CP4694GhMD+S2HFhavMB772xOPsI3ah8vomj1yTeCa04bzHlB2n55FU/8N6EC/dhfDm 2ZSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=OSH3RXS+T/dhyzgURBl5qLmzt92xc5WKMppdhPS4Q94=; b=HKfgekQrmNK5DLEm1hzv6rvp2zuEvjiUHni9zTO9Cc/LJVJwUJTf8wqXp4JyAmUhtk NJRlARmkXD7ZMD80IIMVH17f0rr05wYZC8G5qJIDLAl4HcwDTamuUOUQLrG6eF299vbI WTDTgcrh4uFFTEqsO89iunpWkwjLmM67W6hoFnCuACHNF3usbw+K22FcF0DdgM+DPOZ9 OUvy8pRJ4rnV/cOLGgllzfr93+EmDI+RHBLvXq2B2xIH60qfYHGLwhtT58m+OflzTSIb JmRZ5KPIZ5R1w1W/hk8qnP5RMfOXhWhfOnyG9wxSD/jcr+1HX2+EyaLNg67xT9d6y2sP UNFQ== X-Gm-Message-State: APjAAAVepJvwvIjFSOJVASrH+JDwRXrJAmcg/DRnhB+4LwdFE8DdVkLX 2BBLIpt6rEO452ptNpta0SWCKwRt1KTGyQ== X-Received: by 2002:a05:6000:1142:: with SMTP id d2mr464986wrx.253.1579143135637; Wed, 15 Jan 2020 18:52:15 -0800 (PST) Received: from hunterzg-yangtiant6900c-00 ([95.179.219.143]) by smtp.gmail.com with ESMTPSA id u24sm2417624wml.10.2020.01.15.18.52.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Jan 2020 18:52:15 -0800 (PST) Date: Thu, 16 Jan 2020 10:52:04 +0800 From: Gen Zhang To: davem@davemloft.net, tglx@linutronix.de, alexios.zavras@intel.com, allison@lohutok.net Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] net: nfc: Removing unnecessaey code in nci_open_device() Message-ID: <20200116025204.GA20032@hunterzg-yangtiant6900c-00> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In nci_open_device(), since we already call clear_bit(), so set ndev->flags to 0 is not needed. Signed-off-by: Gen Zhang --- diff --git a/net/nfc/nci/core.c b/net/nfc/nci/core.c index 7cd5248..25dae74 100644 --- a/net/nfc/nci/core.c +++ b/net/nfc/nci/core.c @@ -522,7 +522,6 @@ static int nci_open_device(struct nci_dev *ndev) skb_queue_purge(&ndev->tx_q); ndev->ops->close(ndev); - ndev->flags = 0; } done: