From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Williamson Subject: Re: [PATCH] vfio: Split virqfd into a separate module for vfio bus drivers Date: Thu, 19 Mar 2015 14:12:11 -0600 Message-ID: <1426795931.3643.455.camel@redhat.com> References: <20150318172352.18444.97999.stgit@gimli.home> <1426793571.23529.14.camel@x220> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, b.reynal@virtualopensystems.com, linux-kernel@vger.kernel.org, eric.auger@linaro.org To: Paul Bolle Return-path: In-Reply-To: <1426793571.23529.14.camel@x220> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Thu, 2015-03-19 at 20:32 +0100, Paul Bolle wrote: > On Wed, 2015-03-18 at 11:27 -0600, Alex Williamson wrote: > > --- a/drivers/vfio/virqfd.c > > +++ b/drivers/vfio/virqfd.c > > > +#define DRIVER_VERSION "0.1" > > +#define DRIVER_AUTHOR "Alex Williamson " > > +#define DRIVER_DESC "IRQFD support for VFIO bus drivers" > > > +MODULE_VERSION(DRIVER_VERSION); > > +MODULE_LICENSE("GPL v2"); > > +MODULE_AUTHOR(DRIVER_AUTHOR); > > +MODULE_DESCRIPTION(DRIVER_DESC); > > Why bother with those three defines? They're all used just once, aren't > they? Well, at some point when I was doing vfio it seemed like a good idea and I copied it from another driver. The core vfio module printed the description and version on driver loading, but the other modules that comprise vfio just followed along for consistency. Now we even have a few more modules that comprise vfio, and they all follow this same standard, even though they don't use the defines elsewhere. The macro names are pretty standard, so I don't think I'm infringing on any name space by using them, it seems harmless otherwise and maintains consistency within the driver. Is it more valuable to remove a few lines of source code with no net effect on the resulting output? Besides, look at how much more aesthetically pleasing the above is versus this: MODULE_VERSION("0.1"); MODULE_LICENSE("GPL v2"); MODULE_AUTHOR("Alex Williamson "); MODULE_DESCRIPTION("IRQFD support for VFIO bus drivers"); ;) Thanks, Alex