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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140507145536.29003dfa@free-electrons.com>
Date:	Wed, 7 May 2014 14:55:36 +0200
From:	Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>
To:	Ezequiel Garcia <ezequiel.garcia@...e-electrons.com>
Cc:	Gregory CLEMENT <gregory.clement@...e-electrons.com>,
	Mathias Nyman <mathias.nyman@...el.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Felipe Balbi <balbi@...com>, linux-usb@...r.kernel.org,
	linux-kernel@...r.kernel.org, Jason Cooper <jason@...edaemon.net>,
	Andrew Lunn <andrew@...n.ch>,
	Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>,
	linux-arm-kernel@...ts.infradead.org,
	Lior Amsalem <alior@...vell.com>,
	Tawfik Bayouk <tawfik@...vell.com>,
	Nadav Haklai <nadavh@...vell.com>,
	Grant Likely <grant.likely@...aro.org>,
	Rob Herring <robh+dt@...nel.org>, devicetree@...r.kernel.org
Subject: Re: [PATCH v3 17/20] phy: Add support for USB cluster on the Armada
 375 SoC

Dear Ezequiel Garcia,

On Tue, 6 May 2014 17:53:30 -0300, Ezequiel Garcia wrote:

> > +#define USB2_PHY_CONFIG_ENABLE BIT(0) /* active low */
> > +
> 
> I still think it's more readable to use USB2_PHY_CONFIG_DISABLE.
> It's just a nitpick, though.

Yes, fixed.

> > +static int armada375_usb_phy_probe(struct platform_device *pdev)
> > +{
> > +	struct device *dev = &pdev->dev;
> > +	struct phy *phy;
> > +	struct device_node *np = dev->of_node;
> > +	struct phy_provider *phy_provider;
> > +	void __iomem *usb_cluster_base;
> > +	struct device_node *xhci_node;
> > +	int i;
> > +
> > +	usb_cluster_base = of_iomap(np, 0);
> > +	BUG_ON(!usb_cluster_base);
> > +
> 
> Isn't a bit extreme to call BUG_ON (and thus bring down the whole system)
> in a phy driver?

Indeed, fixed by a more normal error return.

> > +	for (i = 0; i < NB_PHY; i++) {
> > +		phy = devm_phy_create(dev, &armada375_usb_phy_ops, NULL);
> > +		if (IS_ERR(phy))
> > +			dev_err(dev, "failed to create PHY n%d\n", i);
> > +
> 
> I think you're missing a continue/break here.

Indeed, fixed, I just do a return from the ->probe() function if
creating the PHY fails.

> > +MODULE_DESCRIPTION("Armada 375 USB cluster driver");
> > +MODULE_AUTHOR("Gregory CLEMENT <gregory.clement@...e-electrons.com>");
> > +MODULE_LICENSE("GPL");
> 
> GPL v2 ?

Well, using just "GPL" seems to be the more common usage through the
kernel:

linux/drivers $ git grep MODULE_LICENSE | grep "\"GPL\"" | wc -l
4276
linux/drivers $ git grep MODULE_LICENSE | grep "\"GPLv2\"" | wc -l
5
linux/drivers $ git grep MODULE_LICENSE | grep "\"GPL v2\"" | wc -l
841

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
--
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