On 5/26/2012 6:20 AM, Anton Vorontsov wrote:
+static int ramoops_init_przs(struct device *dev, struct ramoops_context *cxt,
phys_addr_t *paddr, size_t dump_mem_sz)
+{
- int err = -ENOMEM;
- int i;
- if (!cxt->record_size)
return 0;
- cxt->max_dump_cnt = dump_mem_sz / cxt->record_size;
- if (!cxt->max_dump_cnt)
return -ENOMEM;
- cxt->przs = kzalloc(sizeof(*cxt->przs) * cxt->max_dump_cnt,
GFP_KERNEL);
kcalloc would be better but I see you're just moving code here so it doesn't need to be changed in this patch.