[bug report] of/unittest: remove use of node name pointer in overlay high level test

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

 



Hello Rob Herring,

The patch 4785d169abd5: "of/unittest: remove use of node name pointer
in overlay high level test" from Aug 27, 2018, leads to the following
static checker warning:

	drivers/of/unittest.c:2356 of_unittest_overlay_high_level()
	info: ignoring unreachable code.

drivers/of/unittest.c
  2354          for_each_child_of_node(overlay_base_root, np) {
  2355                  struct device_node *base_child;
  2356                  for_each_child_of_node(of_root, base_child) {
  2357                          if (!strcmp(np->full_name, base_child->full_name))
  2358                                  unittest(0, "illegal node name in overlay_base %pOFn",
  2359                                          np);
  2360                          return;

You wanted to only return on error probably?  Smatch is complaining
that we don't iterate through the inside loop more than once.

  2361                  }
  2362          }
  2363  

regards,
dan carpenter



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux