Page MenuHomeFreeBSD

LinuxKPI: implement devm_kmemdup_array()
ClosedPublic

Authored by bz on Apr 14 2026, 3:35 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, May 17, 1:46 PM
Unknown Object (File)
Sun, May 17, 5:00 AM
Unknown Object (File)
Sun, May 17, 5:00 AM
Unknown Object (File)
Sat, May 16, 4:48 PM
Unknown Object (File)
Sat, May 16, 4:08 PM
Unknown Object (File)
Thu, May 14, 1:48 AM
Unknown Object (File)
Thu, May 14, 1:48 AM
Unknown Object (File)
Wed, May 13, 12:21 PM

Details

Summary

Implement devm_kmemdup_array() using devm_kmemdup() in order to
prepare for Linux v7.0 based drivers.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bz requested review of this revision.Apr 14 2026, 3:35 PM

The devm_kmemdup*() functions are defined in <linux/device/devres.h>, included from <linux/device.h> in 7.0. Did you consider adding them to <linux/device/devres.h>?

The devm_kmemdup*() functions are defined in <linux/device/devres.h>, included from <linux/device.h> in 7.0. Did you consider adding them to <linux/device/devres.h>?

No, I haven't checked what Linux does for this.
I think factoring them out, I'd rather do in a dedicated commit not adding new stuff.
I can prepare that as a follow-up.

I understand, thanks. I'm approving this patch then.

This revision is now accepted and ready to land.Apr 15 2026, 9:02 PM
This revision was automatically updated to reflect the committed changes.