RE: [PATCH 5/6] irqchip: Add RZ/V2H(P) Interrupt Control Unit (ICU) driver (fwd)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxx>
> Sent: Saturday, September 21, 2024 9:38 PM
> To: Fabrizio Castro <fabrizio.castro.jz@xxxxxxxxxxx>; Philipp Zabel <p.zabel@xxxxxxxxxxxxxx>; Thomas
> Gleixner <tglx@xxxxxxxxxxxxx>; Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
> Cc: Magnus Damm <magnus.damm@xxxxxxxxx>; linux-renesas-soc@xxxxxxxxxxxxxxx; linux-
> kernel@xxxxxxxxxxxxxxx; Chris Paterson <Chris.Paterson2@xxxxxxxxxxx>; Biju Das
> <biju.das.jz@xxxxxxxxxxxxxx>; Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx>
> 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@xxxxxxxxx>
> To: oe-kbuild@xxxxxxxxxxxxxxx
> Cc: lkp@xxxxxxxxx, Julia Lawall <julia.lawall@xxxxxxxx>
> Subject: Re: [PATCH 5/6] irqchip: Add RZ/V2H(P) Interrupt Control Unit (ICU)
>     driver
> 
> BCC: lkp@xxxxxxxxx
> CC: oe-kbuild-all@xxxxxxxxxxxxxxx
> In-Reply-To: <20240917173249.158920-6-fabrizio.castro.jz@xxxxxxxxxxx>
> References: <20240917173249.158920-6-fabrizio.castro.jz@xxxxxxxxxxx>
> TO: Fabrizio Castro <fabrizio.castro.jz@xxxxxxxxxxx>
> TO: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> TO: Philipp Zabel <p.zabel@xxxxxxxxxxxxxx>
> TO: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
> CC: Fabrizio Castro <fabrizio.castro.jz@xxxxxxxxxxx>
> CC: Magnus Damm <magnus.damm@xxxxxxxxx>
> CC: linux-kernel@xxxxxxxxxxxxxxx
> CC: linux-renesas-soc@xxxxxxxxxxxxxxx
> CC: Chris Paterson <Chris.Paterson2@xxxxxxxxxxx>
> CC: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
> CC: Lad Prabhakar <prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx>
> 
> 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@xxxxxxxxx/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@xxxxxxxxx>
> | Reported-by: Julia Lawall <julia.lawall@xxxxxxxx>
> | Closes: https://lore.kernel.org/r/202409220454.AW3A9lUC-lkp@xxxxxxxxx/
> 
> 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





[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux