Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp676139pxb; Mon, 16 Aug 2021 14:57:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwKI3IGCxUaE+7dH9Hk5CTWZDCkeatG0Lui4Mvbh/wQp/NT1Sh5QmCve/CGnGlEfX478kT+ X-Received: by 2002:a05:6e02:1aac:: with SMTP id l12mr95805ilv.150.1629151035772; Mon, 16 Aug 2021 14:57:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629151035; cv=none; d=google.com; s=arc-20160816; b=R4CqXFEBnV/4VWOAdiWCA7WXQLkVn4U45GF1WBXnEQcR2vNa8nAt0lzbFXm7RyVxdt WrOpB4Geibyy+xnnixiawW0raXxv/sg8ukL05JEUMfAlZuZNbnSkPyzBKshevTnKE9TK F1i5dCmug42PNWyFjtlYSmyCt4OUWjf2QU/ge+eYBu8OF/mOEhLV9sAgtdB2drfYz/Uu 5uTg8JSyT7ZOc+L9WG2+bW2Nty22cSfKvp37a4YMboyNBFvGdTggBK5sNZ/D5I+HY0Z5 Et0jKNunLKiqst8ganggCfLwbIqkKLXpiBSjQELAyxc7Vw0n6SVJ2jV5YdYDS2FyyQqr acpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=INSZ2rU66F9gi18DmsqmtRCqv+cghRc4CXBXIsZask4=; b=dulE6aeDj9hS9f6vyb2fFVBDhmXxEa8FZPoxW9AnzkoI+82y3ejKPzp1nCw6n1aCQm +IlDh6Y91JU2U8Bij4DbT2ZYG9LuRm7o/xCvvuLiMomtXHDe4Sp+sdHNazUw20eRHGsC m3ODLc0xvNllxIrxoxEeKXKiNvNsiJE8CgPFVZvVuL+NoZ/gYmDhvMFs4W4WWzBEaATS NLpZvvo17da3hXUsORaIjeP39gR0QdNBEy7oOwroxbYdDysu8mrR8BvykT924k0bBE/+ D4osKv+48s7aWFkK6Li8wkD7H35jrz9Wvz9q0bjR0lCrfCQmNwlowaXkTIkbdRSrnVuX +PWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Gn5ex9v2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y4si221316jas.59.2021.08.16.14.57.04; Mon, 16 Aug 2021 14:57:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Gn5ex9v2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232280AbhHPV45 (ORCPT + 99 others); Mon, 16 Aug 2021 17:56:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232067AbhHPV45 (ORCPT ); Mon, 16 Aug 2021 17:56:57 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14BD7C061764 for ; Mon, 16 Aug 2021 14:56:25 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id c24so37256161lfi.11 for ; Mon, 16 Aug 2021 14:56:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=INSZ2rU66F9gi18DmsqmtRCqv+cghRc4CXBXIsZask4=; b=Gn5ex9v2S3646sbEM7aF/fOdxwaguZ+V2nQywtRGmVOVYZ6c3qlRDJM71uKO1vTJPu y81B09nw2MadMAyYgGWfSLkPbO41LlZageOeRmQHRzelWUqXRnFiNTiqTZpvbWtDnnKC +6qNvDBu8iOhWleTkRlEo/hGpBwMvF+dCuMWUgxnfbtq6kjs5q7L4ZQjWXyZ02ti+pJi rzEdTzJRp4V49opprFPfO4jxIgdY1KUN8Y4uqTlgWgHo67TSorkxSEbI4Kv5YpSPjo1P exFa5ieZJ1NVEuAKz+rbbXPDNZOeGMGmnkzx/l9TA8hw9XAVH10hpZzL0xSGHTAQWYs0 NzAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=INSZ2rU66F9gi18DmsqmtRCqv+cghRc4CXBXIsZask4=; b=cSgKUkP2us3xstKGxdICC2CyhbjxmRssrpMpdmixFgo8FQKl5kdxB+/D20YHXVGLWp PBgis6WHt/MWhiWTlAenv/VU5NPbWSnOOo48Bjlgwdx/8i/9iw6nJRr+J7yDv4bmUltO V8ZiBau+DSLG9QGe8GlNe9gkFiozIKKDWUnkeDCaBoGZjZvTA7IiHbmAWTCF3m+k4aZh JncJGizkcrHBLvjxsfiEcE1/qANagzWxtELhFpa7RTBanksG3JS15gggMxOD5v7GCX1f C8RH7FkF+tIa7sMggnn2iLqqldOxqSm6HM0+wDDDxe/hhhLTC7DmkGM/XTGoRCDTxpbs d4Hw== X-Gm-Message-State: AOAM530AmEOqLIzBPSOyq08Z9qtw4WjoRmdMggUYPSlQjuUNwbawTBeb HciFLz5w5V33Ngc+h4f6fMzvyRgPQe/bCH856dxr1PnI/aP447WH X-Received: by 2002:a19:7603:: with SMTP id c3mr310360lff.543.1629150983095; Mon, 16 Aug 2021 14:56:23 -0700 (PDT) MIME-Version: 1.0 References: <20210816193041.1164125-1-nathan@kernel.org> In-Reply-To: <20210816193041.1164125-1-nathan@kernel.org> From: Nick Desaulniers Date: Mon, 16 Aug 2021 14:56:11 -0700 Message-ID: Subject: Re: [PATCH] fs/ntfs3: Remove unused variable cnt in ntfs_security_init() To: Nathan Chancellor Cc: Konstantin Komarov , ntfs3@lists.linux.dev, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 16, 2021 at 12:30 PM Nathan Chancellor wrote: > > Clang warns: > > fs/ntfs3/fsntfs.c:1874:9: warning: variable 'cnt' set but not used > [-Wunused-but-set-variable] > size_t cnt, off; > ^ > 1 warning generated. > > It is indeed unused so remove it. > > Fixes: 82cae269cfa9 ("fs/ntfs3: Add initialization of super block") I went back to the original patches to see if this was ever used; since v2 (when the ntfs3 driver was split up) it was not. I triple checked the v1 as well. v2: https://lore.kernel.org/lkml/caddbe41eaef4622aab8bac24934eed1@paragon-software.com/ v1: https://dl.paragon-software.com/ntfs3/ntfs3.patch I don't think there's a logic error here. Reviewed-by: Nick Desaulniers > Signed-off-by: Nathan Chancellor > --- > fs/ntfs3/fsntfs.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/fs/ntfs3/fsntfs.c b/fs/ntfs3/fsntfs.c > index 92140050fb6c..c6599c514acf 100644 > --- a/fs/ntfs3/fsntfs.c > +++ b/fs/ntfs3/fsntfs.c > @@ -1871,7 +1871,7 @@ int ntfs_security_init(struct ntfs_sb_info *sbi) > struct ATTRIB *attr; > struct ATTR_LIST_ENTRY *le; > u64 sds_size; > - size_t cnt, off; > + size_t off; > struct NTFS_DE *ne; > struct NTFS_DE_SII *sii_e; > struct ntfs_fnd *fnd_sii = NULL; > @@ -1946,7 +1946,6 @@ int ntfs_security_init(struct ntfs_sb_info *sbi) > sbi->security.next_off = > Quad2Align(sds_size - SecurityDescriptorsBlockSize); > > - cnt = 0; > off = 0; > ne = NULL; > > @@ -1964,8 +1963,6 @@ int ntfs_security_init(struct ntfs_sb_info *sbi) > next_id = le32_to_cpu(sii_e->sec_id) + 1; > if (next_id >= sbi->security.next_id) > sbi->security.next_id = next_id; > - > - cnt += 1; > } > > sbi->security.ni = ni; > > base-commit: 96b18047a7172037ff4206720f4e889670030b41 > -- > 2.33.0.rc2 > > -- > You received this message because you are subscribed to the Google Groups "Clang Built Linux" group. > To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-linux+unsubscribe@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/20210816193041.1164125-1-nathan%40kernel.org. -- Thanks, ~Nick Desaulniers