Re: [PATCH] Add Silicom Platform Driver

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

 



On 8/8/23 12:19, Huibin Shi wrote:
Guenter,

Here is the implementation of  devm_kmemdup(), *src is the extra argument

void *devm_kmemdup(struct device *dev, const void *src, size_t len, gfp_t gfp)
{
	void *p;

	p = devm_kmalloc(dev, len, gfp);
	if (p)
		memcpy(p, src, len);

	return p;
}


So you don't want to use devm_kmemdup() because of its 'src' argument, and instead
re-implement it locally by using devm_kzalloc() followed by memcpy() ? Really ?

Guenter




[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux