Skip to content

Commit 8d14474

Browse files
mrutland-armctmarinas
authored andcommitted
arm64: alternative: simplify passing alt_region
In __apply_alternatives() we take a pointer to void which we later assign to a pointer to struct alt_region. As all callers are passing a pointer to struct alt_region to begin with, it's simpler and more robust to take a pointer to struct alt region, so let's do so and avoid the need for a temporary variable. Signed-off-by: Mark Rutland <[email protected]> Cc: Will Deacon <[email protected]> Acked-by: Will Deacon <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
1 parent 782276b commit 8d14474

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

arch/arm64/kernel/alternative.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,10 @@ static void clean_dcache_range_nopatch(u64 start, u64 end)
133133
} while (cur += d_size, cur < end);
134134
}
135135

136-
static void __apply_alternatives(void *alt_region, bool is_module,
136+
static void __apply_alternatives(struct alt_region *region, bool is_module,
137137
unsigned long *feature_mask)
138138
{
139139
struct alt_instr *alt;
140-
struct alt_region *region = alt_region;
141140
__le32 *origptr, *updptr;
142141
alternative_cb_t alt_cb;
143142

0 commit comments

Comments
 (0)