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: <csu3mg7nurpwxkr6drpz6xsw3dqn5ttdotvmfkfvrwpo3geedf@jos6rqxovqr2>
Date: Tue, 31 Dec 2024 09:38:52 +0100
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Chuanhong Guo <gch981213@...il.com>
Cc: linux-gpio@...r.kernel.org, devicetree@...r.kernel.org, 
	linux-kernel@...r.kernel.org, Linus Walleij <linus.walleij@...aro.org>, 
	Bartosz Golaszewski <brgl@...ev.pl>, Rob Herring <robh@...nel.org>, 
	Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>, 
	Philipp Zabel <p.zabel@...gutronix.de>, Qingfang Deng <qingfang.deng@...lower.com.cn>
Subject: Re: [PATCH 2/2] gpio: add support for GPIO controller on Siflower
 SoCs

On Wed, Dec 25, 2024 at 11:58:51AM +0800, Chuanhong Guo wrote:
> From: Qingfang Deng <qingfang.deng@...lower.com.cn>
> 
> Add a driver for the GPIO controller on Siflower SoCs.
> This controller is found on all current Siflower MIPS and RISC-V
> chips including SF19A2890, SF21A6826 and SF21H8898.
> 
> Signed-off-by: Qingfang Deng <qingfang.deng@...lower.com.cn>
> Signed-off-by: Chuanhong Guo <gch981213@...il.com>
> ---
>  drivers/gpio/Kconfig         |   9 +
>  drivers/gpio/Makefile        |   1 +
>  drivers/gpio/gpio-siflower.c | 353 +++++++++++++++++++++++++++++++++++
>  3 files changed, 363 insertions(+)
>  create mode 100644 drivers/gpio/gpio-siflower.c
> 
> diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
> index add5ad29a673..fdc9a89ffbf3 100644
> --- a/drivers/gpio/Kconfig
> +++ b/drivers/gpio/Kconfig
> @@ -637,6 +637,15 @@ config GPIO_SIFIVE
>  	help
>  	  Say yes here to support the GPIO device on SiFive SoCs.
>  
> +config GPIO_SIFLOWER
> +	tristate "SiFlower GPIO support"
> +	depends on OF_GPIO
> +	depends on MIPS || RISCV || COMPILE_TEST

This is supposed to be dependency on ARCH, not instruction set. I don't
se anything MIPS or RISCV here.

> +	select GPIOLIB_IRQCHIP
> +	help
> +	  GPIO controller driver for SiFlower MIPS and RISC-V SoCs
> +	  including SF19A2890, SF21A6826 and SF21H8898.

...

> +static void sf_gpio_remove(struct platform_device *pdev)
> +{
> +	struct sf_gpio_priv *priv = platform_get_drvdata(pdev);
> +
> +	reset_control_assert(priv->rstc);
> +}
> +
> +static const struct of_device_id sf_gpio_ids[] = {
> +	{ .compatible = "siflower,sf19a2890-gpio" },
> +	{},
> +};
> +MODULE_DEVICE_TABLE(of, sf_gpio_ids);
> +
> +static struct platform_driver sf_gpio_driver = {
> +	.probe		= sf_gpio_probe,
> +	.remove		= sf_gpio_remove,
> +	.driver = {
> +		.name		= "siflower_gpio",
> +		.owner		= THIS_MODULE,

You sent us some old code with old code style, so probably you sent us
donwstream poor driver. Please clean it up before posting.

Please run standard kernel tools for static analysis, like coccinelle,
smatch and sparse, and fix reported warnings. Also please check for
warnings when building with W=1. Most of these commands (checks or W=1
build) can build specific targets, like some directory, to narrow the
scope to only your code. The code here looks like it needs a fix. Feel
free to get in touch if the warning is not clear.

Best regards,
Krzysztof


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ