From: Alex Williamson <alex.williamson@redhat.com>
To: Paul Bolle <pebolle@tiscali.nl>
Cc: kvm@vger.kernel.org, b.reynal@virtualopensystems.com,
linux-kernel@vger.kernel.org, eric.auger@linaro.org
Subject: Re: [PATCH] vfio: Split virqfd into a separate module for vfio bus drivers
Date: Thu, 19 Mar 2015 14:12:11 -0600 [thread overview]
Message-ID: <1426795931.3643.455.camel@redhat.com> (raw)
In-Reply-To: <1426793571.23529.14.camel@x220>
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 <alex.williamson@redhat.com>"
> > +#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 <alex.williamson@redhat.com>");
MODULE_DESCRIPTION("IRQFD support for VFIO bus drivers");
;)
Thanks,
Alex
next prev parent reply other threads:[~2015-03-19 20:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-18 17:27 [PATCH] vfio: Split virqfd into a separate module for vfio bus drivers Alex Williamson
2015-03-19 19:32 ` Paul Bolle
2015-03-19 20:12 ` Alex Williamson [this message]
2015-03-19 20:31 ` Paul Bolle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1426795931.3643.455.camel@redhat.com \
--to=alex.williamson@redhat.com \
--cc=b.reynal@virtualopensystems.com \
--cc=eric.auger@linaro.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pebolle@tiscali.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox