Skip to content
Commit 5d9c4e95 authored by Kefeng Wang's avatar Kefeng Wang Committed by Rob Herring
Browse files

of/fdt: Fix ‘of_fdt_match’ defined but not used compiler warning

When CONFIG_OF_EARLY_FLATTREE is disabled, there is a compiler
warning,

drivers/of/fdt.c:129:19: warning: ‘of_fdt_match’ defined but not used [-Wunused-function]
 static int __init of_fdt_match(const void *blob, unsigned long node,

Since the only caller of of_fdt_match() is of_flat_dt_match(),
let's move the body of of_fdt_match() into of_flat_dt_match()
and eliminate of_fdt_match().

Meanwhile, move of_fdt_is_compatible() under CONFIG_OF_EARLY_FLATTREE,
as all callers are over there.

Fixes: 9b4d2b63

 ("of/fdt: Remove dead code and mark functions with __init")
Cc: Frank Rowand <frowand.list@gmail.com>
Signed-off-by: default avatarKefeng Wang <wangkefeng.wang@huawei.com>
Reviewed-by: default avatarStephen Boyd <swboyd@chromium.org>
Signed-off-by: default avatarRob Herring <robh@kernel.org>
parent 2554fcb8
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment