Re: [PATCH 03/11] pstore/ram: Factor dmesg przs initialization out of probe()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux