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]
Message-ID: <20140821095935.GB21848@ulmo>
Date:	Thu, 21 Aug 2014 11:59:36 +0200
From:	Thierry Reding <thierry.reding@...il.com>
To:	Lee Jones <lee.jones@...aro.org>
Cc:	Gyungoh Yoo <gyungoh@...il.com>, robh+dt@...nel.org,
	pawel.moll@....com, mark.rutland@....com,
	ijc+devicetree@...lion.org.uk, galak@...eaurora.org,
	grant.likely@...aro.org, sameo@...ux.intel.com,
	jack.yoo@...worksinc.com, jason@...edaemon.net,
	heiko.stuebner@...eaders.com, florian.vaussard@...l.ch,
	andrew@...n.ch, silvio.fricke@...il.com,
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] Adding Skyworks SKY81452 MFD driver

On Thu, Aug 21, 2014 at 10:45:02AM +0100, Lee Jones wrote:
[...]
> > diff --git a/drivers/mfd/sky81452.c b/drivers/mfd/sky81452.c
[...]
> > + * This program is free software; you can redistribute it and/or modify it
> > + * under the terms of the GNU General Public License as published by the
> > + * Free Software Foundation; either version 2, or (at your option) any
> > + * later version.
[...]
> > +	{ }
> > +};
> > +MODULE_DEVICE_TABLE(i2c, sky81452_ids);
> > +
> > +#ifdef CONFIG_OF
> > +static const struct of_device_id sky81452_of_match[] = {
> > +	{ .compatible = "skyworks,sky81452", },
> > +	{ }
> > +};
> > +MODULE_DEVICE_TABLE(of, sky81452_of_match);
> > +#endif
> 
> You can drop the #differy the compiler should sort that out on the
> back of of_match_ptr().

It won't, unfortunately. If !OF, then of_match_ptr(x) will evaluate to
NULL, therefore sky81452_of_match will become unreferenced and cause the
compiler to output a warning. I guess it could be made __maybe_unused,
but I don't see that as much of an advantage over the #ifdef.

> > +static struct i2c_driver sky81452_driver = {
> > +	.driver = {
> > +		.name = "sky81452",
> > +		.of_match_table = of_match_ptr(sky81452_of_match),
> > +	},
> > +	.probe = sky81452_probe,
> > +	.remove = sky81452_remove,
> > +	.id_table = sky81452_ids,
> > +};
> > +
> > +module_i2c_driver(sky81452_driver);
> > +
> > +MODULE_DESCRIPTION("Skyworks SKY81452 MFD driver");
> > +MODULE_AUTHOR("Gyungoh Yoo <jack.yoo@...worksinc.com>");
> > +MODULE_LICENSE("GPL");
> 
> I think you want v2.

The header comment says "... version 2, or (at your option) any later
version.", so I think "GPL" is the right one here.

Thierry

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ