Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

of: unittest: Improve messages and comments in apply/revert checks

Miscellaneous improvements for the apply and apply/revert checks,
making them more similar:
- Fix inverted comment for before state check,
- Add more comments to improve symmetry,
- Fix grammar s/must be to set to/must be in/,
- Avoid saying "create" in messages, as the actual operation depends
on the value of the before/after parameters.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/326ecfe0889c53d2cfff31b3bf950d0b70be225f.1690533838.git.geert+renesas@glider.be
Signed-off-by: Rob Herring <robh@kernel.org>

authored by

Geert Uytterhoeven and committed by
Rob Herring
35df904d 8f50c201

+6 -4
+6 -4
drivers/of/unittest.c
··· 2141 2141 { 2142 2142 int ret, ovcs_id; 2143 2143 2144 - /* unittest device must not be in before state */ 2144 + /* unittest device must be in before state */ 2145 2145 if (of_unittest_device_exists(unittest_nr, ovtype) != before) { 2146 2146 unittest(0, "%s with device @\"%s\" %s\n", 2147 2147 overlay_name_from_nr(overlay_nr), ··· 2150 2150 return -EINVAL; 2151 2151 } 2152 2152 2153 + /* apply the overlay */ 2153 2154 ovcs_id = 0; 2154 2155 ret = of_unittest_apply_overlay(overlay_nr, &ovcs_id); 2155 2156 if (ret != 0) { ··· 2158 2157 return ret; 2159 2158 } 2160 2159 2161 - /* unittest device must be to set to after state */ 2160 + /* unittest device must be in after state */ 2162 2161 if (of_unittest_device_exists(unittest_nr, ovtype) != after) { 2163 - unittest(0, "%s failed to create @\"%s\" %s\n", 2162 + unittest(0, "%s with device @\"%s\" %s\n", 2164 2163 overlay_name_from_nr(overlay_nr), 2165 2164 unittest_path(unittest_nr, ovtype), 2166 2165 !after ? "enabled" : "disabled"); ··· 2196 2195 2197 2196 /* unittest device must be in after state */ 2198 2197 if (of_unittest_device_exists(unittest_nr, ovtype) != after) { 2199 - unittest(0, "%s failed to create @\"%s\" %s\n", 2198 + unittest(0, "%s with device @\"%s\" %s\n", 2200 2199 overlay_name_from_nr(overlay_nr), 2201 2200 unittest_path(unittest_nr, ovtype), 2202 2201 !after ? "enabled" : "disabled"); 2203 2202 return -EINVAL; 2204 2203 } 2205 2204 2205 + /* remove the overlay */ 2206 2206 save_ovcs_id = ovcs_id; 2207 2207 ret = of_overlay_remove(&ovcs_id); 2208 2208 if (ret != 0) {