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: <20141108104606.GH2722@sirena.org.uk>
Date:	Sat, 8 Nov 2014 10:46:06 +0000
From:	Mark Brown <broonie@...nel.org>
To:	Laurentiu Palcu <laurentiu.palcu@...el.com>
Cc:	Samuel Ortiz <sameo@...ux.intel.com>,
	Lee Jones <lee.jones@...aro.org>,
	Johan Havold <johan@...nel.org>,
	Octavian Purdila <octavian.purdila@...el.com>,
	linux-spi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] spi: add support for DLN-2 USB-SPI adapter

On Fri, Nov 07, 2014 at 02:45:13PM +0200, Laurentiu Palcu wrote:

> +static int dln2_spi_transfer_one_message(struct spi_master *master,
> +					 struct spi_message *msg)

It's a bit sad not to do transfer_one() but it's reasonable not to
because of the fun way /CS is being set.

> +	ret = dln2_spi_get_speed_range(dln2,
> +					   &master->min_speed_hz,
> +					   &master->max_speed_hz);

Strange indentation here.

> +static int dln2_spi_remove(struct platform_device *pdev)
> +{
> +	struct spi_master *master = spi_master_get(platform_get_drvdata(pdev));
> +	struct dln2_spi *dln2 = spi_master_get_devdata(master);
> +
> +	if (dln2_spi_enable(dln2, false) < 0)
> +		dev_err(&pdev->dev, "Failed to disable SPI module\n");
> +
> +	spi_master_put(master);

You shouldn't need this _put(), it's defeating the purpose of having the
devm_ registration.

Download attachment "signature.asc" of type "application/pgp-signature" (474 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ