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