From nobody Sun Feb 8 18:48:30 2026 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (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 20C0A3876CA for ; Thu, 29 Jan 2026 12:10:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.171.202.116 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769688604; cv=none; b=oJyYNYAWdn1iPENZ4Kl5nDaRlqUSp2pLiIKl7XHHubXmPn3CCBYdtI4r0lt5H6fH38PPlBlQ3wpxM7WECrRpqZh4a8LqqviowaibZAo1NaFd9S5EuIzv9x8CpkjZhKqCPAKcacrhmkPK2Gq1oN+InlgMZ5qpkd96zALrAuWi20s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769688604; c=relaxed/simple; bh=C8nGqDlEuT0M1u5oFAeIDQz9tzYAxo1EOqYVTohrjvE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=u+ioYykR5e3zqWstkmpuMGQiviwPlRpXeeOM/SdG5GnyQcpsumFdFSfOXnRVvvqcTEY/ASOqmlB0N6Vs0WXOfqF340Ox4IThrIRfMfLuE9av+2qgV9TscEVrgLLf6MSxKCyNf9a3i1z4g78CocKfJlP+urjMaAcoMPR/tBiUnGI= 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=FBClNdAp; arc=none smtp.client-ip=185.171.202.116 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="FBClNdAp" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 0E919C211FE; Thu, 29 Jan 2026 12:09:58 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 1C92F606B6; Thu, 29 Jan 2026 12:09:55 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id DAFCE119A882B; Thu, 29 Jan 2026 13:09:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1769688594; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=N/5zFX37gkLq6zQzP//9Uu1etqb4FGSMMBO3Ww7P5LM=; b=FBClNdApMgGANmMOaVTusO8jUimByyvt1k6XUcAIfX1A25ChtZ6rXNNfBaZnKp5KTx365m 3DztWDl1HLEURJA7P9AsYZFksQB7uJ3pSLcMFPDQYBCz6mmpvevihqYXMGUe+8H2w7ofBJ wuDfPskhmrZiiWhCJSxaCdpRfZiq86XJlh1Z2BNE81Yf1OZuE8KXccMQ5VlXVI0AxA2J/6 I4Xvt3WvF8G2smiuXndE7rF7ksR3Zr7+BgMo/SyenZZS7dLZPhjoYa85ZELjZqYOtYelm2 O1Rhe5ObTqw2LwbKhvn1Ud7AhCf0JZ8eBYRpG3Ot+geXOIudXat6PMkkzywYQw== From: Luca Ceresoli Date: Thu, 29 Jan 2026 13:09:28 +0100 Subject: [PATCH v15 2/3] mtd: Move struct mtd_concat definition to header file 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 Message-Id: <20260129-mtd-virt-concat-v15-2-c56a232efbd2@bootlin.com> References: <20260129-mtd-virt-concat-v15-0-c56a232efbd2@bootlin.com> In-Reply-To: <20260129-mtd-virt-concat-v15-0-c56a232efbd2@bootlin.com> To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Rob Herring , Krzysztof Kozlowski , Conor Dooley , =?utf-8?q?Rafa=C5=82_Mi=C5=82ecki?= Cc: Amit Kumar Mahapatra , Michal Simek , Bernhard Frauendienst , Thomas Petazzoni , linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Luca Ceresoli X-Mailer: b4 0.14.3 X-Last-TLS-Session-Version: TLSv1.3 From: Amit Kumar Mahapatra To enable a more generic approach for concatenating MTD devices, struct mtd_concat should be accessible beyond the mtdconcat driver. Therefore, the definition is being moved to a header file. Signed-off-by: Amit Kumar Mahapatra --- drivers/mtd/mtdconcat.c | 12 ------------ include/linux/mtd/concat.h | 12 ++++++++++++ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/mtd/mtdconcat.c b/drivers/mtd/mtdconcat.c index f56f44aa8625..6f2aaceac669 100644 --- a/drivers/mtd/mtdconcat.c +++ b/drivers/mtd/mtdconcat.c @@ -20,18 +20,6 @@ =20 #include =20 -/* - * Our storage structure: - * Subdev points to an array of pointers to struct mtd_info objects - * which is allocated along with this structure - * - */ -struct mtd_concat { - struct mtd_info mtd; - int num_subdev; - struct mtd_info **subdev; -}; - /* * how to calculate the size required for the above structure, * including the pointer array subdev points to: diff --git a/include/linux/mtd/concat.h b/include/linux/mtd/concat.h index d6f653e07426..b42d9af87c4e 100644 --- a/include/linux/mtd/concat.h +++ b/include/linux/mtd/concat.h @@ -9,6 +9,18 @@ #define MTD_CONCAT_H =20 =20 +/* + * Our storage structure: + * Subdev points to an array of pointers to struct mtd_info objects + * which is allocated along with this structure + * + */ +struct mtd_concat { + struct mtd_info mtd; + int num_subdev; + struct mtd_info **subdev; +}; + struct mtd_info *mtd_concat_create( struct mtd_info *subdev[], /* subdevices to concatenate */ int num_devs, /* number of subdevices */ --=20 2.52.0