Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1221064rwb; Thu, 11 Aug 2022 18:57:27 -0700 (PDT) X-Google-Smtp-Source: AA6agR5DK80lpJhtn1WzTKLCKFWHzn0O1aWqKQ5usEDDaUlOCMlJSI/gFkQz3lRrWxi93mlUUWE3 X-Received: by 2002:a17:903:264f:b0:16f:8435:d9a8 with SMTP id je15-20020a170903264f00b0016f8435d9a8mr1875478plb.112.1660269446995; Thu, 11 Aug 2022 18:57:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660269446; cv=none; d=google.com; s=arc-20160816; b=QuIZwzICXC/av3ox3dU/IeSoIGFj4/TnOtb+OJ4zukIijfInysdALWvyZ5xN6gnVQB AT2kLzd2DsAORoTfmQbsmMjViAw7pf5H3WtE1zoxGtj5i31qgD+F5+/owCnJ7b+BADHz 1PqUQscNyECAc5phW/wrGQJJI8qQx/lVSlQSmTc6o3S1qpX8PDC/JftrbqiYps4nCEta P8EGWTZGt3xarTGAmET6HmqnARoa75u0WBiMun6HPWasqajXDYafwzvGEmiubUTqUkEp mpW4thX+y942m/KEOUAxIEsiF17MfF0zlbdb4sG/aY3dyN4mGrUGTmhLla/RUyoCvWe5 qpPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=zYHWnjG5f9cGk5a0G2VGJ5CWHe6pW3iDX9OYGPwLZng=; b=g3OESy8m866rcjm1FZySK2EP5kH2NZMn/Div7nuESbMJ7V4IOqUqjgtmwARYUgJCiA XQWx/RUBkYKIpWEvT8aNVSw89Ot/rjqEyPmWjyoEkUOja18MnMCbPiMItUAotd/4U7PS u2ldbNhnuiM4KoSGC4wafqNu/eOZWgR4w7JyrsMGh84DYCBOOLSIxpeSyP6dp39+GDPR 4q/2NXGRhNKGE8+nrKwQur1Mczlhvv1SmV+05/ttQcpkLUJmxegK+2Be3Z3N7RdoPlV8 wfDCMWjx7mtFNk4f8y4//KceuqYm844WqA1+EidjWdwxMmIcKrrpRdC5McCt+LHXpd/B e7rQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=c9lpFMEF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l13-20020a056a0016cd00b0052d63e9864esi1007079pfc.349.2022.08.11.18.57.12; Thu, 11 Aug 2022 18:57:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=c9lpFMEF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236470AbiHLBuZ (ORCPT + 99 others); Thu, 11 Aug 2022 21:50:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229516AbiHLBuY (ORCPT ); Thu, 11 Aug 2022 21:50:24 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C48CE0E8 for ; Thu, 11 Aug 2022 18:50:22 -0700 (PDT) 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 ams.source.kernel.org (Postfix) with ESMTPS id 9FC42B8224C for ; Fri, 12 Aug 2022 01:50:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C17C3C433C1; Fri, 12 Aug 2022 01:50:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1660269020; bh=9Gj1fVPo/TfV2UndXuyWK4XY3oW/T50N15LkHtMwRko=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=c9lpFMEFdPFB4OL4LCtMIBVOOLaAlrM9in8lyM8qbZ5cQDmtOWosi1IgNP+owfjl6 8ennE8/ac5BDgAtillJwQvrXmUNqD81EMT+N/O6dgRfgOliFkO8euiLWYOkAhcejGN XR5HeKxoejkuv8mQSefdUFU7eWf+Q77RQycL3+yr7Lzi+ZLdMS0vRM9Zlb4XVM/myU LAL8cnD+iFCjYQ+iMVA9Jc+CI4x6NmDdQoMo3QjNsjoqghH8qLPFaPEknPVbQ/ya9+ gLrSjWcVPn3EgnXfjrMtzeKzVARt9FrFry77oUTxqHMtZgKgqnoDzS1e9GVwDSmBPI o6L2iMjohrSEg== From: SeongJae Park To: Zeng Jingxiang Cc: sj@kernel.org, akpm@linux-foundation.org, damon@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Zeng Jingxiang Subject: Re: [PATCH] mm/damon: remove dead code in damon_lru_sort_enabled_store() Date: Fri, 12 Aug 2022 01:50:18 +0000 Message-Id: <20220812015018.115955-1-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220812012459.481215-1-zengjx95@gmail.com> References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Hi Zeng, On Fri, 12 Aug 2022 09:24:59 +0800 Zeng Jingxiang wrote: > From: Zeng Jingxiang > > The variable damon_lru_sort_initialized is always true, causing the > corresponding conditional expression cannot be executed. > > Assigning true to damon_lru_sort_initialized here > 544 damon_lru_sort_initialized = true; Before the assignment, the variable is set 'false'. > > The value of damon_lru_sort_initialized is always true. > As a result, the following expression cannot be executed. > > 463 if (!damon_lru_sort_initialized) > 464 return rc; If this code is executed before the assignment, the expression can be executed. Actually, there was a bug due to the absence of the variable. You may refer to that for the detail: https://lore.kernel.org/damon/20220604192222.1488-1-sj@kernel.org/T/#t Thanks, SJ [...]