From nobody Wed Dec 17 10:42:39 2025 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 40401EE49A3 for ; Tue, 22 Aug 2023 07:12:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233528AbjHVHM2 (ORCPT ); Tue, 22 Aug 2023 03:12:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233437AbjHVHL5 (ORCPT ); Tue, 22 Aug 2023 03:11:57 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DAC6ACDB for ; Tue, 22 Aug 2023 00:11:26 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7384664D76 for ; Tue, 22 Aug 2023 07:10:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2BD0AC433C7; Tue, 22 Aug 2023 07:10:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692688257; bh=EvjRtRToKltCM0ftw1A20Yl2JRY0BCZyEmk1F0c80Pg=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Xx5aL6u9pJIOguYJ8YSi5Lt2xYJaDiKJ3V7rMtNtMo7/wqgN3F9U8HtwieeVmoz67 O3N+4wGX3gh7YtdYeya/CrVs5wr7302fgHGZykHIWXaL01G15VSQl1QN/t4PP2p1Pv BAd43SOB9ndpRrmzkg7oHPjsUla9bfhBfNJwilNLwuv+PZT4EDt5ZPbPA0Teq4EVf+ bLUI8PPMBSjqrhVcByg4gUjqyxBPWTfEi8YDq0wX3ORk5BYjQPMQYIfrJUdcgQ+pSX uNGI2PP1uyKtoSOJnd23eaXd6232DAKd3tu2I+bxdPNr/aS9GUCn5XYd8xIzWSYkzc OmEtFhSlwgH3w== From: Michael Walle Date: Tue, 22 Aug 2023 09:09:57 +0200 Subject: [PATCH v2 41/41] mtd: spi-nor: core: get rid of the INFOx() macros MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20230807-mtd-flash-info-db-rework-v2-41-291a0f39f8d8@kernel.org> References: <20230807-mtd-flash-info-db-rework-v2-0-291a0f39f8d8@kernel.org> In-Reply-To: <20230807-mtd-flash-info-db-rework-v2-0-291a0f39f8d8@kernel.org> To: Tudor Ambarus , Pratyush Yadav , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra Cc: linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, Michael Walle X-Mailer: b4 0.12.2 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now that all flash_info tables are converted to the new format, remove the old INFOx() macros. Signed-off-by: Michael Walle Reviewed-by: Tudor Ambarus --- drivers/mtd/spi-nor/core.h | 65 ------------------------------------------= ---- 1 file changed, 65 deletions(-) diff --git a/drivers/mtd/spi-nor/core.h b/drivers/mtd/spi-nor/core.h index 420e5ca2cfe1..1febb4a3c59b 100644 --- a/drivers/mtd/spi-nor/core.h +++ b/drivers/mtd/spi-nor/core.h @@ -573,71 +573,6 @@ struct flash_info { .n_regions =3D (_n_regions), \ }) =20 -#define SPI_NOR_ID_2ITEMS(_id) ((_id) >> 8) & 0xff, (_id) & 0xff -#define SPI_NOR_ID_3ITEMS(_id) ((_id) >> 16) & 0xff, SPI_NOR_ID_2ITEMS(_id) - -#define SPI_NOR_ID(_jedec_id, _ext_id) \ - .id =3D &(const struct spi_nor_id){ \ - .bytes =3D (const u8[]){ SPI_NOR_ID_3ITEMS(_jedec_id), \ - SPI_NOR_ID_2ITEMS(_ext_id) }, \ - .len =3D !(_jedec_id) ? 0 : (3 + ((_ext_id) ? 2 : 0)), \ - } - -#define SPI_NOR_ID6(_jedec_id, _ext_id) \ - .id =3D &(const struct spi_nor_id){ \ - .bytes =3D (const u8[]){ SPI_NOR_ID_3ITEMS(_jedec_id), \ - SPI_NOR_ID_3ITEMS(_ext_id) }, \ - .len =3D 6, \ - } - -#define SPI_NOR_GEOMETRY(_sector_size, _n_sectors, _n_banks) \ - .size =3D (_sector_size) * (_n_sectors), \ - .sector_size =3D (_sector_size =3D=3D SZ_64K) ? 0 : (_sector_size), \ - .n_banks =3D (_n_banks) - -/* Used when the "_ext_id" is two bytes at most */ -#define INFO(_jedec_id, _ext_id, _sector_size, _n_sectors) \ - SPI_NOR_ID((_jedec_id), (_ext_id)), \ - SPI_NOR_GEOMETRY((_sector_size), (_n_sectors), 0), - -#define INFO0(_sector_size, _n_sectors) \ - SPI_NOR_GEOMETRY((_sector_size), (_n_sectors), 0), - -#define INFOB(_jedec_id, _ext_id, _sector_size, _n_sectors, _n_banks) \ - SPI_NOR_ID((_jedec_id), (_ext_id)), \ - SPI_NOR_GEOMETRY((_sector_size), (_n_sectors), (_n_banks)), - -#define INFO6(_jedec_id, _ext_id, _sector_size, _n_sectors) \ - SPI_NOR_ID6((_jedec_id), (_ext_id)), \ - SPI_NOR_GEOMETRY((_sector_size), (_n_sectors), 0), - -#define CAT25_INFO(_sector_size, _n_sectors, _page_size, _addr_nbytes) \ - .size =3D (_sector_size) * (_n_sectors), \ - .sector_size =3D (_sector_size), \ - .page_size =3D (_page_size), \ - .addr_nbytes =3D (_addr_nbytes), \ - .flags =3D SPI_NOR_NO_ERASE | SPI_NOR_NO_FR, \ - -#define OTP_INFO(_len, _n_regions, _base, _offset) \ - .otp =3D &(const struct spi_nor_otp_organization){ \ - .len =3D (_len), \ - .base =3D (_base), \ - .offset =3D (_offset), \ - .n_regions =3D (_n_regions), \ - }, - -#define FLAGS(_flags) \ - .flags =3D (_flags), \ - -#define NO_SFDP_FLAGS(_no_sfdp_flags) \ - .no_sfdp_flags =3D (_no_sfdp_flags), \ - -#define FIXUP_FLAGS(_fixup_flags) \ - .fixup_flags =3D (_fixup_flags), \ - -#define MFR_FLAGS(_mfr_flags) \ - .mfr_flags =3D (_mfr_flags), \ - /** * struct spi_nor_manufacturer - SPI NOR manufacturer object * @name: manufacturer name --=20 2.39.2