NetBSD Problem Report #52741
From www@NetBSD.org Mon Nov 20 10:02:40 2017
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-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 649AC7A1CF
for <gnats-bugs@gnats.NetBSD.org>; Mon, 20 Nov 2017 10:02:40 +0000 (UTC)
Message-Id: <20171120100239.7FF587A1F0@mollari.NetBSD.org>
Date: Mon, 20 Nov 2017 10:02:39 +0000 (UTC)
From: rockyhotas@post.com
Reply-To: rockyhotas@post.com
To: gnats-bugs@NetBSD.org
Subject: Wrong (oudated) information in driver(9)
X-Send-Pr-Version: www-1.0
>Number: 52741
>Category: kern
>Synopsis: Wrong (oudated) information in driver(9)
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: doc-bug
>Submitter-Id: net
>Arrival-Date: Mon Nov 20 10:05:00 +0000 2017
>Originator: Rocky Hotas
>Release: current
>Organization:
>Environment:
>Description:
When dealing with the `attach' function:
"The first argument parent is a pointer to the driver's parent device structure. The second argument self is a pointer to the driver's device structure. It is also a pointer to our softc structure since the device structure is its first member".
The second statement is wrong: the `softc' struct is not the first member of the `device' struct; it is neither a member of the `device' struct. It can instead be obtained by calling `device_private(self)'.
>How-To-Repeat:
Read the driver(9) manual.
>Fix:
The sentence "It is also a pointer to our softc structure since the device structure is its first member" should be removed, or modified according to the current code.
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.