NetBSD-Bugs archive

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

kern/58361: Remove STATIC/INLINE macros from the kernel codebase



>Number:         58361
>Category:       kern
>Synopsis:       Remove STATIC/INLINE macros from the kernel codebase
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jun 23 18:10:00 +0000 2024
>Originator:     Andrius V
>Release:        current
>Organization:
>Environment:
>Description:
While discussing the fix on DEBUG build option for one of the kernel configs (https://github.com/NetBSD/src/commit/c1fbfb0504515c3716072ef8f01b77f9769f84d4),
Matthew proposed to file a PR to remove of all STATIC/INLINE macros in the codebase.

Currently they are defined and used in the files below (unless I missed something):
sys/dev/cardbus/cardbus.c, cardbus_map.c, cardslot.c, rbus.c
sys/dev/ic/wi.c
sys/dev/isa/gus.c
sys/dev/iscsi/iscsi_globals.h, iscsi_main.c, iscsi_rcv.c, iscsi_send.c, iscsi_text.c, iscsi_utils.c
sys/dev/kloader.c
sys/dev/marvell/gtmpsc.c, if_gfe.c, if_mvxpe.c, mvxpbm.c, mvxpsec.c
sys/dev/pci/pccbb.c
sys/dev/pcmcia/if_xi.c
sys/dev/spi/spiflash.c

As I understand the reasoning, while it still can be sometimes useful for debugging (as the intention was), incorrect static usage can be more "damaging".
>How-To-Repeat:
N/A
>Fix:
Replace STATIC/INLINE macro with static/inline keywords in files above and cleanup macro definition code.



Home | Main Index | Thread Index | Old Index