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] [day] [month] [year] [list]
Message-ID:
 <TYCPR01MB12093C0555C3C4B9D6B4E8FCCC2762@TYCPR01MB12093.jpnprd01.prod.outlook.com>
Date: Mon, 30 Sep 2024 14:50:16 +0000
From: Fabrizio Castro <fabrizio.castro.jz@...esas.com>
To: Julia Lawall <julia.lawall@...ia.fr>, Philipp Zabel
	<p.zabel@...gutronix.de>, Thomas Gleixner <tglx@...utronix.de>, Geert
 Uytterhoeven <geert+renesas@...der.be>
CC: Magnus Damm <magnus.damm@...il.com>, "linux-renesas-soc@...r.kernel.org"
	<linux-renesas-soc@...r.kernel.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, Chris Paterson <Chris.Paterson2@...esas.com>,
	Biju Das <biju.das.jz@...renesas.com>, Prabhakar Mahadev Lad
	<prabhakar.mahadev-lad.rj@...renesas.com>
Subject: RE: [PATCH 5/6] irqchip: Add RZ/V2H(P) Interrupt Control Unit (ICU)
 driver (fwd)

Hi Julia,

Thanks for this. I'll send a new version soon to address this.

Kind regards,
Fab

> -----Original Message-----
> From: Julia Lawall <julia.lawall@...ia.fr>
> Sent: Saturday, September 21, 2024 9:38 PM
> To: Fabrizio Castro <fabrizio.castro.jz@...esas.com>; Philipp Zabel <p.zabel@...gutronix.de>; Thomas
> Gleixner <tglx@...utronix.de>; Geert Uytterhoeven <geert+renesas@...der.be>
> Cc: Magnus Damm <magnus.damm@...il.com>; linux-renesas-soc@...r.kernel.org; linux-
> kernel@...r.kernel.org; Chris Paterson <Chris.Paterson2@...esas.com>; Biju Das
> <biju.das.jz@...renesas.com>; Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@...renesas.com>
> Subject: Re: [PATCH 5/6] irqchip: Add RZ/V2H(P) Interrupt Control Unit (ICU) driver (fwd)
> 
> The various returns need a put_device.
> 
> julia
> 
> ---------- Forwarded message ----------
> Date: Sun, 22 Sep 2024 04:23:01 +0800
> From: kernel test robot <lkp@...el.com>
> To: oe-kbuild@...ts.linux.dev
> Cc: lkp@...el.com, Julia Lawall <julia.lawall@...ia.fr>
> Subject: Re: [PATCH 5/6] irqchip: Add RZ/V2H(P) Interrupt Control Unit (ICU)
>     driver
> 
> BCC: lkp@...el.com
> CC: oe-kbuild-all@...ts.linux.dev
> In-Reply-To: <20240917173249.158920-6-fabrizio.castro.jz@...esas.com>
> References: <20240917173249.158920-6-fabrizio.castro.jz@...esas.com>
> TO: Fabrizio Castro <fabrizio.castro.jz@...esas.com>
> TO: Thomas Gleixner <tglx@...utronix.de>
> TO: Philipp Zabel <p.zabel@...gutronix.de>
> TO: Geert Uytterhoeven <geert+renesas@...der.be>
> CC: Fabrizio Castro <fabrizio.castro.jz@...esas.com>
> CC: Magnus Damm <magnus.damm@...il.com>
> CC: linux-kernel@...r.kernel.org
> CC: linux-renesas-soc@...r.kernel.org
> CC: Chris Paterson <Chris.Paterson2@...esas.com>
> CC: Biju Das <biju.das.jz@...renesas.com>
> CC: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
> 
> Hi Fabrizio,
> 
> kernel test robot noticed the following build warnings:
> 
> [auto build test WARNING on next-20240917] [cannot apply to tip/irq/core robh/for-next geert-renesas-
> drivers/renesas-pinctrl geert-renesas-devel/next linus/master v6.11 v6.11-rc7 v6.11-rc6 v6.11] [If your
> patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-
> format-patch#_base_tree_information]
> 
> url:    https://github.com/intel-lab-lkp/linux/commits/Fabrizio-Castro/dt-bindings-pinctrl-renesas-
> rzg2l-pinctrl-Add-interrupt-parent/20240918-013929
> base:   next-20240917
> patch link:    https://lore.kernel.org/r/20240917173249.158920-6-fabrizio.castro.jz%40renesas.com
> patch subject: [PATCH 5/6] irqchip: Add RZ/V2H(P) Interrupt Control Unit (ICU) driver
> :::::: branch date: 4 days ago
> :::::: commit date: 4 days ago
> config: nios2-randconfig-r064-20240922 (https://download.01.org/0day-
> ci/archive/20240922/202409220454.AW3A9lUC-lkp@...el.com/config)
> compiler: nios2-linux-gcc (GCC) 14.1.0
> 
> If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit),
> kindly add following tags
> | Reported-by: kernel test robot <lkp@...el.com>
> | Reported-by: Julia Lawall <julia.lawall@...ia.fr>
> | Closes: https://lore.kernel.org/r/202409220454.AW3A9lUC-lkp@intel.com/
> 
> cocci warnings: (new ones prefixed by >>)
> >> drivers/irqchip/irq-renesas-rzv2h.c:452:2-8: ERROR: missing put_device; call of_find_device_by_node
> on line 445, but without a corresponding object release within this function.
>    drivers/irqchip/irq-renesas-rzv2h.c:458:2-8: ERROR: missing put_device; call of_find_device_by_node
> on line 445, but without a corresponding object release within this function.
>    drivers/irqchip/irq-renesas-rzv2h.c:465:2-8: ERROR: missing put_device; call of_find_device_by_node
> on line 445, but without a corresponding object release within this function.
>    drivers/irqchip/irq-renesas-rzv2h.c:470:2-8: ERROR: missing put_device; call of_find_device_by_node
> on line 445, but without a corresponding object release within this function.
>    drivers/irqchip/irq-renesas-rzv2h.c:475:2-8: ERROR: missing put_device; call of_find_device_by_node
> on line 445, but without a corresponding object release within this function.
>    drivers/irqchip/irq-renesas-rzv2h.c:480:2-8: ERROR: missing put_device; call of_find_device_by_node
> on line 445, but without a corresponding object release within this function.
>    drivers/irqchip/irq-renesas-rzv2h.c:502:1-7: ERROR: missing put_device; call of_find_device_by_node
> on line 445, but without a corresponding object release within this function.
>    drivers/irqchip/irq-renesas-rzv2h.c:510:1-7: ERROR: missing put_device; call of_find_device_by_node
> on line 445, but without a corresponding object release within this function.
> 
> vim +452 drivers/irqchip/irq-renesas-rzv2h.c
> 
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  435
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  436  static int rzv2h_icu_init(struct device_node *node,
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  437  				 struct device_node *parent)
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  438  {
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  439  	struct irq_domain *irq_domain, *parent_domain;
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  440  	struct rzv2h_icu_priv *rzv2h_icu_data;
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  441  	struct platform_device *pdev;
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  442  	struct reset_control *resetn;
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  443  	int ret;
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  444
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17 @445  	pdev = of_find_device_by_node(node);
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  446  	if (!pdev)
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  447  		return -ENODEV;
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  448
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  449  	parent_domain = irq_find_host(parent);
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  450  	if (!parent_domain) {
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  451  		dev_err(&pdev->dev, "cannot find parent
> domain\n");
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17 @452  		return -ENODEV;
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  453  	}
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  454
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  455  	rzv2h_icu_data = devm_kzalloc(&pdev->dev,
> sizeof(*rzv2h_icu_data),
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  456  				       GFP_KERNEL);
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  457  	if (!rzv2h_icu_data)
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  458  		return -ENOMEM;
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  459
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  460  	rzv2h_icu_data->irqchip = &rzv2h_icu_chip;
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  461
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  462  	rzv2h_icu_data->base = devm_of_iomap(&pdev->dev, pdev-
> >dev.of_node, 0,
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  463  					      NULL);
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  464  	if (IS_ERR(rzv2h_icu_data->base))
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  465  		return PTR_ERR(rzv2h_icu_data->base);
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  466
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  467  	ret = rzv2h_icu_parse_interrupts(rzv2h_icu_data,
> node);
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  468  	if (ret) {
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  469  		dev_err(&pdev->dev, "cannot parse interrupts:
> %d\n", ret);
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  470  		return ret;
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  471  	}
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  472
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  473  	resetn = devm_reset_control_get_exclusive(&pdev->dev,
> NULL);
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  474  	if (IS_ERR(resetn))
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  475  		return PTR_ERR(resetn);
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  476
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  477  	ret = reset_control_deassert(resetn);
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  478  	if (ret) {
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  479  		dev_err(&pdev->dev, "failed to deassert resetn
> pin, %d\n", ret);
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  480  		return ret;
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  481  	}
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  482
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  483  	pm_runtime_enable(&pdev->dev);
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  484  	ret = pm_runtime_resume_and_get(&pdev->dev);
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  485  	if (ret < 0) {
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  486  		dev_err(&pdev->dev, "pm_runtime_resume_and_get
> failed: %d\n",
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  487  			ret);
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  488  		goto pm_disable;
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  489  	}
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  490
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  491  	raw_spin_lock_init(&rzv2h_icu_data->lock);
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  492
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  493  	irq_domain = irq_domain_add_hierarchy(parent_domain,
> 0, ICU_NUM_IRQ,
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  494  					      node,
> &rzv2h_icu_domain_ops,
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  495  					      rzv2h_icu_data);
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  496  	if (!irq_domain) {
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  497  		dev_err(&pdev->dev, "failed to add irq
> domain\n");
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  498  		ret = -ENOMEM;
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  499  		goto pm_put;
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  500  	}
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  501
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  502  	return 0;
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  503
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  504  pm_put:
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  505  	pm_runtime_put(&pdev->dev);
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  506  pm_disable:
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  507  	pm_runtime_disable(&pdev->dev);
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  508  	reset_control_assert(resetn);
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  509
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  510  	return ret;
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  511  }
> 34d38ea429c8e6 Fabrizio Castro 2024-09-17  512
> 
> --
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ