Date: Mon, 24 Sep 2007 17:20:10 GMT From: Bruce Evans <brde@optusnet.com.au> To: freebsd-bugs@FreeBSD.org Subject: Re: kern/116536: [fdc] [patch] fdc(4) does not respect hint.fd.0.flags from device.hints Message-ID: <200709241720.l8OHKA0W089940@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/116536; it has been noted by GNATS. From: Bruce Evans <brde@optusnet.com.au> To: Eugene Grosbein <eugen@grosbein.pp.ru> Cc: bug-followup@freebsd.org, Bruce Evans <brde@optusnet.com.au> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200709241720.l8OHKA0W089940>