From patchwork Thu Jul 1 01:56:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12353395 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_RED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C9F0AC11F66 for ; Thu, 1 Jul 2021 01:56:09 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 97D8061420 for ; Thu, 1 Jul 2021 01:56:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 97D8061420 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 1F53D8D0274; Wed, 30 Jun 2021 21:56:09 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 157408D024F; Wed, 30 Jun 2021 21:56:09 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 044988D0274; Wed, 30 Jun 2021 21:56:08 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0103.hostedemail.com [216.40.44.103]) by kanga.kvack.org (Postfix) with ESMTP id CFEF98D024F for ; Wed, 30 Jun 2021 21:56:08 -0400 (EDT) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id A08C582E2339 for ; Thu, 1 Jul 2021 01:56:08 +0000 (UTC) X-FDA: 78312353616.24.B962935 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf11.hostedemail.com (Postfix) with ESMTP id 5BA40F0000AD for ; Thu, 1 Jul 2021 01:56:08 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 752F161418; Thu, 1 Jul 2021 01:56:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1625104567; bh=DybbZ8rsYQiFbecc+hyKN7dV0yKfOMcJMQZluXePPoQ=; h=Date:From:To:Subject:In-Reply-To:From; b=Osz/UgAPAOTUiAEE7s488pjtshnkmridjd7icR7wKLKF4V22o0FDyMQCWffxKcYM8 f2ax+qn3iL3AAJtRff+tdQeaHEybIFAcrlQ/b+bxB8Z3HI9NplU8MnrseZsBt7H5mT 7j3vZHuegk68Zvj++PtCFu9Jw4frHjOsDPXZ+yZU= Date: Wed, 30 Jun 2021 18:56:07 -0700 From: Andrew Morton To: akpm@linux-foundation.org, linux-mm@kvack.org, mcroce@microsoft.com, mm-commits@vger.kernel.org, torvalds@linux-foundation.org Subject: [patch 169/192] lib/test_string.c: allow module removal Message-ID: <20210701015607.Irez2ivp1%akpm@linux-foundation.org> In-Reply-To: <20210630184624.9ca1937310b0dd5ce66b30e7@linux-foundation.org> User-Agent: s-nail v14.8.16 Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b="Osz/UgAP"; spf=pass (imf11.hostedemail.com: domain of akpm@linux-foundation.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 5BA40F0000AD X-Stat-Signature: x7qobaxrq1oo8okbwpx8bggzyw78utt7 X-HE-Tag: 1625104568-530459 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Matteo Croce Subject: lib/test_string.c: allow module removal The test_string module can't be removed because it lacks an exit hook. Since there is no reason for it to be permanent, add an empty one to allow module removal. Link: https://lkml.kernel.org/r/20210616234503.28678-1-mcroce@linux.microsoft.com Signed-off-by: Matteo Croce Signed-off-by: Andrew Morton --- lib/test_string.c | 5 +++++ 1 file changed, 5 insertions(+) --- a/lib/test_string.c~lib-test_stringc-allow-mode-removal +++ a/lib/test_string.c @@ -179,6 +179,10 @@ static __init int strnchr_selftest(void) return 0; } +static __exit void string_selftest_remove(void) +{ +} + static __init int string_selftest_init(void) { int test, subtest; @@ -216,4 +220,5 @@ fail: } module_init(string_selftest_init); +module_exit(string_selftest_remove); MODULE_LICENSE("GPL v2");