]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit - kernel/module.c
module: break nested ARCH_HAS_STRICT_MODULE_RWX and STRICT_MODULE_RWX #ifdefs
authorJessica Yu <jeyu@kernel.org>
Wed, 8 Apr 2020 14:31:06 +0000 (16:31 +0200)
committerJessica Yu <jeyu@kernel.org>
Fri, 17 Apr 2020 12:56:35 +0000 (14:56 +0200)
commitdb991af02f11053558431467102ee5832894d7a4
tree9fc8174b3ed77f11f2ecab88303dff1c568794c1
parent8f3d9f354286745c751374f5f1fcafee6b3f3136
module: break nested ARCH_HAS_STRICT_MODULE_RWX and STRICT_MODULE_RWX #ifdefs

Various frob_* and module_{enable,disable}_* functions are defined in a
CONFIG_ARCH_HAS_STRICT_MODULE_RWX ifdef block which also has a nested
CONFIG_STRICT_MODULE_RWX ifdef block within it. This is unecessary and
makes things hard to read. Not only that, this construction requires
redundant empty stubs for module_enable_nx(). I suspect this was
originally done for cosmetic reasons - to keep all the frob_* functions
in the same place, and all the module_{enable,disable}_* functions right
after, but as a result it made the code harder to read.

Make this more readable by unnesting the ifdef blocks and getting rid of
the redundant empty stubs.

Signed-off-by: Jessica Yu <jeyu@kernel.org>
kernel/module.c