Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp519430lqb; Wed, 29 May 2024 02:52:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW3teHvRaaTCuiUM1hxdNZu0nYJCf3aELhzI3ti2erU1oYH2/cNjHJUBVT9nH594LxrdsdA/pY4VdYGuJAJWi3kpd4mlEVltYDENJ1FyQ== X-Google-Smtp-Source: AGHT+IGMtCUr6XcBvprSGSqSEKUfdvk5imi4BfRg2YL2ETY547zZ2BHmNKmbK4yi5hlZDkq8DAR0 X-Received: by 2002:a17:90b:120e:b0:2bd:ebd5:8bf5 with SMTP id 98e67ed59e1d1-2bf5f207c7cmr12578777a91.32.1716976373669; Wed, 29 May 2024 02:52:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716976373; cv=pass; d=google.com; s=arc-20160816; b=sddQ54IgB4oxxNPDklLbIzxZhHUfSS64+SAWD4D796z0QEDP6vl997LFNR8PHocOGX ze25GEZ4tk+GaPzVmx/u3wbVBnimlpkIEh/UgCxC9OYFkCB3734n+MNQOtYBv2fcAumP c6fwVv+REf4SL0+Lg8VjBU1QjN7T9cvB82oWmYwqOdqE/ae3Gbg50uvhjgV9AWOKAdIy Y2V/BMn/TjssjqvXaQDZ+J6mFkDHQo+bjcp3dAJl18BPiIPavPUAtMkQIBP9xZqIvhyT yfucOgpLuRsKF3KuBrue7tpYVB6NPKpBC1frSaQrGP2f1jZwacDzYrkJ04nyfd8xO1Zi xRyg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=aEG/IPfABO2Nakvv3NfHjrUBp2dDil2CkkNkT+97hOU=; fh=erzJrZH0kpsq4wMR+4IGRlKT9XBd4PVA3E1WTn0q71Y=; b=naivSDLNBH9MOPiLVeB6nUYMHTIaeBmAkFX7H5YYMinfHFg+gyaZmYRcnuuD1nBZCA mLtypK3r32TTXw7NMjFyMxByP0PTIvOgFAkoTxjkdRZBysab7DJC5RWQShXYb9u0rP/0 9mqZrppxr0Vk0O6su3q8+iXTOO6370rFewNOZuKsfWyJRceVWbfidYodGi1Wrq3K80lK YodY7T6Lv9mwCbXhLSXiBxUyxdk1iZQkqVMePTUxDz879wcYqSirlQuDGIdA+LLsibo8 6RE8SaTJZ2dpr8erxkLUkMJ4AteN+8UOLwAMksl9XWPx+S9LEyanPNmQ+++JeUTj26J1 RNWA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lctE4Bh1; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-193889-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193889-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2bf5fe3478esi9877058a91.117.2024.05.29.02.52.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 02:52:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-193889-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lctE4Bh1; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-193889-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193889-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 38D32288793 for ; Wed, 29 May 2024 09:51:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2D364178360; Wed, 29 May 2024 09:50:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="lctE4Bh1" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5460216EC0C for ; Wed, 29 May 2024 09:50:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716976256; cv=none; b=TRcMombyQjDmOB/GyCIthlUHqoIz8uv66rHR4u9n8JPnxQmKUhtBsnUTgzZKt0HqUJw/loSNMK5gGe4gVrgsecEyMbX7ooDgKRCOUZ7Qqm1O08fIa4O7jAM/Px/5oj/GucWl6fx0Gravd3uIhd5Vh4VpbqvnnQ+TTPcKSCyCzOk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716976256; c=relaxed/simple; bh=ZVR3E9jt+JeuDy6+irGL6vYnObXajj8jRHzDpvRmroI=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=YLn2o+OEXXH9e3PdYzmcTEGjjSK7UrWHi7H3DLYeH9ltq8kidOyPQORWJ5jWzxQY4zrUW4GWW+7BQdrEVpLKEjl1GLFm/paRUjJRdn6mwX7QROAIuCuoOWsaXV/pcaV9GyZLLN3+9haDBeVqrUDBvRiTZtpKsnKoloBnrK+cPpg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=lctE4Bh1; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id CC778C2BD10; Wed, 29 May 2024 09:50:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716976255; bh=ZVR3E9jt+JeuDy6+irGL6vYnObXajj8jRHzDpvRmroI=; h=From:To:Cc:Subject:Date:From; b=lctE4Bh1TGIJCLrkhqlvJnCzezIF4H3ZpbzZ6lBo0Hc+Y2JB9UTuGPUNIK+jRCJpm BUTmu7BkIsMyyoKxru67VB4F/7AouoHSteP6cUE3/xJJvYFZDV/IM6H2TUkjDzKhfx xX4cOE6x8CUFAGhDoNI8NY7/teS/gd2zNJJgWLvVgVGiSt9DGWCSMtjEmf1xVe9cro 53rbOnl2zw4PkjcQlF9A2oSG/1CEOutqPd6pcDC5MMWwpouboOe6xhbhctTQ2QHdfW vPJVxb2msGrDUst4oh4Kw/EF9X4LvEBfkjnZqepCJM4VkNA3h4V/il/Pz96lqhDy6T 8Ln4hVhZHOMrA== From: Arnd Bergmann To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , David Woodhouse , Akinobu Mita , Artem Bityutskiy Cc: Arnd Bergmann , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] mtd: make mtd_test.c a separate module Date: Wed, 29 May 2024 11:50:39 +0200 Message-Id: <20240529095049.1915393-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Arnd Bergmann This file gets linked into nine different modules, which causes a warning: scripts/Makefile.build:236: drivers/mtd/tests/Makefile: mtd_test.o is added to multiple modules: mtd_nandbiterrs mtd_oobtest mtd_pagetest mtd_readtest mtd_speedtest mtd_stresstest mtd_subpagetest mtd_torturetest Make it a separate module instead. Fixes: a995c792280d ("mtd: tests: rename sources in order to link a helper object") Signed-off-by: Arnd Bergmann --- drivers/mtd/tests/Makefile | 34 +++++++++++++++++----------------- drivers/mtd/tests/mtd_test.c | 9 +++++++++ 2 files changed, 26 insertions(+), 17 deletions(-) diff --git a/drivers/mtd/tests/Makefile b/drivers/mtd/tests/Makefile index 5de0378f90db..7dae831ee8b6 100644 --- a/drivers/mtd/tests/Makefile +++ b/drivers/mtd/tests/Makefile @@ -1,19 +1,19 @@ # SPDX-License-Identifier: GPL-2.0 -obj-$(CONFIG_MTD_TESTS) += mtd_oobtest.o -obj-$(CONFIG_MTD_TESTS) += mtd_pagetest.o -obj-$(CONFIG_MTD_TESTS) += mtd_readtest.o -obj-$(CONFIG_MTD_TESTS) += mtd_speedtest.o -obj-$(CONFIG_MTD_TESTS) += mtd_stresstest.o -obj-$(CONFIG_MTD_TESTS) += mtd_subpagetest.o -obj-$(CONFIG_MTD_TESTS) += mtd_torturetest.o -obj-$(CONFIG_MTD_TESTS) += mtd_nandecctest.o -obj-$(CONFIG_MTD_TESTS) += mtd_nandbiterrs.o +obj-$(CONFIG_MTD_TESTS) += mtd_oobtest.o mtd_test.o +obj-$(CONFIG_MTD_TESTS) += mtd_pagetest.o mtd_test.o +obj-$(CONFIG_MTD_TESTS) += mtd_readtest.o mtd_test.o +obj-$(CONFIG_MTD_TESTS) += mtd_speedtest.o mtd_test.o +obj-$(CONFIG_MTD_TESTS) += mtd_stresstest.o mtd_test.o +obj-$(CONFIG_MTD_TESTS) += mtd_subpagetest.o mtd_test.o +obj-$(CONFIG_MTD_TESTS) += mtd_torturetest.o mtd_test.o +obj-$(CONFIG_MTD_TESTS) += mtd_nandecctest.o mtd_test.o +obj-$(CONFIG_MTD_TESTS) += mtd_nandbiterrs.o mtd_test.o -mtd_oobtest-objs := oobtest.o mtd_test.o -mtd_pagetest-objs := pagetest.o mtd_test.o -mtd_readtest-objs := readtest.o mtd_test.o -mtd_speedtest-objs := speedtest.o mtd_test.o -mtd_stresstest-objs := stresstest.o mtd_test.o -mtd_subpagetest-objs := subpagetest.o mtd_test.o -mtd_torturetest-objs := torturetest.o mtd_test.o -mtd_nandbiterrs-objs := nandbiterrs.o mtd_test.o +mtd_oobtest-objs := oobtest.o +mtd_pagetest-objs := pagetest.o +mtd_readtest-objs := readtest.o +mtd_speedtest-objs := speedtest.o +mtd_stresstest-objs := stresstest.o +mtd_subpagetest-objs := subpagetest.o +mtd_torturetest-objs := torturetest.o +mtd_nandbiterrs-objs := nandbiterrs.o diff --git a/drivers/mtd/tests/mtd_test.c b/drivers/mtd/tests/mtd_test.c index c84250beffdc..f391e0300cdc 100644 --- a/drivers/mtd/tests/mtd_test.c +++ b/drivers/mtd/tests/mtd_test.c @@ -25,6 +25,7 @@ int mtdtest_erase_eraseblock(struct mtd_info *mtd, unsigned int ebnum) return 0; } +EXPORT_SYMBOL_GPL(mtdtest_erase_eraseblock); static int is_block_bad(struct mtd_info *mtd, unsigned int ebnum) { @@ -57,6 +58,7 @@ int mtdtest_scan_for_bad_eraseblocks(struct mtd_info *mtd, unsigned char *bbt, return 0; } +EXPORT_SYMBOL_GPL(mtdtest_scan_for_bad_eraseblocks); int mtdtest_erase_good_eraseblocks(struct mtd_info *mtd, unsigned char *bbt, unsigned int eb, int ebcnt) @@ -75,6 +77,7 @@ int mtdtest_erase_good_eraseblocks(struct mtd_info *mtd, unsigned char *bbt, return 0; } +EXPORT_SYMBOL_GPL(mtdtest_erase_good_eraseblocks); int mtdtest_read(struct mtd_info *mtd, loff_t addr, size_t size, void *buf) { @@ -92,6 +95,7 @@ int mtdtest_read(struct mtd_info *mtd, loff_t addr, size_t size, void *buf) return err; } +EXPORT_SYMBOL_GPL(mtdtest_read); int mtdtest_write(struct mtd_info *mtd, loff_t addr, size_t size, const void *buf) @@ -107,3 +111,8 @@ int mtdtest_write(struct mtd_info *mtd, loff_t addr, size_t size, return err; } +EXPORT_SYMBOL_GPL(mtdtest_write); + +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("MTD function test helpers"); +MODULE_AUTHOR("Akinobu Mita"); -- 2.39.2