Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp3469669pxb; Mon, 4 Apr 2022 17:59:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxCY/VVTozDZZVpt/BxWFKISoAiJr3H0WDsJWg+ku3Yv7Dwn7/lGiIHZ0MzvKFNl8rWEDtk X-Received: by 2002:a05:6a00:1146:b0:4c9:ede0:725a with SMTP id b6-20020a056a00114600b004c9ede0725amr890516pfm.35.1649120396189; Mon, 04 Apr 2022 17:59:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649120396; cv=none; d=google.com; s=arc-20160816; b=crze9zc0M/Wq6gh6D5Mpuby7Q1Rc504mr9pdPfD5mdsjqyI8A2DPv9JgKpDnAI7H0O sYCOQkblVPNSnq9gqYLw35VQhNFxr9koGEIm9jVH/tkh2mXj9s9vTxVfNyzVB+YxmXrc d7shug4VzHPxRs2jhZx1VVF6Ejx+0uefQQcKQxZhpzIv42g9TmD/qjppyhbmUtsdLOww nidf5to+dOBcDaXOO5aqAbWu3mxFhZjvxXtC2WomMZEt+UiwbdLF21XGW20uRS5U8Ct7 wosCWlpOVYXOK5cbBVdrV20qhaRJ0DnVwAVxrCZSj9fhV+MjBKwVUPy9vPelIDKDKDT3 7pbQ== 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=42+DYObs0d//YPwipHE3d3izqDTdKuFvDHGNlUWoBx4=; b=ABMiqYDov2pmB8WWWPR8l7DSDzVy/msW5d400Enb7iyHc7tkPnkkdB82TsULiomfm9 5ew0ywPaS46Qj2C1PvKJbnHl3mjqyGJnfFi4H0bCZqCtiCaA/LoUh9vVx/j2A+TCH5w2 v2A+f2m387kfqiIZh41QtlgnNSFe4ctTNu8pVvcP+QfiKYLt+HYBBqMuH9sw2hXc9peJ xjD42LzgtxiKK/7Xv0pXFf7rIPzLKW85fgFDeN4vg7lSsDi36jD3s8mIik6LLucn3SsO enLqpZ+mnQ9dUQ+hF6no7jikib0N/0YTYXfzqu0/y//UfuR5vbug0H2XIDwaSINJex1O UoRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=ryB3WQni; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id e7-20020a63aa07000000b003816043f0f1si11638090pgf.742.2022.04.04.17.59.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Apr 2022 17:59:56 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=ryB3WQni; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 75C3214CD0E; Mon, 4 Apr 2022 17:06:44 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1383604AbiDDVdr (ORCPT + 99 others); Mon, 4 Apr 2022 17:33:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379508AbiDDRSy (ORCPT ); Mon, 4 Apr 2022 13:18:54 -0400 Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1AF7814019 for ; Mon, 4 Apr 2022 10:16:58 -0700 (PDT) Received: by mail-lj1-x232.google.com with SMTP id by7so13913144ljb.0 for ; Mon, 04 Apr 2022 10:16:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=42+DYObs0d//YPwipHE3d3izqDTdKuFvDHGNlUWoBx4=; b=ryB3WQniryeQTcsabtEMlk77sINOiDMjNnKxQIAPWIDWkgT2HeYr5YNp6DI6AxlrBR 8fCQ5/lZHreREixoEVspMKO0H9IWt5XPvMwwVhey1g+3nGovFlOSfkDV0fB+9JHSyYww MfOlG9ttuJqR+MT95v3VjjepW6WKMqyiEifEd4jSbTESt3OkiuCI9dtDpTgNAJdCfa52 52rZGeBuik8PbNlp7p70U2xxAl9hUAFZLO3frntLBrwofTgyaMBYv01U5bBe80qh7Dre A5puCYMeYPj9WlgAEVQoKrpAdNhAm82ngof0dDWWwAWwi9Ke06cvxAHP01nxxBjhXxtI /thg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=42+DYObs0d//YPwipHE3d3izqDTdKuFvDHGNlUWoBx4=; b=C/y6XJAAd5hmeIZK5LPpXob1WEX944WHbfhnUhDPxl/VWW0pnjn/QwP5hW1fpm4ZJm aQm+zD7jJP84W7tZY6D/H9wIFKxJCdF4IolhnYzcBOqZHQzQc6edY8OcriPxs8ui52Xr jQ3DdXs3F0AUFSpEyHCkECs4TRm2Qjb4SjJ4OKueBdaWq67RYQPZbUKOLvtR7QAukW13 zy7v4fjmcoFvtziR/caKaoEvwIhGqHsJX6WPuPeKHzmEIaGMOfiUUwZ/KCcrm6qtFEFs 3FzBHgLOoBZD+LCxSnzpIBQTu180Q9KjfmtlyfcMO2cYENv8/c/O01R8OJYLnHIhQ9D6 rqaQ== X-Gm-Message-State: AOAM530kG3Hgcf+vD4wi7no2GhRFAQP3vgUI6AGzOIpTaaC3GjjsBJ1n t5iaLaoXa5ICFYnG+4t4EqlHlLQYtpfxLAvXN7Q5SA== X-Received: by 2002:a05:651c:555:b0:24b:15b7:74ad with SMTP id q21-20020a05651c055500b0024b15b774admr361740ljp.239.1649092616178; Mon, 04 Apr 2022 10:16:56 -0700 (PDT) MIME-Version: 1.0 References: <20220402084746.2413549-1-lv.ruyi@zte.com.cn> In-Reply-To: <20220402084746.2413549-1-lv.ruyi@zte.com.cn> From: Nick Desaulniers Date: Mon, 4 Apr 2022 10:16:44 -0700 Message-ID: Subject: Re: [PATCH] fs/buffer.c: remove unneeded code To: cgel.zte@gmail.com Cc: viro@zeniv.linux.org.uk, nathan@kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Lv Ruyi , Zeal Robot Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Apr 2, 2022 at 1:47 AM wrote: > > From: Lv Ruyi > > fix clang warning: Value stored to 'err' is never read in line 2944. > > Reported-by: Zeal Robot > Signed-off-by: Lv Ruyi The change LGTM, but next time please consider putting the exact text of the warning observed in the commit message. For instance, it's not clear to me whether this was a compiler warning via -W flag, or a DeadStore warning from clang-tidy. Reviewed-by: Nick Desaulniers > --- > fs/buffer.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/fs/buffer.c b/fs/buffer.c > index bfc566de36e5..b2045871e81c 100644 > --- a/fs/buffer.c > +++ b/fs/buffer.c > @@ -2941,7 +2941,6 @@ int block_truncate_page(struct address_space *mapping, > pos += blocksize; > } > > - err = 0; > if (!buffer_mapped(bh)) { > WARN_ON(bh->b_size != blocksize); > err = get_block(inode, iblock, bh, 0); > -- > 2.25.1 > -- Thanks, ~Nick Desaulniers