* drivers/spmi/spmi-pmic-arb.c:1782 spmi_pmic_arb_register_buses() error: uninitialized symbol 'ret'.
@ 2024-09-18 10:29 Dan Carpenter
2024-09-18 10:34 ` Neil Armstrong
2024-10-09 22:58 ` Stephen Boyd
0 siblings, 2 replies; 4+ messages in thread
From: Dan Carpenter @ 2024-09-18 10:29 UTC (permalink / raw)
To: oe-kbuild, Abel Vesa
Cc: lkp, oe-kbuild-all, linux-kernel, Neil Armstrong, Stephen Boyd
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: adfc3ded5c33d67e822525f95404ef0becb099b8
commit: 9799873717398e8fa1727482e578b9d777da645e spmi: pmic-arb: Add multi bus support
config: mips-randconfig-r072-20240916 (https://download.01.org/0day-ci/archive/20240916/202409162313.TnpH4qKB-lkp@intel.com/config)
compiler: mips64-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@intel.com>
| Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
| Closes: https://lore.kernel.org/r/202409162313.TnpH4qKB-lkp@intel.com/
smatch warnings:
drivers/spmi/spmi-pmic-arb.c:1782 spmi_pmic_arb_register_buses() error: uninitialized symbol 'ret'.
vim +/ret +1782 drivers/spmi/spmi-pmic-arb.c
9799873717398e8 Abel Vesa 2024-05-07 1762 static int spmi_pmic_arb_register_buses(struct spmi_pmic_arb *pmic_arb,
9799873717398e8 Abel Vesa 2024-05-07 1763 struct platform_device *pdev)
9799873717398e8 Abel Vesa 2024-05-07 1764 {
9799873717398e8 Abel Vesa 2024-05-07 1765 struct device *dev = &pdev->dev;
9799873717398e8 Abel Vesa 2024-05-07 1766 struct device_node *node = dev->of_node;
9799873717398e8 Abel Vesa 2024-05-07 1767 struct device_node *child;
9799873717398e8 Abel Vesa 2024-05-07 1768 int ret;
9799873717398e8 Abel Vesa 2024-05-07 1769
9799873717398e8 Abel Vesa 2024-05-07 1770 /* legacy mode doesn't provide child node for the bus */
9799873717398e8 Abel Vesa 2024-05-07 1771 if (of_device_is_compatible(node, "qcom,spmi-pmic-arb"))
9799873717398e8 Abel Vesa 2024-05-07 1772 return spmi_pmic_arb_bus_init(pdev, node, pmic_arb);
9799873717398e8 Abel Vesa 2024-05-07 1773
9799873717398e8 Abel Vesa 2024-05-07 1774 for_each_available_child_of_node(node, child) {
9799873717398e8 Abel Vesa 2024-05-07 1775 if (of_node_name_eq(child, "spmi")) {
9799873717398e8 Abel Vesa 2024-05-07 1776 ret = spmi_pmic_arb_bus_init(pdev, child, pmic_arb);
9799873717398e8 Abel Vesa 2024-05-07 1777 if (ret)
9799873717398e8 Abel Vesa 2024-05-07 1778 return ret;
9799873717398e8 Abel Vesa 2024-05-07 1779 }
9799873717398e8 Abel Vesa 2024-05-07 1780 }
9799873717398e8 Abel Vesa 2024-05-07 1781
9799873717398e8 Abel Vesa 2024-05-07 @1782 return ret;
Is it possible to not have an spmi node?
9799873717398e8 Abel Vesa 2024-05-07 1783 }
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: drivers/spmi/spmi-pmic-arb.c:1782 spmi_pmic_arb_register_buses() error: uninitialized symbol 'ret'.
2024-09-18 10:29 drivers/spmi/spmi-pmic-arb.c:1782 spmi_pmic_arb_register_buses() error: uninitialized symbol 'ret' Dan Carpenter
@ 2024-09-18 10:34 ` Neil Armstrong
2024-09-21 19:54 ` Stephen Boyd
2024-10-09 22:58 ` Stephen Boyd
1 sibling, 1 reply; 4+ messages in thread
From: Neil Armstrong @ 2024-09-18 10:34 UTC (permalink / raw)
To: Dan Carpenter, oe-kbuild, Abel Vesa
Cc: lkp, oe-kbuild-all, linux-kernel, Stephen Boyd
On 18/09/2024 12:29, Dan Carpenter wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: adfc3ded5c33d67e822525f95404ef0becb099b8
> commit: 9799873717398e8fa1727482e578b9d777da645e spmi: pmic-arb: Add multi bus support
> config: mips-randconfig-r072-20240916 (https://download.01.org/0day-ci/archive/20240916/202409162313.TnpH4qKB-lkp@intel.com/config)
> compiler: mips64-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@intel.com>
> | Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
> | Closes: https://lore.kernel.org/r/202409162313.TnpH4qKB-lkp@intel.com/
>
> smatch warnings:
> drivers/spmi/spmi-pmic-arb.c:1782 spmi_pmic_arb_register_buses() error: uninitialized symbol 'ret'.
>
> vim +/ret +1782 drivers/spmi/spmi-pmic-arb.c
>
> 9799873717398e8 Abel Vesa 2024-05-07 1762 static int spmi_pmic_arb_register_buses(struct spmi_pmic_arb *pmic_arb,
> 9799873717398e8 Abel Vesa 2024-05-07 1763 struct platform_device *pdev)
> 9799873717398e8 Abel Vesa 2024-05-07 1764 {
> 9799873717398e8 Abel Vesa 2024-05-07 1765 struct device *dev = &pdev->dev;
> 9799873717398e8 Abel Vesa 2024-05-07 1766 struct device_node *node = dev->of_node;
> 9799873717398e8 Abel Vesa 2024-05-07 1767 struct device_node *child;
> 9799873717398e8 Abel Vesa 2024-05-07 1768 int ret;
> 9799873717398e8 Abel Vesa 2024-05-07 1769
> 9799873717398e8 Abel Vesa 2024-05-07 1770 /* legacy mode doesn't provide child node for the bus */
> 9799873717398e8 Abel Vesa 2024-05-07 1771 if (of_device_is_compatible(node, "qcom,spmi-pmic-arb"))
> 9799873717398e8 Abel Vesa 2024-05-07 1772 return spmi_pmic_arb_bus_init(pdev, node, pmic_arb);
> 9799873717398e8 Abel Vesa 2024-05-07 1773
> 9799873717398e8 Abel Vesa 2024-05-07 1774 for_each_available_child_of_node(node, child) {
> 9799873717398e8 Abel Vesa 2024-05-07 1775 if (of_node_name_eq(child, "spmi")) {
> 9799873717398e8 Abel Vesa 2024-05-07 1776 ret = spmi_pmic_arb_bus_init(pdev, child, pmic_arb);
> 9799873717398e8 Abel Vesa 2024-05-07 1777 if (ret)
> 9799873717398e8 Abel Vesa 2024-05-07 1778 return ret;
> 9799873717398e8 Abel Vesa 2024-05-07 1779 }
> 9799873717398e8 Abel Vesa 2024-05-07 1780 }
> 9799873717398e8 Abel Vesa 2024-05-07 1781
> 9799873717398e8 Abel Vesa 2024-05-07 @1782 return ret;
>
> Is it possible to not have an spmi node?
It's possible but not allowed per the bindings.
Neil
>
> 9799873717398e8 Abel Vesa 2024-05-07 1783 }
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: drivers/spmi/spmi-pmic-arb.c:1782 spmi_pmic_arb_register_buses() error: uninitialized symbol 'ret'.
2024-09-18 10:34 ` Neil Armstrong
@ 2024-09-21 19:54 ` Stephen Boyd
0 siblings, 0 replies; 4+ messages in thread
From: Stephen Boyd @ 2024-09-21 19:54 UTC (permalink / raw)
To: Abel Vesa, Dan Carpenter, Neil Armstrong, oe-kbuild
Cc: lkp, oe-kbuild-all, linux-kernel
Quoting Neil Armstrong (2024-09-18 03:34:22)
> On 18/09/2024 12:29, Dan Carpenter wrote:
> > 9799873717398e8 Abel Vesa 2024-05-07 1767 struct device_node *child;
> > 9799873717398e8 Abel Vesa 2024-05-07 1768 int ret;
> > 9799873717398e8 Abel Vesa 2024-05-07 1769
> > 9799873717398e8 Abel Vesa 2024-05-07 1770 /* legacy mode doesn't provide child node for the bus */
> > 9799873717398e8 Abel Vesa 2024-05-07 1771 if (of_device_is_compatible(node, "qcom,spmi-pmic-arb"))
> > 9799873717398e8 Abel Vesa 2024-05-07 1772 return spmi_pmic_arb_bus_init(pdev, node, pmic_arb);
> > 9799873717398e8 Abel Vesa 2024-05-07 1773
> > 9799873717398e8 Abel Vesa 2024-05-07 1774 for_each_available_child_of_node(node, child) {
> > 9799873717398e8 Abel Vesa 2024-05-07 1775 if (of_node_name_eq(child, "spmi")) {
> > 9799873717398e8 Abel Vesa 2024-05-07 1776 ret = spmi_pmic_arb_bus_init(pdev, child, pmic_arb);
> > 9799873717398e8 Abel Vesa 2024-05-07 1777 if (ret)
> > 9799873717398e8 Abel Vesa 2024-05-07 1778 return ret;
> > 9799873717398e8 Abel Vesa 2024-05-07 1779 }
> > 9799873717398e8 Abel Vesa 2024-05-07 1780 }
> > 9799873717398e8 Abel Vesa 2024-05-07 1781
> > 9799873717398e8 Abel Vesa 2024-05-07 @1782 return ret;
> >
> > Is it possible to not have an spmi node?
>
> It's possible but not allowed per the bindings.
>
Seems that we should just return 0 here then and squelch the warning.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: drivers/spmi/spmi-pmic-arb.c:1782 spmi_pmic_arb_register_buses() error: uninitialized symbol 'ret'.
2024-09-18 10:29 drivers/spmi/spmi-pmic-arb.c:1782 spmi_pmic_arb_register_buses() error: uninitialized symbol 'ret' Dan Carpenter
2024-09-18 10:34 ` Neil Armstrong
@ 2024-10-09 22:58 ` Stephen Boyd
1 sibling, 0 replies; 4+ messages in thread
From: Stephen Boyd @ 2024-10-09 22:58 UTC (permalink / raw)
To: Abel Vesa, Dan Carpenter, oe-kbuild
Cc: lkp, oe-kbuild-all, linux-kernel, Neil Armstrong
Quoting Dan Carpenter (2024-09-18 03:29:07)
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: adfc3ded5c33d67e822525f95404ef0becb099b8
> commit: 9799873717398e8fa1727482e578b9d777da645e spmi: pmic-arb: Add multi bus support
> config: mips-randconfig-r072-20240916 (https://download.01.org/0day-ci/archive/20240916/202409162313.TnpH4qKB-lkp@intel.com/config)
> compiler: mips64-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@intel.com>
> | Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
> | Closes: https://lore.kernel.org/r/202409162313.TnpH4qKB-lkp@intel.com/
>
> smatch warnings:
> drivers/spmi/spmi-pmic-arb.c:1782 spmi_pmic_arb_register_buses() error: uninitialized symbol 'ret'.
>
> vim +/ret +1782 drivers/spmi/spmi-pmic-arb.c
>
> 9799873717398e8 Abel Vesa 2024-05-07 1762 static int spmi_pmic_arb_register_buses(struct spmi_pmic_arb *pmic_arb,
> 9799873717398e8 Abel Vesa 2024-05-07 1763 struct platform_device *pdev)
> 9799873717398e8 Abel Vesa 2024-05-07 1764 {
> 9799873717398e8 Abel Vesa 2024-05-07 1765 struct device *dev = &pdev->dev;
> 9799873717398e8 Abel Vesa 2024-05-07 1766 struct device_node *node = dev->of_node;
> 9799873717398e8 Abel Vesa 2024-05-07 1767 struct device_node *child;
> 9799873717398e8 Abel Vesa 2024-05-07 1768 int ret;
> 9799873717398e8 Abel Vesa 2024-05-07 1769
> 9799873717398e8 Abel Vesa 2024-05-07 1770 /* legacy mode doesn't provide child node for the bus */
> 9799873717398e8 Abel Vesa 2024-05-07 1771 if (of_device_is_compatible(node, "qcom,spmi-pmic-arb"))
> 9799873717398e8 Abel Vesa 2024-05-07 1772 return spmi_pmic_arb_bus_init(pdev, node, pmic_arb);
> 9799873717398e8 Abel Vesa 2024-05-07 1773
> 9799873717398e8 Abel Vesa 2024-05-07 1774 for_each_available_child_of_node(node, child) {
> 9799873717398e8 Abel Vesa 2024-05-07 1775 if (of_node_name_eq(child, "spmi")) {
> 9799873717398e8 Abel Vesa 2024-05-07 1776 ret = spmi_pmic_arb_bus_init(pdev, child, pmic_arb);
> 9799873717398e8 Abel Vesa 2024-05-07 1777 if (ret)
> 9799873717398e8 Abel Vesa 2024-05-07 1778 return ret;
> 9799873717398e8 Abel Vesa 2024-05-07 1779 }
> 9799873717398e8 Abel Vesa 2024-05-07 1780 }
> 9799873717398e8 Abel Vesa 2024-05-07 1781
> 9799873717398e8 Abel Vesa 2024-05-07 @1782 return ret;
>
> Is it possible to not have an spmi node?
I'm amendable to a 'return 0' here.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-10-09 22:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-18 10:29 drivers/spmi/spmi-pmic-arb.c:1782 spmi_pmic_arb_register_buses() error: uninitialized symbol 'ret' Dan Carpenter
2024-09-18 10:34 ` Neil Armstrong
2024-09-21 19:54 ` Stephen Boyd
2024-10-09 22:58 ` Stephen Boyd
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox