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:   Tue, 18 Apr 2023 20:00:03 +0000
From:   Christoph Niedermaier <cniedermaier@...electronics.com>
To:     "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>
CC:     Support Opensource <support.opensource@...semi.com>,
        Adam Thomson <Adam.Thomson.Opensource@...semi.com>,
        Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>, Marek Vasut <marex@...x.de>,
        kernel <kernel@...electronics.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Christoph Niedermaier <cniedermaier@...electronics.com>
Subject: RE: [PATCH V4 3/3] regulator: da9062: Make the use of IRQ optional

From: Christoph Niedermaier [mailto:cniedermaier@...electronics.com]
Sent: Thursday, March 9, 2023 10:23 AM
> This patch makes the use of IRQ optional to make the DA9061/62 usable
> for designs that don't have the IRQ pin connected, because the regulator
> is usable without IRQ.
> 
> Signed-off-by: Christoph Niedermaier <cniedermaier@...electronics.com>
> Acked-by: Mark Brown <broonie@...nel.org>
> Reviewed-by: Adam Ward <DLG-Adam.Ward.opensource@...renesas.com>
> Reported-by: kernel test robot <lkp@...el.com>
> Link: https://lore.kernel.org/oe-kbuild-all/202303082246.GuLdPL0t-lkp@intel.com/
> ---
> Cc: Support Opensource <support.opensource@...semi.com>
> Cc: Adam Thomson <Adam.Thomson.Opensource@...semi.com>
> Cc: Liam Girdwood <lgirdwood@...il.com>
> Cc: Mark Brown <broonie@...nel.org>
> Cc: Marek Vasut <marex@...x.de>
> Cc: kernel@...electronics.com
> Cc: linux-kernel@...r.kernel.org
> To: linux-arm-kernel@...ts.infradead.org
> ---
> V2: - Rebase on current next 20230209
>     - Add Reviewed-by and Acked-by tags
> V3: - Rebase on current next 20230307
> v4: - Rebase on current next 20230309
>     - Fix a missing variable change reported by kernel test robot
> ---
>  drivers/regulator/da9062-regulator.c | 11 +++++------
>  1 file changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/regulator/da9062-regulator.c b/drivers/regulator/da9062-regulator.c
> index 1a6324001027..ae7955afce86 100644
> --- a/drivers/regulator/da9062-regulator.c
> +++ b/drivers/regulator/da9062-regulator.c
> @@ -924,7 +924,7 @@ static int da9062_regulator_probe(struct platform_device *pdev)
>  	struct da9062_regulator *regl;
>  	struct regulator_config config = { };
>  	const struct da9062_regulator_info *rinfo;
> -	int irq, n, ret;
> +	int n, ret;
>  	int max_regulators;
> 
>  	switch (chip->chip_type) {
> @@ -1012,12 +1012,11 @@ static int da9062_regulator_probe(struct platform_device *pdev)
>  	}
> 
>  	/* LDOs overcurrent event support */
> -	irq = platform_get_irq_byname(pdev, "LDO_LIM");
> -	if (irq < 0)
> -		return irq;
> -	regulators->irq_ldo_lim = irq;
> +	regulators->irq_ldo_lim = platform_get_irq_byname_optional(pdev, "LDO_LIM");
> +	if (regulators->irq_ldo_lim < 0)
> +		return 0;
> 
> -	ret = devm_request_threaded_irq(&pdev->dev, irq,
> +	ret = devm_request_threaded_irq(&pdev->dev, regulators->irq_ldo_lim,
>  					NULL, da9062_ldo_lim_event,
>  					IRQF_TRIGGER_LOW | IRQF_ONESHOT,
>  					"LDO_LIM", regulators);

Hi,

In V3 of this patch the kernel test robot found an issue. A fix is
important, because otherwise the normal path with IRQ could have
problems. So I fixed it in V4. Any comments or is it OK how I fixed it?


Regards
Christoph

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ