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: <201408062307.18851.arnd@arndb.de>
Date:	Wed, 6 Aug 2014 23:07:18 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	Peter Griffin <peter.griffin@...aro.org>
Cc:	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
	gregkh@...uxfoundation.org, stern@...land.harvard.edu,
	srinivas.kandagatla@...il.com, maxime.coquelin@...com,
	patrice.chotard@...com, lee.jones@...aro.org,
	devicetree@...r.kernel.org, linux-usb@...r.kernel.org
Subject: Re: [PATCH v3 2/6] usb: host: ehci-st: Add EHCI support for ST STB devices

On Wednesday 06 August 2014, Peter Griffin wrote:

> +static int st_ehci_platform_reset(struct usb_hcd *hcd)
> +{
> +	struct platform_device *pdev = to_platform_device(hcd->self.controller);
> +	struct usb_ehci_pdata *pdata = dev_get_platdata(&pdev->dev);
> +	struct ehci_hcd *ehci = hcd_to_ehci(hcd);
> +	int retval;
> +
> +	if (pdata->pre_setup) {
> +		retval = pdata->pre_setup(hcd);
> +		if (retval < 0)
> +			return retval;
> +	}

What is the point in going through a platform data function pointer here?
Can't you just open-code st_ehci_configure_bus() here?

> +static int st_ehci_platform_probe(struct platform_device *dev)
> +{
> +	struct usb_hcd *hcd;
> +	struct resource *res_mem;
> +	struct usb_ehci_pdata *pdata = dev_get_platdata(&dev->dev);
> +	struct st_platform_priv *priv;
> +	struct ehci_hcd *ehci;
> +	int err, irq, clk = 0;
> +
> +	if (usb_disabled())
> +		return -ENODEV;
> +
> +	/*
> +	 * Use reasonable defaults so platforms don't have to provide these
> +	 * with DT probing on ARM.
> +	 */
> +	if (!pdata)
> +		pdata = &ehci_platform_defaults;

How would you ever get here with pdata set?

> +	err = dma_coerce_mask_and_coherent(&dev->dev, DMA_BIT_MASK(32));
> +	if (err)
> +		return err;

Remove this here, and rely on the correct mask to be set from the DT scan.

	Arnd
--
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