]> www.infradead.org Git - users/willy/xarray.git/commit
crypto: caam: Avoid unused imx8m_machine_match variable
authorBreno Leitao <leitao@debian.org>
Tue, 2 Jul 2024 18:55:51 +0000 (11:55 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 4 Jul 2024 17:19:23 +0000 (10:19 -0700)
commit9b5c33b1a3b7593c0e1d44d92c0093cc44e635fe
tree0a40c8d35065faf74004aaee74a1b5b6947ad6ca
parentaa77b112801613d394f893509d8187f1a332c1a4
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 5762c20593b6b ("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 <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202407011309.cpTuOGdg-lkp@intel.com/
Suggested-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Breno Leitao <leitao@debian.org>
Link: https://patch.msgid.link/20240702185557.3699991-2-leitao@debian.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/crypto/caam/ctrl.c