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: <YMMnd3bBgT8QcuQu@kroah.com>
Date:   Fri, 11 Jun 2021 11:05:59 +0200
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Sebastian Reichel <sebastian.reichel@...labora.com>
Cc:     Mark Brown <broonie@...nel.org>, Rob Herring <robh+dt@...nel.org>,
        Arnd Bergmann <arnd@...db.de>, Shawn Guo <shawnguo@...nel.org>,
        Sascha Hauer <kernel@...gutronix.de>,
        Fabio Estevam <festevam@...il.com>, Ian Ray <ian.ray@...com>,
        linux-kernel@...r.kernel.org, linux-spi@...r.kernel.org,
        devicetree@...r.kernel.org, kernel@...labora.com
Subject: Re: [PATCHv4 5/6] misc: nxp-ezport: introduce EzPort support

On Wed, Jun 09, 2021 at 05:12:34PM +0200, Sebastian Reichel wrote:
> Add new EzPort support code, which can be used to do
> firmware updates of Kinetis coprocessors. The driver
> is not usable on its own and thus not user selectable.
> 
> Signed-off-by: Sebastian Reichel <sebastian.reichel@...labora.com>


Why is this a separate module if only 1 driver needs this?  Why not keep
it together until you have a second user?

And this module is not able to be unloaded ever?  Why not?

> +int ezport_flash(struct spi_device *spi, struct gpio_desc *reset, const char *fwname)
> +{
> +	int ret;
> +
> +	ret = ezport_start_programming(spi, reset);
> +	if (ret)
> +		return ret;
> +
> +	ret = ezport_firmware_load(spi, fwname);
> +
> +	ezport_stop_programming(spi, reset);
> +
> +	if (ret)
> +		dev_err(&spi->dev, "Failed to flash firmware: %d\n", ret);

%pe perhaps instead of %d?



> +	else
> +		dev_dbg(&spi->dev, "Finished FW flashing!\n");
> +
> +	return ret;
> +}
> +EXPORT_SYMBOL_GPL(ezport_flash);
> +
> +/**
> + * ezport_verify - verify device firmware
> + * @spi: SPI device for NXP EzPort interface
> + * @reset: the gpio connected to the device reset pin
> + * @fwname: filename of the firmware that should be compared
> + *
> + * Context: can sleep
> + *
> + * Return: 0 on success; negative errno on failure
> + */
> +int ezport_verify(struct spi_device *spi, struct gpio_desc *reset, const char *fwname)
> +{
> +	int ret;
> +
> +	ret = ezport_start_programming(spi, reset);
> +	if (ret)
> +		return ret;
> +
> +	ret = ezport_firmware_verify(spi, fwname);
> +
> +	ezport_stop_programming(spi, reset);
> +
> +	if (ret)
> +		dev_err(&spi->dev, "Failed to verify firmware: %d\n", ret);

Same here, %pe?


> +
> +	return ret;
> +}
> +EXPORT_SYMBOL_GPL(ezport_verify);
> +
> +MODULE_DESCRIPTION("NXP EzPort protocol support");
> +MODULE_AUTHOR("Sebastian Reichel <sebastian.reichel@...labora.com>");
> +MODULE_LICENSE("GPL");
> diff --git a/include/linux/platform_data/nxp-ezport.h b/include/linux/platform_data/nxp-ezport.h
> new file mode 100644
> index 000000000000..b0a2af9c1285
> --- /dev/null
> +++ b/include/linux/platform_data/nxp-ezport.h
> @@ -0,0 +1,9 @@
> +/* SPDX-License-Identifier: GPL-2.0+ */

This license does NOT match up with the .c file's license.  Why?

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ