From patchwork Fri Oct 29 00:50:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Changbin Du X-Patchwork-Id: 12591373 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 85591C433F5 for ; Fri, 29 Oct 2021 00:50:38 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0C137610F8 for ; Fri, 29 Oct 2021 00:50:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0C137610F8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 00508940007; Thu, 28 Oct 2021 20:50:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EF6AA6B0072; Thu, 28 Oct 2021 20:50:36 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D9855940007; Thu, 28 Oct 2021 20:50:36 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0075.hostedemail.com [216.40.44.75]) by kanga.kvack.org (Postfix) with ESMTP id B2D876B0071 for ; Thu, 28 Oct 2021 20:50:36 -0400 (EDT) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 3FC9E18077354 for ; Fri, 29 Oct 2021 00:50:36 +0000 (UTC) X-FDA: 78747644472.08.48CD49F Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) by imf30.hostedemail.com (Postfix) with ESMTP id 85595E001980 for ; Fri, 29 Oct 2021 00:50:24 +0000 (UTC) Received: by mail-wr1-f51.google.com with SMTP id v17so13237441wrv.9 for ; Thu, 28 Oct 2021 17:50:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Z8g4RDYLQyNG9ZMdk4Hxtngf0/pIGQ9iK+1OvmNdSMc=; b=G45gcvq3QfMGeRiWkPge0w/mwzWzpth8eKoJidXiK5znoWHiDJ1tXdugyMFkuWAHzD 4rhqVcEHHV9yU7+gNA6/RCu/fYL4ZKVdQT3cKdZYXxp9jjgZSRNr0ylPwEtkxb8fRIit Bh4rfalOtqadeovwDwzbspQ+s19J9vvLSiqS99Y5y0j/S7Qpvca4GN3V+sBCKpt965mN l2Qe0ioslACo+xtQcXohCS8NgBLd4gWy0jnwOGo9h42K9tfSjt/Dxlk5cKJ5HLYLXLvz GmXMZ+Ze6b3dq791idwF48/VJABvanQtrSaHFUAcHC0neeJKn84vlfXdXzPwxXQqi+oa S+rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Z8g4RDYLQyNG9ZMdk4Hxtngf0/pIGQ9iK+1OvmNdSMc=; b=7JIv3zY1fmOytKOByTswX1yAoRGZtc18SRBCmBaJJKqv7ny1FotZFa7K4oT97acRZZ xXNHaFbIMMS6q5Q/jD6lviXSiG/7RkmKKO1hO8x2S8PqVGEKcYdPqCOnh2JMGZ29SRDH 9cHuBBcU8pZc1cSifqX6Qjd5iJtCKwyVQTis6MZEXmGrIBb2KRas6oNN5zqHUpcgqOnk qieD+yPRkXOl9TtUy9yFO4aW2bhRvz5cQ8MZYUrEHgM5nLgKF60HmG8wyKZWzpN2aUgo aei/jCIHtQUZPN46/ZI7BYC7A2ZFgm5SMZnIvbYHKr9DtqPPNsCoUymhlF1TmcNK1cB4 MMVw== X-Gm-Message-State: AOAM533+HtNkxUfgNjzd2hJryraxzEQy0TqVlXcr2Fp06XcFASZPHgmC ONKUEdgSGs9hp6X6Rfw1ebc= X-Google-Smtp-Source: ABdhPJz/8n9hRbO3LFoNr2azmoC5Czn1zUla10qtFxjleUJ8Nb25eg0mWHiViK1cUpdzV2FiExEeXQ== X-Received: by 2002:adf:f486:: with SMTP id l6mr9958940wro.375.1635468634633; Thu, 28 Oct 2021 17:50:34 -0700 (PDT) Received: from WRT-WX9.. ([95.179.207.30]) by smtp.gmail.com with ESMTPSA id o2sm4500852wrg.1.2021.10.28.17.50.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Oct 2021 17:50:34 -0700 (PDT) From: Changbin Du To: Andrew Morton Cc: SeongJae Park , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Changbin Du Subject: [PATCH] mm/damon: remove return value from before_terminate callback Date: Fri, 29 Oct 2021 08:50:23 +0800 Message-Id: <20211029005023.8895-1-changbin.du@gmail.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 85595E001980 X-Stat-Signature: ybfm7wr7of733eum55f68fynhuos65m8 Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=G45gcvq3; spf=pass (imf30.hostedemail.com: domain of changbin.du@gmail.com designates 209.85.221.51 as permitted sender) smtp.mailfrom=changbin.du@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-HE-Tag: 1635468624-173767 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000006, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Since the return value of 'before_terminate' callback is never used, we make it have no return value. Signed-off-by: Changbin Du Reviewed-by: SeongJae Park --- include/linux/damon.h | 2 +- mm/damon/dbgfs.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/include/linux/damon.h b/include/linux/damon.h index 50c6eb0dee1f..041966786270 100644 --- a/include/linux/damon.h +++ b/include/linux/damon.h @@ -322,7 +322,7 @@ struct damon_callback { int (*before_start)(struct damon_ctx *context); int (*after_sampling)(struct damon_ctx *context); int (*after_aggregation)(struct damon_ctx *context); - int (*before_terminate)(struct damon_ctx *context); + void (*before_terminate)(struct damon_ctx *context); }; /** diff --git a/mm/damon/dbgfs.c b/mm/damon/dbgfs.c index befb27a29aab..eccc14b34901 100644 --- a/mm/damon/dbgfs.c +++ b/mm/damon/dbgfs.c @@ -645,18 +645,17 @@ static void dbgfs_fill_ctx_dir(struct dentry *dir, struct damon_ctx *ctx) debugfs_create_file(file_names[i], 0600, dir, ctx, fops[i]); } -static int dbgfs_before_terminate(struct damon_ctx *ctx) +static void dbgfs_before_terminate(struct damon_ctx *ctx) { struct damon_target *t, *next; if (!targetid_is_pid(ctx)) - return 0; + return; damon_for_each_target_safe(t, next, ctx) { put_pid((struct pid *)t->id); damon_destroy_target(t); } - return 0; } static struct damon_ctx *dbgfs_new_ctx(void)