From owner-freebsd-bugs@FreeBSD.ORG Mon Sep 24 17:20:10 2007 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D452416A418 for ; Mon, 24 Sep 2007 17:20:10 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id C8C6B13C49D for ; Mon, 24 Sep 2007 17:20:10 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l8OHKAjW089941 for ; Mon, 24 Sep 2007 17:20:10 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l8OHKA0W089940; Mon, 24 Sep 2007 17:20:10 GMT (envelope-from gnats) Date: Mon, 24 Sep 2007 17:20:10 GMT Message-Id: <200709241720.l8OHKA0W089940@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Bruce Evans Cc: Subject: Re: kern/116536: [fdc] [patch] fdc(4) does not respect hint.fd.0.flags from device.hints X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Bruce Evans List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Sep 2007 17:20:10 -0000 The following reply was made to PR kern/116536; it has been noted by GNATS. From: Bruce Evans To: Eugene Grosbein Cc: bug-followup@freebsd.org, Bruce Evans Subject: Re: kern/116536: [fdc] [patch] fdc(4) does not respect hint.fd.0.flags from device.hints Date: Tue, 25 Sep 2007 03:15:19 +1000 (EST) On Tue, 25 Sep 2007, Eugene Grosbein wrote: > On Sat, 22 Sep 2007, Bruce Evans wrote: > >> fd->flags has nothing to do with the device flags. This copy of the device >> flags gets clobbered later when fd->flags is used for more-dynamic flags. > > int has (at least) 32 bits, why not use them? It's simpler to use another variable for unrelated flags. > It's possible to move values for user-settable flags > (that are broken anyway for now) so that they do not globber > with more-dynamic flags. What's the point in calls to device_get_flags() > all the way? It is to keep the device flags in the variable (struct member) where they belong. They could be cached in a driver variable (struct member), but there is no point. device_get_flags() is just "return (dev->dev_flags);" and its speed is so unimportant that it is not inline. Bruce