Received: by 10.223.148.5 with SMTP id 5csp6539762wrq; Wed, 17 Jan 2018 15:12:45 -0800 (PST) X-Google-Smtp-Source: ACJfBovNjpY6u6Hh5KFzLUpSh+ueKPx6JGJggLPFDP0Wl1qbobC+sXA/MLfrGWomiy2PVky5xVVG X-Received: by 10.159.244.3 with SMTP id x3mr44835571plr.192.1516230765297; Wed, 17 Jan 2018 15:12:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516230765; cv=none; d=google.com; s=arc-20160816; b=ITbp7lrVeFl8oWMU3TXNeUGI5k+Xmh3AKrnqZMgVhKmCY+WC4XVzoOCj1taJKnklfh FtSLiRNDEj9zkEYgyOev+qLkolWPFpTRAUVJlgt8qOQ/T5TgHuYrrOd9aiVd7Qra3xmw oqfgJZNHtZqB4MGxubDtHtfomSZzL7eEIk4AhzWvTbxv2JjdrP8AQ0cmfNCYQ4bOu22Z o0f2fQRrx+74Y9jIgTF4ooCbRPR3l2favcc3PHXpb1csAPGbA+89u1IlwvoDA0fBDTH1 /+wZy4h6FSXE0CwAZzLAbhX8vWHm8P9osMGwGh5/wC30ad9EyPu83X7dwfRRHLyVPO2o l+gA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:thread-index:thread-topic :content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:arc-authentication-results; bh=JrcXfoRG7mtivgJWuKOLHAG4Tj2iQIWRFwT2Lcd9Xmg=; b=tyZOnJOI3QZ9rHMhRYwcHetBiXetbrcnqm5oomd6WRN8rAgHrYFm0Vc+gvfEVLbu4+ lxbATMOAsvp8pXFlcpSRx/UKM7hinLHZ3RdYV18HWnqu8w/nl/ncZ9spTWDYgjmuEf5B +CTiLGFO6FA+rWGnUCPZFVIEVlyCCK23ye3DKK5XhrQ7dslNzVUOfv/Yh89c/Y8pES10 C0nA/+fV+rwV+ahQ9H0vtJJ1MJHb06T1WChhHc8Xh8qNy4zjQsRVrvmjp1pnV2d+oQuV KRN+NR3W/MolVyaacR5q3++sV2dep9mhyY1VhNX5BHoV++CrvgG5qHgnTTlXEDbtduqc SdAA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f3si1673882pgp.442.2018.01.17.15.12.30; Wed, 17 Jan 2018 15:12:45 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754087AbeAQXL0 (ORCPT + 99 others); Wed, 17 Jan 2018 18:11:26 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53624 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753087AbeAQXLY (ORCPT ); Wed, 17 Jan 2018 18:11:24 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5668561470; Wed, 17 Jan 2018 23:11:24 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DF70B5D6A8; Wed, 17 Jan 2018 23:11:23 +0000 (UTC) Received: from zmail25.collab.prod.int.phx2.redhat.com (zmail25.collab.prod.int.phx2.redhat.com [10.5.83.31]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 6CD2C18033D8; Wed, 17 Jan 2018 23:11:23 +0000 (UTC) Date: Wed, 17 Jan 2018 18:11:23 -0500 (EST) From: Ronnie Sahlberg To: Colin King Cc: Steve French , linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Message-ID: <2031352942.702941.1516230683335.JavaMail.zimbra@redhat.com> In-Reply-To: <20180117095239.10670-1-colin.king@canonical.com> References: <20180117095239.10670-1-colin.king@canonical.com> Subject: Re: [PATCH] cifs: remove redundant duplicated assignment of pointer 'node' MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [10.64.54.86, 10.4.195.30] Thread-Topic: cifs: remove redundant duplicated assignment of pointer 'node' Thread-Index: 2JtkT6SVdM+Rpe1NK1AqSspjuPs1Pg== X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 17 Jan 2018 23:11:24 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Reviewed-by: Ronnie Sahlberg ----- Original Message ----- From: "Colin King" To: "Steve French" , linux-cifs@vger.kernel.org, samba-technical@lists.samba.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Sent: Wednesday, 17 January, 2018 8:52:39 PM Subject: [PATCH] cifs: remove redundant duplicated assignment of pointer 'node' From: Colin Ian King Node is assigned twice to rb_first(root), first during declaration time and second after a taking a spin lock, so we have a duplicated assignment. Remove the first assignment because it is redundant and also not protected by the spin lock. Cleans up clang warning: fs/cifs/connect.c:4435:18: warning: Value stored to 'node' during its initialization is never read Signed-off-by: Colin Ian King --- fs/cifs/connect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 0efd22e75ac7..63c5d85fe25e 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -4432,7 +4432,7 @@ cifs_prune_tlinks(struct work_struct *work) struct cifs_sb_info *cifs_sb = container_of(work, struct cifs_sb_info, prune_tlinks.work); struct rb_root *root = &cifs_sb->tlink_tree; - struct rb_node *node = rb_first(root); + struct rb_node *node; struct rb_node *tmp; struct tcon_link *tlink; -- 2.15.1 -- To unsubscribe from this list: send the line "unsubscribe linux-cifs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html