Commit 9930c34
pm: policy: Selectively compile on "zephyr,power-state" compatible
Coverity is complaining:
CID 316017: Control flow issues (NO_EFFECT)
>>> This less-than-zero comparison of an unsigned value is never true.
148 for (size_t i = 0; i < ARRAY_SIZE(substate_lock_t); i++) {
This is a false positive but we can still optimize the code and making
coverity happy by simply avoiding compiling the offending code when no
power states are defined into the DT.
Signed-off-by: Carlo Caione <[email protected]>1 parent 208908e commit 9930c34
1 file changed
+10
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
| |||
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
| 45 | + | |
| 46 | + | |
43 | 47 | | |
44 | 48 | | |
45 | 49 | | |
| |||
189 | 193 | | |
190 | 194 | | |
191 | 195 | | |
| 196 | + | |
192 | 197 | | |
193 | 198 | | |
194 | 199 | | |
195 | 200 | | |
196 | 201 | | |
197 | 202 | | |
198 | 203 | | |
| 204 | + | |
199 | 205 | | |
200 | 206 | | |
201 | 207 | | |
202 | 208 | | |
| 209 | + | |
203 | 210 | | |
204 | 211 | | |
205 | 212 | | |
| |||
211 | 218 | | |
212 | 219 | | |
213 | 220 | | |
| 221 | + | |
214 | 222 | | |
215 | 223 | | |
216 | 224 | | |
217 | 225 | | |
| 226 | + | |
218 | 227 | | |
219 | 228 | | |
220 | 229 | | |
221 | 230 | | |
222 | 231 | | |
223 | 232 | | |
224 | 233 | | |
| 234 | + | |
225 | 235 | | |
226 | 236 | | |
227 | 237 | | |
| |||
0 commit comments