Fix two compiler warnings introduced by recent commits: pointer

arithmetic and double initialisation of struct field.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE5RElWfyWxS+3PLO2a9axLQDIXvEFAmI0zIoACgkQa9axLQDI
 XvFf/Q//TsgzdWWbFLYzSDCxE7GM7TUa7m6TOwAeMW5lQjmqr+im3S98cp/l32SP
 9D4TJCz3VK3Z+I5ogcnX/c5Y+d0n7NUDFq1M4tWwLoUwbXIbwDLpjW2IbsmO81Tb
 9+POZARa35NzZ6r2QMjxf5PjduzmdMhxa9aTVw+zJfuQ6itbkI30y0sNYsJjSUQL
 aedL3YrJtS2BUGmHtyubtCWyVQ306ZQDKWJpHIZ9fqwyLmS/50Gcn098Jems71sq
 No402qCJG3oS/e3091jV87RA3M/zAuKdkp6NGEFSNPv1hXC5OLNR8VRDoIoTRKQH
 XL2CbSP0Wyb5m2C/oixr+WCH4GQ845u8iOJiXP6r6AoQXnDde/EH967MtWfFQAiN
 K2YTkqaclflwCf/ftCLaDl1FL0kl/z+HElDaQeoLuQ+/cxxREJ9L3Kg/c2XryWHl
 WSUiqmBXySvz0spu5tqBEhrfb1Icf8CJ44/NkUKUHdP+zsF6eMg/i23dAEZxgA7z
 3eGSfuWq4SBI1MUWA6Db0gZLfHraRefeCh26YRVn1uTsQH0b6pU2gkWkBLfm1PvB
 c3HladEG4zSSZ4jcalg8XdndxPE4JFGU7r+Exsl9WkE5YVpl+p99VPZv8iuvkvO2
 +Z7MMS52pdMKU9FlakHVwM8r0WypNSPaXFYsrAkQbqVJR7ETi7g=
 =6iMp
 -----END PGP SIGNATURE-----

Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux

Pull arm64 fixes from Catalin Marinas:
 "Fix two compiler warnings introduced by recent commits: pointer
  arithmetic and double initialisation of struct field"

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64: errata: avoid duplicate field initializer
  arm64: fix clang warning about TRAMP_VALIAS
This commit is contained in:
Linus Torvalds 2022-03-18 12:32:59 -07:00
commit 34e047aa16
2 changed files with 2 additions and 3 deletions

View File

@ -56,14 +56,14 @@ enum arm64_bp_harden_el1_vectors {
DECLARE_PER_CPU_READ_MOSTLY(const char *, this_cpu_vector);
#ifndef CONFIG_UNMAP_KERNEL_AT_EL0
#define TRAMP_VALIAS 0
#define TRAMP_VALIAS 0ul
#endif
static inline const char *
arm64_get_bp_hardening_vector(enum arm64_bp_harden_el1_vectors slot)
{
if (arm64_kernel_unmapped_at_el0())
return (char *)TRAMP_VALIAS + SZ_2K * slot;
return (char *)(TRAMP_VALIAS + SZ_2K * slot);
WARN_ON_ONCE(slot == EL1_VECTOR_KPTI);

View File

@ -611,7 +611,6 @@ const struct arm64_cpu_capabilities arm64_errata[] = {
{
.desc = "ARM erratum 2077057",
.capability = ARM64_WORKAROUND_2077057,
.type = ARM64_CPUCAP_LOCAL_CPU_ERRATUM,
ERRATA_MIDR_REV_RANGE(MIDR_CORTEX_A510, 0, 0, 2),
},
#endif