We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a1b8638 commit a094708Copy full SHA for a094708
arch/x86/platform/uv/uv_time.c
@@ -52,7 +52,7 @@ struct uv_rtc_timer_head {
52
struct {
53
int lcpu; /* systemwide logical cpu number */
54
u64 expires; /* next timer expiration for this cpu */
55
- } cpu[1];
+ } cpu[];
56
};
57
58
/*
@@ -148,9 +148,8 @@ static __init int uv_rtc_allocate_timers(void)
148
struct uv_rtc_timer_head *head = blade_info[bid];
149
150
if (!head) {
151
- head = kmalloc_node(sizeof(struct uv_rtc_timer_head) +
152
- (uv_blade_nr_possible_cpus(bid) *
153
- 2 * sizeof(u64)),
+ head = kmalloc_node(struct_size(head, cpu,
+ uv_blade_nr_possible_cpus(bid)),
154
GFP_KERNEL, nid);
155
156
uv_rtc_deallocate_timers();
0 commit comments