Page MenuHomeFreeBSD

linuxkpi: Move class_create to .c file
ClosedPublic

Authored by imp on Apr 4 2022, 5:03 PM.
Tags
None
Referenced Files
F97830383: D34769.diff
Tue, Oct 1, 10:51 AM
Unknown Object (File)
Thu, Sep 26, 8:43 PM
Unknown Object (File)
Tue, Sep 24, 7:05 AM
Unknown Object (File)
Sat, Sep 21, 2:41 PM
Unknown Object (File)
Thu, Sep 5, 8:41 AM
Unknown Object (File)
Wed, Sep 4, 1:36 AM
Unknown Object (File)
Mon, Sep 2, 4:04 AM
Unknown Object (File)
Aug 18 2024, 5:37 AM

Details

Summary

class_create encodes the size of struct class into the generated
code. Move from .h file to .c file to move this knowledge from the
client modules that call this into the linuxkpi module.

Sponsored by: Netflix

Test Plan

(adding bz to this one, there's a whole series and phab makes it hard to add people to multiple reviews)

Diff Detail

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

Event Timeline

imp requested review of this revision.Apr 4 2022, 5:03 PM
hselasky added a subscriber: hselasky.

Make sure LINT passes, and that there are no conflicts with existing global symbols.

This revision is now accepted and ready to land.Apr 4 2022, 5:16 PM
emaste added inline comments.
sys/compat/linuxkpi/common/src/linux_compat.c
505

how do Linux and FreeBSD flags interact?

sys/compat/linuxkpi/common/src/linux_compat.c
505

Yes. Can be changed to GFP_KERNEL .

sys/compat/linuxkpi/common/src/linux_compat.c
505

I'm nervous about making any changes here... At least with the pure move it commits...
I'll do a grep for kzalloc to see what else is doing naughty things.

sys/compat/linuxkpi/common/src/linux_compat.c
505

OK, in any case I think there's value in doing these change separately from any style or functional cleanup

imp added a subscriber: bz.
This revision was automatically updated to reflect the committed changes.