NetBSD Problem Report #58029

From www@netbsd.org  Mon Mar 11 10:40:40 2024
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 3946A1A923F
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 11 Mar 2024 10:40:40 +0000 (UTC)
Message-Id: <20240311104038.757FE1A9242@mollari.NetBSD.org>
Date: Mon, 11 Mar 2024 10:40:38 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: nvme sc_intr_disestablish hook has useless return value
X-Send-Pr-Version: www-1.0

>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.

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.