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]
Date: Thu, 28 Dec 2023 16:31:08 +0100
From: Krzysztof Kozlowski <krzk@...nel.org>
To: "larry.lai" <larry.lai@...jingtech.com>, lee@...nel.org,
 andriy.shevchenko@...ux.intel.com, linus.walleij@...aro.org, pavel@....cz
Cc: linux-kernel@...r.kernel.org, linux-gpio@...r.kernel.org,
 linux-leds@...r.kernel.org, GaryWang@...on.com.tw, musa.lin@...jingtech.com,
 jack.chang@...jingtech.com, noah.hung@...jingtech.com
Subject: Re: [PATCH V8 1/3] mfd: Add support for UP board CPLD/FPGA

On 28/12/2023 16:15, larry.lai wrote:
> The UP Squared board <http://www.upboard.com> implements certain
> features (pin control, onboard LEDs or CEC) through an on-board CPLD/FPGA.
> 
> This driver implements the line protocol to read and write registers
> from the FPGA through regmap. The register address map is also included.
> 

...

> +#define FIRMWARE_ID_BUILD_OFFSET	12
> +#define FIRMWARE_ID_MAJOR_OFFSET	8
> +#define FIRMWARE_ID_MINOR_OFFSET	4
> +#define FIRMWARE_ID_PATCH_OFFSET	0
> +#define FIRMWARE_ID_MASK		GENMASK(3, 0)
> +
> +/*
> + * read CPLD register on custom protocol
> + * send clock and addr bit in strobe and datain pins then read from dataout pin
> + */
> +static int upboard_cpld_read(void *context, unsigned int reg, unsigned int *val)
> +{
> +	struct upboard_fpga * const fpga = context;

This const does not make sense. Drop it. Unless you wanted to say
something else, like struct is not modified, but then please read C
tutorials. This applies to all your three patches.

Best regards,
Krzysztof


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ