lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 19 Mar 2015 14:12:11 -0600
From:	Alex Williamson <alex.williamson@...hat.com>
To:	Paul Bolle <pebolle@...cali.nl>
Cc:	kvm@...r.kernel.org, b.reynal@...tualopensystems.com,
	linux-kernel@...r.kernel.org, eric.auger@...aro.org
Subject: Re: [PATCH] vfio: Split virqfd into a separate module for vfio bus
 drivers

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@...hat.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@...hat.com>");
MODULE_DESCRIPTION("IRQFD support for VFIO bus drivers");

;)

Thanks,

Alex

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ