]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
crypto: ccp - drop platform ifdef checks
authorArnd Bergmann <arnd@arndb.de>
Wed, 3 Apr 2024 08:06:42 +0000 (10:06 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 16 Jun 2024 11:39:16 +0000 (13:39 +0200)
commitb975277e6d7b8322e7219a4840cb1af39cfa3b0a
tree2635eeec04b08c3373442c42790f13447e926d7f
parent4e56db565120c5bcdc153da1bf79ab41d2c57939
crypto: ccp - drop platform ifdef checks

[ Upstream commit 42c2d7d02977ef09d434b1f5b354f5bc6c1027ab ]

When both ACPI and OF are disabled, the dev_vdata variable is unused:

drivers/crypto/ccp/sp-platform.c:33:34: error: unused variable 'dev_vdata' [-Werror,-Wunused-const-variable]

This is not a useful configuration, and there is not much point in saving
a few bytes when only one of the two is enabled, so just remove all
these ifdef checks and rely on of_match_node() and acpi_match_device()
returning NULL when these subsystems are disabled.

Fixes: 6c5063434098 ("crypto: ccp - Add ACPI support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/crypto/ccp/sp-platform.c