Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2A0E3C433EF for ; Tue, 4 Jan 2022 01:35:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231830AbiADBfQ (ORCPT ); Mon, 3 Jan 2022 20:35:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230341AbiADBfN (ORCPT ); Mon, 3 Jan 2022 20:35:13 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A93E3C061761; Mon, 3 Jan 2022 17:35:13 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8791F6120F; Tue, 4 Jan 2022 01:35:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DE071C36AED; Tue, 4 Jan 2022 01:35:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1641260112; bh=jSjXqBjp0n3M0467iuHnmlLbpXStWJRejblaGobNiIs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=IYwwHUFghJvSoVYWvIlocLYZwYCMBK1PHR4jw6eDd7a0Sfqq28BZD3cCagf+lBLlP xkxrl/m3w4FGExbwsx1JZ4r396N6D1CRrPikgQ/szOzpBgyTdyb2qZl0zHvEvFNdCg fvWNQcykaKuqqDLZ810uKNGmlx0pwKr7SsYLiFAuQ5LOouqLTpZW1WaBPqYL02BttP fFegm0U3pfC8yTrGx19IqxuKgffqFuxKcDKdKFm1hb0UdW0RpFi1rvuuGv3+DKbhao EFq30a5q3mhQr+vhcoXPiGmzTwAcS1UDpH7g5iitQey52dKsIV3tsWfzaPT2nMeHmJ Vpo4F47FYgelw== Date: Mon, 3 Jan 2022 17:35:11 -0800 From: "Darrick J. Wong" To: Dave Chinner Cc: Jiapeng Chong , linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org, Abaci Robot Subject: Re: [PATCH] net/tls: Remove redundant initialization of mp Message-ID: <20220104013511.GC31583@magnolia> References: <20211231122352.14275-1-jiapeng.chong@linux.alibaba.com> <20220101035716.GF945095@dread.disaster.area> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220101035716.GF945095@dread.disaster.area> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jan 01, 2022 at 02:57:16PM +1100, Dave Chinner wrote: > On Fri, Dec 31, 2021 at 08:23:52PM +0800, Jiapeng Chong wrote: > > mp is being initialized to log->l_mp but this is never read > > as record is overwritten later on. Remove the redundant > > initialization. > > The compiler is not smart enough to just elide the second "mp = > log->l_mp;" assignment? It is, but it would seem, alas, that people with AIs want to waste both our time reviewing trivial (and WRONG!) changes generated by automated tools that duplicate functionality long available in automated tools. It would be /really awesome/ if these people with giant farms of servers could instead turn their attention towards finding deeper functionality bugs and design thinkos in less well tested code paths (like rt and quota) so that Leah and I aren't the only ones... > > Cleans up the following clang-analyzer warning: > > > > fs/xfs/xfs_log_recover.c:3543:20: warning: Value stored to 'mp' during > > its initialization is never read [clang-analyzer-deadcode.DeadStores]. > > > > Reported-by: Abaci Robot > > Signed-off-by: Jiapeng Chong > > --- > > fs/xfs/xfs_log_recover.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c > > index 8ecb9a8567b7..9142efbdc670 100644 > > --- a/fs/xfs/xfs_log_recover.c > > +++ b/fs/xfs/xfs_log_recover.c > > @@ -3540,7 +3540,7 @@ STATIC void > > xlog_recover_check_summary( > > struct xlog *log) > > { > > - struct xfs_mount *mp = log->l_mp; > > + struct xfs_mount *mp; > > struct xfs_perag *pag; > > struct xfs_buf *agfbp; > > struct xfs_buf *agibp; > > You removed the wrong initialisation line. Leave this one here and > remove the standalone one. ...and fix the subject line, this isn't networking code. --D > Cheers, > > Dave. > -- > Dave Chinner > david@fromorbit.com