NetBSD-Bugs archive

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

kern/58029: nvme sc_intr_disestablish hook has useless return value



>Number:         58029
>Category:       kern
>Synopsis:       nvme sc_intr_disestablish hook has useless return value
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Mar 11 10:45:00 +0000 2024
>Originator:     Taylor R Campbell
>Release:        current, 10, 9, 8
>Organization:
The NvmeBSD Foundation
>Environment:
>Description:
The sc_intr_disestablish hook in sys/dev/ic/nvme.c returns an int error code that can be used to represent failure.

This complicates teardown logic in nvme(4) with dead branches that serve no purpose because all implementations of the hook unconditionally succeed.
>How-To-Repeat:
code inspection
>Fix:
1. Change sc_intr_disestablish to return void and prune all the dead branches.
2. Decide whether this is safe for pullup or means an ABI change that would break modules.



Home | Main Index | Thread Index | Old Index