Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Mar 2004 15:17:05 -0700 (MST)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        wpaul@FreeBSD.org
Cc:        nate@root.org
Subject:   Re: cvs commit: src/sys/amd64/isa atpic.c src/sys/contrib/dev/oltr if_oltr.c src/sys/dev/aac aac_pci.c src/sys/dev/acpic
Message-ID:  <20040322.151705.45157792.imp@bsdimp.com>
In-Reply-To: <20040322191542.CD8DE16A4CF@hub.freebsd.org>
References:  <20040322102119.P33645@root.org> <20040322191542.CD8DE16A4CF@hub.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <20040322191542.CD8DE16A4CF@hub.freebsd.org>
            wpaul@FreeBSD.org (Bill Paul) writes:
: static __inline struct resource *
: bus_alloc_resource_any(device_t dev, int type, int *rid, u_int flags)
: {
:         return (bus_alloc_resource(dev, type, rid, 0ul, ~0ul, 1, flags));
: }
: 
: Please to be explaining why this isn't a macro:
: 
: #define bus_alloc_resource_any(dev, type, rid, flags)	\
: 	bus_alloc_resource(dev, type, rid, 0ul, ~0ul, 1, flags)

Because they are the same thing, and the inline is easier to deal with
and have fewer side effects.  If you are going give Nate a hassle
about it, don't.  I told him to do it that way.  Also, your macro is
wrong in that it doesn't have enough ().

Warner



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040322.151705.45157792.imp>