]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
soc: fsl: cpm1: qmc: Fix unused data compilation warning
authorHerve Codina <herve.codina@bootlin.com>
Mon, 9 Sep 2024 12:11:29 +0000 (14:11 +0200)
committerChristophe Leroy <christophe.leroy@csgroup.eu>
Wed, 2 Oct 2024 21:29:38 +0000 (23:29 +0200)
In some configuration, compilation raises warnings related to unused
data. Indeed, depending on configuration, those data can be unused.

mark those data as __maybe_unused to avoid compilation warnings.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202409071707.ou2KFNKO-lkp@intel.com/
Fixes: eb680d563089 ("soc: fsl: cpm1: qmc: Add support for QUICC Engine (QE) implementation")
Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Link: https://lore.kernel.org/r/20240909121129.57067-1-herve.codina@bootlin.com
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
drivers/soc/fsl/qe/qmc.c

index 659c579d751d72401270b029f0f0980ce42a3f0d..19cc581b06d0c806f315091c4f2b6e7d4eb06d6e 100644 (file)
@@ -2055,7 +2055,7 @@ static void qmc_remove(struct platform_device *pdev)
        qmc_exit_xcc(qmc);
 }
 
-static const struct qmc_data qmc_data_cpm1 = {
+static const struct qmc_data qmc_data_cpm1 __maybe_unused = {
        .version = QMC_CPM1,
        .tstate = 0x30000000,
        .rstate = 0x31000000,
@@ -2065,7 +2065,7 @@ static const struct qmc_data qmc_data_cpm1 = {
        .rpack = 0x00000000,
 };
 
-static const struct qmc_data qmc_data_qe = {
+static const struct qmc_data qmc_data_qe __maybe_unused = {
        .version = QMC_QE,
        .tstate = 0x30000000,
        .rstate = 0x30000000,