NetBSD Problem Report #57575

From www@netbsd.org  Wed Aug  9 07:28:12 2023
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 A98411A9238
	for <gnats-bugs@gnats.NetBSD.org>; Wed,  9 Aug 2023 07:28:12 +0000 (UTC)
Message-Id: <20230809072811.383FC1A923A@mollari.NetBSD.org>
Date: Wed,  9 Aug 2023 07:28:11 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: pmf_device_register should return void
X-Send-Pr-Version: www-1.0

>Number:         57575
>Category:       kern
>Synopsis:       pmf_device_register should return void
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Aug 09 07:30:00 +0000 2023
>Last-Modified:  Sat Mar 09 05:25:00 +0000 2024
>Originator:     Taylor R Campbell
>Release:        current
>Organization:
The NetBSD FoundationWARNING: couldn't establish power handler
>Environment:
>Description:
pmf_device_register never fails.  Failure here is not useful.  Every branch on the return value is dead code.
>How-To-Repeat:
code inspection
>Fix:
1. Change pmf_device_register to return void.
2. Prune a zillion dead branches, maybe with the help of coccinelle.

>Audit-Trail:
From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/57575 CVS commit: src/share/man/man9
Date: Sat, 9 Mar 2024 05:22:05 +0000

 Module Name:	src
 Committed By:	riastradh
 Date:		Sat Mar  9 05:22:05 UTC 2024

 Modified Files:
 	src/share/man/man9: pmf.9

 Log Message:
 pmf(9): Document the bug in pmf_device_register return type.

 PR kern/57575


 To generate a diff of this commit:
 cvs rdiff -u -r1.22 -r1.23 src/share/man/man9/pmf.9

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

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.