Message ID | 20181129042833.27376-3-stewart@linux.ibm.com |
---|---|
State | Accepted |
Headers | show |
Series | Random static analysis fixes | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | success | master/apply_patch Successfully applied |
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot | success | Test snowpatch/job/snowpatch-skiboot on branch master |
diff --git a/core/fdt.c b/core/fdt.c index 8fb9ad726548..ce4f66380a63 100644 --- a/core/fdt.c +++ b/core/fdt.c @@ -108,8 +108,6 @@ static void dump_fdt(void *fdt) prlog(PR_INFO, "name: %s [%u]\n", name, off); } } -#else -static inline void dump_fdt(void *fdt __unused) { } #endif static void flatten_dt_properties(void *fdt, const struct dt_node *dn) @@ -183,7 +181,9 @@ static int __create_dtb(void *fdt, size_t len, return fdt_error; } +#ifdef DEBUG_FDT dump_fdt(fdt); +#endif return 0; }
This is a dumb warning from a certain static analysis tool that a function has no effect when the ifdef that would make it have an effect isn't defined and we replace it with a no-op impl. Putting the #ifdef around the call just so I don't have to discount this damn static analysis false positive every time I go and look at the results. Signed-off-by: Stewart Smith <stewart@linux.ibm.com> --- core/fdt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)