Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp1306222lqb; Thu, 30 May 2024 06:45:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVK/hCXGVTjJtTQZIsmgdJ9/9J+J4kSbLaK3VK/3T4PsHcK6GrOK85NXfUvWnAl+HxM0WLlb8zBU3IXGfdVk3MGnwNleMgPi13hxBryVw== X-Google-Smtp-Source: AGHT+IGa6t8mQe4xUk+UBaAw10WCZcd6LYno9ggqUzuVXYmdpiQC8qablUrjIXtVsry5zHn6/NPY X-Received: by 2002:a50:935d:0:b0:578:6378:bc4 with SMTP id 4fb4d7f45d1cf-57a177b0a28mr1257401a12.10.1717076748965; Thu, 30 May 2024 06:45:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717076748; cv=pass; d=google.com; s=arc-20160816; b=tCu0EkOJMBFlgF0iZwtrAaf75XxkYqWtgszWq+xndvMKN8y/iu9OZ2DLFOmsEV1n0B PVhh0nmZg1f+99IYqaAjlDPlB31JtHUeHamKVaQPyx2urgfyRYNSrDY6sgELXzNQTU8X CvOeZYO6Ma+M9IrGx+bVA8u/4qF5m6pS8+iMDqyUBWctItoQ7aaUir6HyEtWYre6PUNw 9lSl2FVNZLo03zWU5VZX5tz8A22VoR45ysvUbXAAVFhJZ0cNttX5AO/mKImf+m4k8HoG 3d6I1UQ/DRQMH29KpnTlmCnrs8hi0/wyk4IEgIkuidHW4KVHLAOTFRpwVTSsx4OX+cF4 T28g== 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:organization:references :in-reply-to:message-id:subject:cc:to:from:date:dkim-signature; bh=Iyf593fiF264KxDvYfa2uUVWLRbVv1B2mOqmFHbtPJw=; fh=w6iuc2NGBP6Rpwln5oVUw9IlTy85fribtEi3gQxIFYQ=; b=nyc+wUNrkTygoCQi6MUORf6JLPjOhr/jI0KZD/CWVksdMMRB3A7IY1yLhIycYqdTqW JO7PlXvurreUlTmyNNj79NzN/h+Fr1kz7n4KEp61W9hNpAZDcaTthiY8dNJbEgDqBfb1 G8N7O5jHgQjFR64ToJ5yYguulUdcp/7L6Bg34ITaSTcT3LuyYVIfyWSZW8XUcMcbnxyA cka8tRNJQslKmmitSp8hbBamGFqwS7hhOgFFPZMeFSi8DqFIWBW9PsALsM0m/+aFmQm4 KG02P6vj2du4JlPGo8iBADHnXAMJ2JQqA3r2Hbey9HM5vGJ9hz24Itwuqc3qvnTMzvUR GGXg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=SgfxEis1; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-195437-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195437-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57866c4e5a7si6682880a12.295.2024.05.30.06.45.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 06:45:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-195437-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=SgfxEis1; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-195437-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195437-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id AD9481F22FE4 for ; Thu, 30 May 2024 13:45:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2476A1667D1; Thu, 30 May 2024 13:45:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="SgfxEis1" Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) (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 D39A43D68 for ; Thu, 30 May 2024 13:45:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.197 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717076740; cv=none; b=GuVAXSmL8CFx5Y0wqemB2BHYn0wZivdoZPkvF4G4rou5ItLd0TJ444ADAQ5HUMmAEG+6TfNvRtdhr331CpT9oZW/4TTjIRoRaW9S068LYr3cgYjCdcdDbRBbFLYV3XmkQkTKBnJz1I/G5RIo/x5k2IYgVb1vska30gTeAYlmXgM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717076740; c=relaxed/simple; bh=Iyf593fiF264KxDvYfa2uUVWLRbVv1B2mOqmFHbtPJw=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Zs8YxXFo+Z6EkUSudA2F3Nm/44JM5yJs+oHND15pVNZ9S1jDIgKz9sdq7sIqBSWv9D+r4Ywy5cIOEIyOr7ekKZgh30EfjOPLjpMQKao6ySYWF/T4fOPgZElYEDteEBCPf624oy53mX12BoP0rMWVygNBqjOW0OrriHeoAHA+4gU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=SgfxEis1; arc=none smtp.client-ip=217.70.183.197 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 334651C0009; Thu, 30 May 2024 13:45:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1717076735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Iyf593fiF264KxDvYfa2uUVWLRbVv1B2mOqmFHbtPJw=; b=SgfxEis1K/Yhj7kE3wKEjYarAcY1Pp9MxlNawPpgWayYNmrriLNzSGhXQTKFukmiR30zPs P4Ehg+NAbQMYLTk6TyYDjca/17pD3ZpAGxi77lXshHAVwL9zq5GaC9FRnWPQeWA4aCp9BJ uC5lyChhYNTTEzehRRr3LKDbCEDnJ1LnoOwwBD1bZTHmJHop3PgT6RgEJtb4G69OUYhTd2 ZPws4tMkdwAlPFacMYykdBit3AuO0yJ3flg3fPsWcy5OJzPo3GSRRifJSUSkTXian1Z8Mi xyhsgDVFi/hMY40xVlnX8ClbuLeM60pP5tcKqNilI+TTNFvIVHLdzFgDNM+58w== Date: Thu, 30 May 2024 15:45:26 +0200 From: Miquel Raynal To: "Arnd Bergmann" Cc: "Arnd Bergmann" , "Richard Weinberger" , "Vignesh Raghavendra" , "David Woodhouse" , "Akinobu Mita" , "Artem Bityutskiy" , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mtd: make mtd_test.c a separate module Message-ID: <20240530154526.25c3ae17@xps-13> In-Reply-To: <48738af1-545e-4261-a8b7-fe224071910f@app.fastmail.com> References: <20240529095049.1915393-1-arnd@kernel.org> <20240529141323.7015f3d9@xps-13> <48738af1-545e-4261-a8b7-fe224071910f@app.fastmail.com> Organization: Bootlin X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Sasl: miquel.raynal@bootlin.com Hi Arnd, arnd@arndb.de wrote on Wed, 29 May 2024 14:36:46 +0200: > On Wed, May 29, 2024, at 14:13, Miquel Raynal wrote: > > Hi Arnd, > > > > arnd@kernel.org wrote on Wed, 29 May 2024 11:50:39 +0200: > > =20 > >> From: Arnd Bergmann > >>=20 > >> This file gets linked into nine different modules, which causes a warn= ing: > >>=20 > >> scripts/Makefile.build:236: drivers/mtd/tests/Makefile: mtd_test.o is = added to multiple modules: mtd_nandbiterrs mtd_oobtest mtd_pagetest mtd_rea= dtest mtd_speedtest mtd_stresstest mtd_subpagetest mtd_torturetest =20 > > > > I've never experienced this warning myself, how did you produce it? =20 >=20 > This warning is currently enabled when building with 'make W=3D1', Ok. I didn't pay attention. > but there are only a handful of drivers that run into it, so > I have sent patches for each one, with the plan to enable it > by default in the future. >=20 > >> Make it a separate module instead. =20 > > > > I'm not a total fan of this just because it now requires an additional > > step to insert these test modules (they are likely used for > > debugging/development purposes, so not properly installed in the > > rootfs). Is there any chance we can find another way? =20 >=20 > This should only be a problem when using plain 'insmod' instead > of 'modprobe' for loading the modules. Do you think this is > commonly used here? These test modules have been slowly deprecated in favor of the user space tools but when I had to use them, I was often using an initramfs with the modules just copy/pasted and inserted with insmod. There is no real point I guess in embedding these modules in a final rootfs. > Another option would be to turn all the helper functions into > static inline versions and just include the header, but > that does not avoid the duplication then. Indeed.=20 Is there any chance to just silence the warning by flagging these modules as "test" or "development" modules? Because TBH it feels like the warning is just useless in this case. These modules should not be enabled in a production environment anyway. If not, then let's just keep your current patch. As I said, these modules are kind of deprecated anyway. Thanks, Miqu=C3=A8l