Skip to content

Commit 9b5c33b

Browse files
leitaokuba-moo
authored andcommitted
crypto: caam: Avoid unused imx8m_machine_match variable
If caam module is built without OF support, the compiler returns the following warning: drivers/crypto/caam/ctrl.c:83:34: warning: 'imx8m_machine_match' defined but not used [-Wunused-const-variable=] imx8m_machine_match is only referenced by of_match_node(), which is set to NULL if CONFIG_OF is not set, as of commit 5762c20 ("dt: Add empty of_match_node() macro"): #define of_match_node(_matches, _node) NULL Do not create imx8m_machine_match if CONFIG_OF is not set. Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Suggested-by: Jakub Kicinski <[email protected]> Signed-off-by: Breno Leitao <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent aa77b11 commit 9b5c33b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/crypto/caam/ctrl.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ static void build_deinstantiation_desc(u32 *desc, int handle)
8080
append_jump(desc, JUMP_CLASS_CLASS1 | JUMP_TYPE_HALT);
8181
}
8282

83+
#ifdef CONFIG_OF
8384
static const struct of_device_id imx8m_machine_match[] = {
8485
{ .compatible = "fsl,imx8mm", },
8586
{ .compatible = "fsl,imx8mn", },
@@ -88,6 +89,7 @@ static const struct of_device_id imx8m_machine_match[] = {
8889
{ .compatible = "fsl,imx8ulp", },
8990
{ }
9091
};
92+
#endif
9193

9294
/*
9395
* run_descriptor_deco0 - runs a descriptor on DECO0, under direct control of

0 commit comments

Comments
 (0)