chg_nr = chgidx;
/* Sort change-point list by memory addresses (low -> high): */
- sort(change_point, chg_nr, sizeof *change_point, cpcompare, NULL);
+ sort(change_point, chg_nr, sizeof(*change_point), cpcompare, NULL);
/* Create a new BIOS memory map, removing overlaps: */
overlap_entries = 0; /* Number of entries in the overlap table */
new_nr = new_bios_entry;
/* Copy new BIOS mapping into the original location: */
- memcpy(biosmap, new_bios, new_nr*sizeof(struct e820_entry));
+ memcpy(biosmap, new_bios, new_nr*sizeof(*biosmap));
*pnr_map = new_nr;
return 0;
/* Completely covered? */
if (entry->addr >= start && entry_end <= end) {
real_removed_size += entry->size;
- memset(entry, 0, sizeof(struct e820_entry));
+ memset(entry, 0, sizeof(*entry));
continue;
}
struct setup_data *sdata;
sdata = early_memremap(phys_addr, data_len);
- entries = sdata->len / sizeof(struct e820_entry);
+ entries = sdata->len / sizeof(*extmap);
extmap = (struct e820_entry *)(sdata->data);
__append_e820_table(extmap, entries);
}
e820__update_table(e820_table->entries, ARRAY_SIZE(e820_table->entries), &e820_table->nr_entries);
- memcpy(e820_table_firmware, e820_table, sizeof(struct e820_table));
+ memcpy(e820_table_firmware, e820_table, sizeof(*e820_table_firmware));
printk(KERN_INFO "extended physical RAM map:\n");
e820__print_table("reserve setup_data");
}
who = x86_init.resources.memory_setup();
- memcpy(e820_table_firmware, e820_table, sizeof(struct e820_table));
+ memcpy(e820_table_firmware, e820_table, sizeof(*e820_table_firmware));
pr_info("e820: BIOS-provided physical RAM map:\n");
e820__print_table(who);