1. 17 10月, 2017 1 次提交
  2. 20 7月, 2017 1 次提交
    • F
      of: overlay: add overlay unittest data for node names and symbols · 60a0004c
      Frank Rowand 提交于
      Add nodes and properties to overlay_base and overlay dts files to
      test for
         - incorrect existing node name detection when overlay node name
           has a unit-address
         - adding overlay __symbols__ properties to live tree when an
           overlay is added to the live tree
      
      The following console messages will appear near the end of unittest
      until the code errors are corrected:
      
         OF: Duplicate name in fairway-1, renamed to "ride@100#1"
      
         ### dt-test ### FAIL of_unittest_overlay_high_level():2296 Adding overlay 'overlay_bad_symbol' failed
      
         ### dt-test ### end of unittest - 190 passed, 1 failed
      Signed-off-by: NFrank Rowand <frank.rowand@sony.com>
      Signed-off-by: NRob Herring <robh@kernel.org>
      60a0004c
  3. 19 7月, 2017 1 次提交
  4. 28 6月, 2017 1 次提交
    • P
      vsprintf: Add %p extension "%pOF" for device tree · ce4fecf1
      Pantelis Antoniou 提交于
      90% of the usage of device node's full_name is printing it out in a
      kernel message. However, storing the full path for every node is
      wasteful and redundant. With a custom format specifier, we can generate
      the full path at run-time and eventually remove the full path from every
      node.
      
      For instance typical use is:
      	pr_info("Frobbing node %s\n", node->full_name);
      
      Which can be written now as:
      	pr_info("Frobbing node %pOF\n", node);
      
      '%pO' is the base specifier to represent kobjects with '%pOF'
      representing struct device_node. Currently, struct device_node is the
      only supported type of kobject.
      
      More fine-grained control of formatting includes printing the name,
      flags, path-spec name and others, explained in the documentation entry.
      
      Originally written by Pantelis, but pretty much rewrote the core
      function using existing string/number functions. The 2 passes were
      unnecessary and have been removed. Also, updated the checkpatch.pl
      check. The unittest code was written by Grant Likely.
      Signed-off-by: NPantelis Antoniou <pantelis.antoniou@konsulko.com>
      Acked-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NRob Herring <robh@kernel.org>
      ce4fecf1
  5. 05 5月, 2017 1 次提交
  6. 03 5月, 2017 1 次提交
  7. 28 4月, 2017 1 次提交
  8. 24 1月, 2017 1 次提交
  9. 05 1月, 2017 1 次提交
  10. 24 6月, 2016 1 次提交
  11. 19 5月, 2016 1 次提交
  12. 16 5月, 2016 1 次提交
  13. 22 4月, 2016 1 次提交
  14. 04 3月, 2016 1 次提交
    • S
      of/unittest: fix infinite loop in of_unittest_destroy_tracked_overlays() · 815d74b3
      Sergey Senozhatsky 提交于
      of_overlay_destroy() can return `-ENODEV' error code once it
      failed to find the requested overlay in `ov_idr'. However,
      of_unittest_destroy_tracked_overlays() does not handle this
      error code correctly and continues to call of_overlay_destroy()
      on the 'missing' overlay over and over again. This results in
      a printk flood
      
      [..]
      [   33.497583] of_overlay_destroy: Could not find overlay #6
      [   33.497583] of_overlay_destroy: Could not find overlay #6
      [   33.497584] ### dt-test ### of_unittest_destroy_tracked_overlays: overlay destroy failed for #6
      [   33.497584] ### dt-test ### of_unittest_destroy_tracked_overlays: overlay destroy failed for #6
      [   33.497586] of_overlay_destroy: Could not find overlay #6
      [   33.497586] of_overlay_destroy: Could not find overlay #6
      [   33.497587] ### dt-test ### of_unittest_destroy_tracked_overlays: overlay destroy failed for #6
      [   33.497587] ### dt-test ### of_unittest_destroy_tracked_overlays: overlay destroy failed for #6
      [..]
      
      which is not really good due to printk design, and can lead to soft
      lockups, hard lockups, etc. (depending on the context console_unlock()
      is being called from). The problem has bee observed in real life
      and reported by Ying Huang.
      
      This patch does not address the root cause of missing overlay in
      `ov_idr', it fixes the endless loop only.
      Signed-off-by: NSergey Senozhatsky <sergey.senozhatsky@gmail.com>
      Reported-by: Nkernel test robot <ying.huang@linux.intel.com>
      Link: lkml.kernel.org/r/87fuwk1c0o.fsf@yhuang-dev.intel.com
      Signed-off-by: NRob Herring <robh@kernel.org>
      815d74b3
  15. 14 1月, 2016 1 次提交
  16. 05 1月, 2016 1 次提交
    • G
      of/unittest: Show broken behaviour in the platform bus · d2329fb5
      Grant Likely 提交于
      Add a single resource to the test bus device to exercise the platform
      bus code a little more. This isn't strictly a devicetree test, but it is
      a corner case that the devicetree runs into. Until we've got platform
      device unittests, it can live here. It doesn't need to be an explicit
      text because the kernel will oops when it is wrong.
      
      Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
      Signed-off-by: NGrant Likely <grant.likely@linaro.org>
      [wsa: added the comment provided by Grant, rebased, and tested]
      Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com>
      Signed-off-by: NRob Herring <robh@kernel.org>
      d2329fb5
  17. 22 10月, 2015 1 次提交
    • J
      of/unittest: add missing of_node_put · 855ff287
      Julia Lawall 提交于
      for_each_child_of_node performs an of_node_get on each iteration, so
      a break out of the loop requires an of_node_put.
      
      A simplified version of the semantic patch that fixes this problem is as
      follows (http://coccinelle.lip6.fr):
      
      // <smpl>
      @@
      expression root,e;
      local idexpression child;
      @@
      
       for_each_child_of_node(root, child) {
         ... when != of_node_put(child)
             when != e = child
      (
         return child;
      |
      +  of_node_put(child);
      ?  return ...;
      )
         ...
       }
      // </smpl>
      
      Combine the puts into code at the end of the function, for conciseness.
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: NRob Herring <robh@kernel.org>
      855ff287
  18. 27 7月, 2015 1 次提交
  19. 15 4月, 2015 1 次提交
  20. 29 3月, 2015 6 次提交
  21. 25 3月, 2015 1 次提交
  22. 19 3月, 2015 1 次提交
  23. 10 3月, 2015 4 次提交
  24. 05 2月, 2015 1 次提交
  25. 23 1月, 2015 2 次提交
  26. 14 1月, 2015 1 次提交
  27. 04 12月, 2014 2 次提交
  28. 28 11月, 2014 1 次提交
  29. 25 11月, 2014 2 次提交