From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 457AB279907 for ; Thu, 18 Jun 2026 20:58:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781816322; cv=none; b=lLKgUmf9DDRD8JXvcoWfETSYI/nV64j3LodHS64EoGZnbwCmbZ4Iq3vD9jY+jk/GK+NeKzaDZwdYPO9YjjiXq2FGum/TFRok/XukcNWRbnZtJP6bu5L4ZH0Mec8KDGzhrE8fW6hz72U4PRLuFxoHrE5yujX32OKC+9wqhppLAfk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781816322; c=relaxed/simple; bh=Lhe8uMJkmIB53Ra+GIvcWz0hJLiNcaNONQxISI4M4zE=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=FSNKvlq/yz3c94/GmXg+jdUVmSNr67dTAC1TUCuowJpx6d38ITvx5OF1y0r82gCGCl96uqvs0bWQYAAdS5L0iVO9nn9jZMXhjVwxuvLmOSxRXj+g/d3040heiYM1Nd8qmgNJHJHJJXD7TOpmeztuIryGm8simSbvTFPdm9gLhQ4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Tx+x4bdn; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Tx+x4bdn" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C360F1F000E9; Thu, 18 Jun 2026 20:58:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1781816320; bh=BT8gehoS8o4fNFAcD//E1FfqJRiHz+h+pYHCDl+AfzA=; h=From:To:Cc:Subject:Date; b=Tx+x4bdnbjoXNVe2f/6i+HdIgJ0S73/Y96BnY4cFpZCYAmZOay0+WByBlmgOcQAxL +gC+qwLiWhtfJGW1mLTKKNOsiHlXm3hPeIgi5G6BHK/acZpFBtx4Tj557g+V6KzlVi it7ShRH+3FKE4wdKD23muQ4rTYC7RnEAWJX1HwMPPBIReAzhyf+Srk8pdJou4OjTsj pEMPd0f5G6kcvi/+gDfVs/+oEaOyyzMzWNUaT0wnN7nAEcgm2BwsC33GFUIIFvP6vd zzpjHyunHWgfs/BDm23z6rYdyQF1sKyjVvuTnl4Bqfs3cNs1xWSV6dpU6hZnaNT3Mt NaxWjO6TWaVsw== From: Arnd Bergmann To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Rosen Penev Cc: Arnd Bergmann , Chris Down , Krzysztof Kozlowski , Binbin Zhou , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] mtd: rawnand: ndfc: add CONFIG_OF dependency Date: Thu, 18 Jun 2026 22:58:27 +0200 Message-Id: <20260618205835.1497952-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.5 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 When compile-testing on x86 without CONFIG_OF, the ndfc driver produces a harmless warning: drivers/mtd/nand/raw/ndfc.c: In function 'ndfc_probe': include/linux/dev_printk.h:154:31: error: 'len' is used uninitialized [-Werror=uninitialized] 154 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__) | ^ drivers/mtd/nand/raw/ndfc.c:196:17: note: in expansion of macro 'dev_err' 196 | dev_err(&ofdev->dev, "unable read reg property (%d)\n", len); Limit compile-testing to configurations with CONFIG_OF to trivially avoid this. The driver will still be built in allmodconfig and many randconfig builds. Fixes: 4f2692a5383e ("mtd: rawnand: ndfc: use ioread32be/iowrite32be and allow COMPILE_TEST") Signed-off-by: Arnd Bergmann --- We may also want to change the of_get_property() stub function to initialize *len. --- drivers/mtd/nand/raw/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig index 64b8b99a3a68..1f4053e531fd 100644 --- a/drivers/mtd/nand/raw/Kconfig +++ b/drivers/mtd/nand/raw/Kconfig @@ -72,6 +72,7 @@ config MTD_NAND_AU1550 config MTD_NAND_NDFC tristate "IBM/MCC 4xx NAND controller" depends on 44x || COMPILE_TEST + depends on OF select MTD_NAND_ECC_SW_HAMMING select MTD_NAND_ECC_SW_HAMMING_SMC help -- 2.39.5